• Advertisement
Sign in to follow this  

Access Static Variable in Shader

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

Dear All,

 

I did some shader reflection and got all bindable variables in a constant buffer.

 

The static variables were not retrive. How can I access a Static Variable from a constant buffer in the Shader with the DirectX 11 API (from the CPU)? How can I get its pointer/offset?

 

Thanks!

Edited by fs1

Share this post


Link to post
Share on other sites
Advertisement

I guess they don't change so I can grab the value from the shader? Correct me if I am wrong.

Share this post


Link to post
Share on other sites
Thanks. Can they change over time? And can it be accessed from outisde the shader?

Share this post


Link to post
Share on other sites

No and no.

“Constant” means “does not change,” and you can’t access something if it is not placed in a constant buffer.

 

 

L. Spiro

Share this post


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

  • Advertisement