From f3993ddc0fe4d4acfdba947277e07a79d9085fb9 Mon Sep 17 00:00:00 2001 From: papadanku Date: Sat, 9 Dec 2023 00:37:40 -0700 Subject: [PATCH] New shader updates --- shaders/cColorBand.fx | 8 +++++--- shaders/cPixelate.fx | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/shaders/cColorBand.fx b/shaders/cColorBand.fx index aa13729..8568567 100644 --- a/shaders/cColorBand.fx +++ b/shaders/cColorBand.fx @@ -23,12 +23,12 @@ uniform bool _Dither < float4 PS_Color(VS2PS_Quad Input) : SV_TARGET0 { - float Dither = GetHash1(Input.HPos.xy, 0.0); - float4 ColorMap = tex2D(CShade_SampleGammaTex, Input.Tex0); + float3 Dither = GetHash1(Input.HPos.xy, 0.0); + float4 ColorMap = tex2D(CShade_SampleColorTex, Input.Tex0); if (_Dither) { - ColorMap += (Dither / _Range); + ColorMap.rgb += (Dither / _Range); } ColorMap.rgb = floor(ColorMap.rgb * _Range) / (_Range); @@ -40,6 +40,8 @@ technique CShade_ColorBand { pass { + SRGBWriteEnable = WRITE_SRGB; + VertexShader = VS_Quad; PixelShader = PS_Color; } diff --git a/shaders/cPixelate.fx b/shaders/cPixelate.fx index d6bfda6..f23f01f 100644 --- a/shaders/cPixelate.fx +++ b/shaders/cPixelate.fx @@ -18,7 +18,7 @@ uniform int2 _Pixels < float4 PS_Color(VS2PS_Quad Input) : SV_TARGET0 { float2 Tex = floor(Input.Tex0 * _Pixels) / _Pixels; - float4 OutputColor = tex2D(CShade_SampleGammaTex, Tex); + float4 OutputColor = tex2D(CShade_SampleColorTex, Tex); return OutputColor; } @@ -27,6 +27,8 @@ technique CShade_Pixelate { pass { + SRGBWriteEnable = WRITE_SRGB; + VertexShader = VS_Quad; PixelShader = PS_Color; }