Sign in to follow this  
Downie

[HLSL, SM 4.0] Texture Sampling

Recommended Posts

Hi I just have a quick question about texture sampling in shader model 4.0. I know that the texture and the sampler have been de-coupled like this
float3 Col = gDiffuseMap.Sample(gTriLinearSam, pIn.Tex);

but what about if I want to sample a texture in a dynamic loop? In SM 3.0 I could use tex2Dgrad, but I am unsure how to use that in sm 4.0; as it requires the texture and sampler state to be combined. Can anyone help?

Share this post


Link to post
Share on other sites
Also, consider this to be a semi-official request to have stuff like this added to the DirectX docs, or at least made more prominent. (I know some of the DirectX devs actually read the board) All the intrinsics, etc. were pretty easy to find for DX9, but they're kinda briefly glossed over in a few samples and tutorials.

Share this post


Link to post
Share on other sites

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