Jump to content
  • Advertisement
Sign in to follow this  
jun lee

HLSL... tex2D( ) can't read ALPHA VALUE

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

debugging shader(HLSL) In my code ... /// TL1_Color is {*,*,*,*} float4 TL1_Color = tex2D( TLayer1Samp, In.Tex0 ); /// excute above TL1_Color is {0.21, 0.321, 0.122, *} /// why w value is * ? /// I test a directX sample(basic hlsl) is filled width value... /// ex} {0.31, 0.32, 0.12, 1} /// what is my mistake? /// please... help... ㅠㅠ

Share this post


Link to post
Share on other sites
Advertisement
The '*' doesn't always mean that there is no value there - it can also mean that the debugger cant work out what it currently is. I've had it do that for some silly expressions - and its usually because of the way its compiled the HLSL down to assembly.

So, the real test is whether you're getting incorrect results because of it?

The obvious thing to check is whether the source textures actually have an alpha channel? Sampling an RGB texture should just get a default 0 (or 1?) value for the missing Alpha channel.

hth
Jack

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!