Jump to content

  • Log In with Google      Sign In   
  • Create Account


Viewing in memory textures in VS 2012


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 mbradber   Members   -  Reputation: 129

Like
0Likes
Like

Posted 27 April 2013 - 04:44 PM

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?



Sponsor:

#2 Deortuka   Members   -  Reputation: 493

Like
2Likes
Like

Posted 28 April 2013 - 05:46 AM

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



#3 unbird   Crossbones+   -  Reputation: 4973

Like
3Likes
Like

Posted 28 April 2013 - 08:58 AM

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).

#4 Deortuka   Members   -  Reputation: 493

Like
1Likes
Like

Posted 28 April 2013 - 10:16 AM

Thanks for the tip unbird!



#5 mbradber   Members   -  Reputation: 129

Like
1Likes
Like

Posted 28 April 2013 - 03:49 PM

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, 28 April 2013 - 03:50 PM.


#6 unbird   Crossbones+   -  Reputation: 4973

Like
1Likes
Like

Posted 28 April 2013 - 04:27 PM

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, 28 April 2013 - 04:49 PM.


#7 mbradber   Members   -  Reputation: 129

Like
0Likes
Like

Posted 01 May 2013 - 07:45 PM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS