Jump to content
  • Advertisement
Sign in to follow this  
mbradber

Viewing in memory textures in VS 2012

This topic is 1881 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

Hey guys, I'm writing a shadow mapping app and I'd like to see the shadow map that was generated on the first render pass before I sample it later. Is there a way I can see this shader resource view using the graphics debugger in VS 2012?

Share this post


Link to post
Share on other sites
Advertisement

You can view all resources from within the graphics debugger. It seems that textures are accessed by an ID number (i.e. obj:21) and I am not aware of a way to actually watch or name a texture. You can click on Object Table view and scan for the texture that has the right format, height, and width, or, if you create or bind it a specific point, you can locate the the link to the texture in the Event List. Once you find the texture, just click on the ID number (i.e. obj:21) and the texture will open up as a *.dds image.

 

Untitled.png

Share this post


Link to post
Share on other sites
You can name your objects this way. That makes it even easier to find them. (Disclaimer: I can't confirm this for the VS2012 debugger, but it works in PIX).

Share this post


Link to post
Share on other sites

You can view all resources from within the graphics debugger. It seems that textures are accessed by an ID number (i.e. obj:21) and I am not aware of a way to actually watch or name a texture. You can click on Object Table view and scan for the texture that has the right format, height, and width, or, if you create or bind it a specific point, you can locate the the link to the texture in the Event List. Once you find the texture, just click on the ID number (i.e. obj:21) and the texture will open up as a *.dds image.

 

Untitled.png

Thanks for the reply, when I click on the object that corresponds to the shadow map texture, it throws an error and says it cannot open the file. I'm thinking it's because the format I'm using to create the Texture2D resource it not supported by the image viewer.

 

For the time being I'm just projecting the shadow map texture onto some geometry and viewing while the app runs, while this works, it would be nice to not have to change my app code in order to debug in memory textures.

Edited by mbradber

Share this post


Link to post
Share on other sites
TYPELESS format, no ? Yeah, PIX can't do that either, unfortunately. Although you will have to change your code too, you could try the following: Use ID3D11DeviceContext::CopyResource to copy your depth to a viewable and compatible format. Not sure if that actually works, though.

Edit: Yep, works: Tried with a R32_TYPELESS shadowmap copied to a D32_FLOAT depth stencil texture. Drawback being you probably wanna do this when your shadow map creation is finished. Edited by unbird

Share this post


Link to post
Share on other sites

TYPELESS format, no ? Yeah, PIX can't do that either, unfortunately. Although you will have to change your code too, you could try the following: Use ID3D11DeviceContext::CopyResource to copy your depth to a viewable and compatible format. Not sure if that actually works, though.

Edit: Yep, works: Tried with a R32_TYPELESS shadowmap copied to a D32_FLOAT depth stencil texture. Drawback being you probably wanna do this when your shadow map creation is finished.

Thanks for the tip, I'll give it a shot.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!