How inspect FP32 Texture?
Hi,
I manually created a Floating Point Texture (DXGI_FORMAT_R32G32B32A32_FLOAT, so 32 Bit Floating Point per Channel) in a DirectX10 Application, but I am not sure if all the values are correct.
I saved the texture to a file and tried to load the file with the DirectX Texture tool, but the loading failed with the message "an error occured trying to open that file."
So whats the best way to inspect the values of the texture?
Temporarily change the type of texture to DXGI_FORMAT_R8G8B8A8_UINT. In your shader, divide the final output of the pixel shader by what you expect to be the maximum value in the render target (or just some number larger than what you will normally render out).
The idea is to make your data be in the range [0..1] so it can be stored in a normal 32-bit texture. Then save this texture out as a BMP file so you can see it in any picture viewer.
Oh, just realized that you manually created the texture (no shader), but the same idea still applies; make your data fit in the [0..1] range and save it to a file so you can look at it.
neneboricua
The idea is to make your data be in the range [0..1] so it can be stored in a normal 32-bit texture. Then save this texture out as a BMP file so you can see it in any picture viewer.
Oh, just realized that you manually created the texture (no shader), but the same idea still applies; make your data fit in the [0..1] range and save it to a file so you can look at it.
neneboricua
Ok, PIX shows me the texture, but I cant see the concrete values for each texel. PIX shows me how the whole texture looks for the specific channels but I cant inspect a float value at a texture coordinate (x,y). Did I miss something in PIX or does it just not have such a feature?
Quote:Original post by schupf
Ok, PIX shows me the texture, but I cant see the concrete values for each texel. PIX shows me how the whole texture looks for the specific channels but I cant inspect a float value at a texture coordinate (x,y). Did I miss something in PIX or does it just not have such a feature?
Just right click on a particular pixel and go to "debug this pixel", and it will show you the its final values as well as any values that were blended to create the final value. You will then also be able to debug any pixel shaders that affected the pixel values of that surface.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement