Sign in to follow this  

EffectFile ConstantsTable Question

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

Is it possible to get the sampler info from an effect file. I need to know what sampler index an effect file will be using for a given texture. I know ConstantsTable has the info but I dont think that works with effects. The reason is I have 3 renderers (DX9/DX10/OGL) and I want to have that info in a generic location, not in 3 seperate api dependent shader files. I made a master material config file that will handle keeping track of texture parameters like Linear/Point/AddressU/AddressV... and I want to set those myself but I need the samplerStage.

Share this post


Link to post
Share on other sites
You may be able to use GetPixelShader, but I think that's just a pixel shader handle for when you want to supply your own shader (via SetValue). I could be wrong though. I've never looked into it and it's horribly documented.

One way that should work is to
GetPass,
GetPassDesc,
Then call D3DXGetShaderConstantTable on the pixel shader.

Share this post


Link to post
Share on other sites

This topic is 3666 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this