December 26th, 2010, 09:42 PM
DirectX HLSL Pixel Shader return values
I'm working on an HLSL shader in an fx file.
I have my data type set to D3DFMT_A8R8G8B8
my shader looks like this:
float4 PS(float2 tex0 : TEXCOORD0, float2 tex1 : TEXCOORD1): COLOR
float4 ret = float4(0.5,0.5,0.5,0.5);
On 3 of my machines, when I read this texture back, I get 128,128,128,128
however on one of my machines, I get 64,64,64,64. I have played around with
the numbers, and have determined that it's because the alpha is being multiplied by all the other
values, giving me 0.25,0.25,0.25,0.25 as return values.
is there some kind of render state or something that I can set to make it not do this?
it's very strange to me because the card on which this happens is an nVidia 8700M GT,
but it works properly (ie does not multiply the alpha) on machines with 8800GTX and 7950M GT
(as well as on my ATI radion 5870)
does anyone have an idea why this might be happening?
any help would be appreciated.
December 26th, 2010, 09:43 PM
Re: DirectX HLSL Pixel Shader return values
I also return ret from the shader. sorry.
Tags for this Thread
Click Here to Expand Forum to Full Width