float3 Col = gDiffuseMap.Sample(gTriLinearSam, pIn.Tex);
[HLSL, SM 4.0] Texture Sampling
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
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?
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.
Quote:Original post by Nik02
Texture object reference, SM4.x [smile]
Thanks, and rate++. I never would have found that if you hadn't pointed it out.
I still think it would be a good idea to feature this in the "differences from DX9" segment or something.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement