diff --git a/shaders/cQuantize.fx b/shaders/cQuantize.fx index d4ed024..90be1f3 100644 --- a/shaders/cQuantize.fx +++ b/shaders/cQuantize.fx @@ -46,20 +46,20 @@ float4 PS_Color(CShade_VS2PS_Quad Input) : SV_TARGET0 { float2 ColorMapTex = Input.Tex0; float2 HashTex = Input.HPos.xy; + float2 Grid = floor(Input.Tex0 * _Resolution); float4 ColorMap = 0.0; if (_Pixelate) { - float2 Grid = floor(Input.Tex0 * _Resolution); - float2 ColorMapTex = Grid / _Resolution; - float2 HashTex = Grid; - ColorMap = tex2D(CShade_SampleGammaTex, ColorMapTex); + HashTex = Grid; + ColorMap = tex2D(CShade_SampleGammaTex, Grid / _Resolution); } else { ColorMap = tex2D(CShade_SampleGammaTex, Input.Tex0); } + float3 Dither = 0.0; switch (_DitherMethod)