Sign in to follow this  

sampler_state defaults via reflection?

This topic is 2341 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 there a way to get the values of the sampler_state object on a sampler as specified in the shader by using the d3d11 shader reflection system?

Ie if I have:


sampler samp = sampler_state
{
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = LINEAR;
AddressU = CLAMP;
AddressV = CLAMP;
};

I can loop over the BoundResources of the fragment shader and get a D3D11_SHADER_INPUT_BIND_DESC that has a type of D3D_SIT_SAMPLER with the name "samp", but I don't see any method of extracting the filter/address settings?

Share this post


Link to post
Share on other sites
Ah okay, thanks. I'm not using the effects framework, so I will handle these parameters myself in the material system.

If this isn't supported I would have hoped this code would result in a shader compile error (using "ps_5_0" profile), but it doesn't. (using D3DX11CompileFromFile)

Share this post


Link to post
Share on other sites

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