Jump to content
  • Advertisement
Sign in to follow this  

tex2Dlod Results

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

I have this line in my Vertex Shader: float4 Colors = tex2Dlod(ElevationSampler, float4(0, 0, 0.0f, 1.0f)); I'm expecting to see R:33,G:33,B:33,A:0, but instead I get 4 floats that are incredibly small (ie -2.14177722E+38). I've gone after the data in my Texture2D directly (in C#) to test: Texture.GetData<Color>(0, new Rectangle(0, 0, 10, 1), xx, 0, 10); Texture.GetData<float>(0, new Rectangle(0, 0, 10, 1), yy, 0, 10); When getting a "Color", I get exactly what I want. However, if I get a "float", the call returns what I see in the Vertext Shader. How can I get the Vertex Shader to give me the real RGB colors and not the exponential? I've got to be missing something simple. Thanks.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!