fix diffuse lit effect not discarding transparency
parent
c69e659ba5
commit
4ee7c53907
BIN
Effects/FXB/DiffuseLitSpriteEffect.fxb (Stored with Git LFS)
BIN
Effects/FXB/DiffuseLitSpriteEffect.fxb (Stored with Git LFS)
Binary file not shown.
|
@ -98,6 +98,9 @@ float4 LightColor(float3 worldPosition, float3 worldNormal)
|
|||
float4 WithoutNormalMap(PixelShaderInput input) : COLOR0
|
||||
{
|
||||
float4 tex = SAMPLE_TEXTURE(Texture, input.TexCoord);
|
||||
|
||||
if (tex.a == 0.0) { discard; }
|
||||
|
||||
float3 normalWS = normalize(input.NormalWS);
|
||||
|
||||
return tex * LightColor(input.PositionWS, normalWS);
|
||||
|
@ -106,6 +109,9 @@ float4 WithoutNormalMap(PixelShaderInput input) : COLOR0
|
|||
float4 WithNormalMap(PixelShaderInput input) : COLOR0
|
||||
{
|
||||
float4 tex = SAMPLE_TEXTURE(Texture, input.TexCoord);
|
||||
|
||||
if (tex.a == 0.0) { discard; }
|
||||
|
||||
float3 normalWS = GetNormalFromMap(input.PositionWS, input.TexCoord, input.NormalWS);
|
||||
|
||||
return tex * LightColor(input.PositionWS, normalWS);
|
||||
|
|
Loading…
Reference in New Issue