Jump to content
  • Advertisement
Sign in to follow this  

Is it possible to *retrieve* integer data from shader code ?

This topic is 2747 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 all ... I have a simple question to ask .. Its one of the first things you learn about shaders when using them with XNA that you can pass on variables from C# to the shader code via the Effect.Parameters function. For example:

Effect.Parameters["shaderVariable"].SetValue(someValue);

In the above line, you're sending the value stored in 'someValue' to the shader variable 'shaderVariable' ..

Can we do the reverse as well ? Like for example, you want to debug the inner workings of a shader code and want to send back some numerical data to your C# application, then is there any similar but opposite relation functional available as well ?

Share this post


Link to post
Share on other sites
Advertisement
If you want to debug your shaders, you do it with PIX. You can step through your shaders line-by-line. No need to write out values or anything like that.

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!