HLSL tex2d question
by William Todd Scott · in Torque Game Engine Advanced · 11/07/2006 (9:32 am) · 3 replies
Hi,
I am trying to understand what happens in the following (very simple) case.
I set a 24-bit RGB texture and in the pixel shader do this:
float 4 col = tex2d(tex01, IN.texCoord);
What is put in the alpha channel and why?
It appears that the alpha channel will be set to 1.0f, but I'm not sure how/why that is happening.
Thanks
Todd
I am trying to understand what happens in the following (very simple) case.
I set a 24-bit RGB texture and in the pixel shader do this:
float 4 col = tex2d(tex01, IN.texCoord);
What is put in the alpha channel and why?
It appears that the alpha channel will be set to 1.0f, but I'm not sure how/why that is happening.
Thanks
Todd
Associate Alex Scarborough
On a side note, most cards do not natively support RGB textures. They are generally padded in the driver into RGBA textures with 1.0 in the alpha channel.
Why 1.0? 1.0 alpha implies a completely opaque texture, which is presumably what you want by specifying an RGB texture.