• Advertisement
Sign in to follow this  

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

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