Hi,
In shader model 3.0 you could sample textures in the vertex shader with tex2dlod() instead of the usual tex2d in the pixel shader.
But in shader model 4 textures are objects that call it's sample method like texture.sample( sampler, UV.xy )
So I was wondering, what is the equivalent of this in shader model 4? I really need to sample a texture in my geometry shader.
Thanks in advance.
[HLSL] Vertex mapping in vs_4_0
TextureObject.sampleLevel(SamplerStateObject, location, mipMapLevel);
"location" has a different type depending on whether TextureObject is a Texture2D, Texture3D etc. object.
"location" has a different type depending on whether TextureObject is a Texture2D, Texture3D etc. object.
http://msdn.microsoft.com/en-us/library/bb205146%28VS.85%29.aspx says:
"The geometry shader can perform load and texture sampling operations where screen-space derivatives are not required (samplelevel, samplecmplevelzero, samplegrad)."
Edit: Too slow :(
"The geometry shader can perform load and texture sampling operations where screen-space derivatives are not required (samplelevel, samplecmplevelzero, samplegrad)."
Edit: Too slow :(
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement