Sign in to follow this  

How inspect FP32 Texture?

This topic is 3660 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 3660 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this