From 71de71276a88f7e5bb867403262c98c78bab898d Mon Sep 17 00:00:00 2001 From: papadanku Date: Fri, 1 Nov 2024 01:10:25 -0700 Subject: [PATCH] Update cQuantize.fx --- shaders/cQuantize.fx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shaders/cQuantize.fx b/shaders/cQuantize.fx index 394e294..d65526c 100644 --- a/shaders/cQuantize.fx +++ b/shaders/cQuantize.fx @@ -46,15 +46,21 @@ float4 PS_Color(CShade_VS2PS_Quad Input) : SV_TARGET0 { float2 ColorMapTex = Input.Tex0; float2 HashTex = Input.HPos.xy; + float4 ColorMap = 0.0; if (_Pixelate) { float2 Grid = floor(Input.Tex0 * _Resolution); float2 ColorMapTex = Grid / _Resolution; float2 HashTex = Grid; + ColorMap = tex2D(CShade_SampleGammaTex, ColorMapTex); } + else + { + ColorMap = tex2D(CShade_SampleGammaTex, Input.Tex0); + } + - float4 ColorMap = tex2D(CShade_SampleGammaTex, ColorMapTex); float3 Dither = 0.0; switch (_DitherMethod)