Jump to content
  • Advertisement
Sign in to follow this  
Alundra

OpenGL ID3D11ShaderReflection

This topic is 2118 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,

My question is still simple.

I'm on the way to find a good solution to have shader class who works on all side (OpenGL/D3D11).

I have found an article on msdn who speak about ID3D11ShaderReflection.

I would use it to find uniform block by name to have ID, like that on openGL, same process.

Is ID3D11ShaderReflection slow ?

 

Thanks

Share this post


Link to post
Share on other sites
Advertisement

I don't know how fast it is, but I'm sure it wasn't designed with speed in mind. It's more the kind of thing you want to run once over your shader to get the information you need, then store that in your own data for use at runtime as necessary. I wouldn't use it in your render loop, it's more of a tooling library for inspecting the shader code.

Share this post


Link to post
Share on other sites

I can tell you from personal experience that obtaining the reflection interface for a shader is not a particularly quick operation. I don't think accessing it is unusually slow once you've obtained it, but I agree with rdragon that the best practice is to only access it once and store the data you need in whatever format makes sense for your game or app. You can even do it in an offline process if you want, which is actually how you have to do it if you want to target non-desktop platforms.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!