diff --git a/package/Shaders/Effect.hlsl b/package/Shaders/Effect.hlsl index 1aa291a3c..94f74687a 100644 --- a/package/Shaders/Effect.hlsl +++ b/package/Shaders/Effect.hlsl @@ -633,12 +633,16 @@ PS_OUTPUT main(PS_INPUT input) float4 baseTexColor = float4(1, 1, 1, 1); float4 baseColor = float4(1, 1, 1, 1); -# if defined(TEXTURE) || (defined(ADDBLEND) && defined(VC)) - baseTexColor = TexBaseSampler.Sample(SampBaseSampler, input.TexCoord0.xy); - baseColor *= baseTexColor; - if (PixelShaderDescriptor & _IgnoreTexAlpha || PixelShaderDescriptor & _GrayscaleToAlpha) - baseColor.w = 1; +# if !defined(TEXTURE) + [branch] if (PixelShaderDescriptor & _GrayscaleToColor || PixelShaderDescriptor & _GrayscaleToAlpha) # endif + { + baseTexColor = TexBaseSampler.Sample(SampBaseSampler, input.TexCoord0.xy); + baseColor *= baseTexColor; + if (PixelShaderDescriptor & _IgnoreTexAlpha || PixelShaderDescriptor & _GrayscaleToAlpha) { + baseColor.w = 1; + } + } # if defined(MEMBRANE) float4 baseColorMul = float4(1, 1, 1, 1); @@ -780,4 +784,4 @@ PS_OUTPUT main(PS_INPUT input) return psout; } -#endif +#endif \ No newline at end of file