Jump to content
  • Advertisement
Sign in to follow this  
Downie

[HLSL, SM 4.0] Texture Sampling

This topic is 3301 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 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
Advertisement
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
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!