Jump to content

  • Log In with Google      Sign In   
  • Create Account


ID3D11ShaderReflection


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
2 replies to this topic

#1 Alundra   Members   -  Reputation: 811

Like
0Likes
Like

Posted 31 December 2012 - 06:21 PM

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



Sponsor:

#2 rdragon1   Crossbones+   -  Reputation: 1194

Like
1Likes
Like

Posted 31 December 2012 - 06:28 PM

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.



#3 MJP   Moderators   -  Reputation: 10637

Like
0Likes
Like

Posted 01 January 2013 - 12:24 PM

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.






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