Sign in to follow this  
Tryz

tex2Dlod Results

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

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