Skip to content

Commit

Permalink
Update cQuantization.fx
Browse files Browse the repository at this point in the history
  • Loading branch information
papadanku committed Sep 29, 2024
1 parent 50b6f7e commit d802277
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions shaders/cQuantization.fx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,15 @@ uniform int _DitherMethod <

float4 PS_Color(CShade_VS2PS_Quad Input) : SV_TARGET0
{
float2 ColorMapTex = (_Pixelate) ? floor(Input.Tex0 * _Resolution) / _Resolution : Input.Tex0;
float2 HashTex = (_Pixelate) ? floor(Input.Tex0 * _Resolution) : Input.HPos.xy;
float2 ColorMapTex = Input.Tex0;
float2 HashTex = Input.HPos.xy;

if (_Pixelate)
{
float2 Grid = floor(Input.Tex0 * _Resolution);
float2 ColorMapTex = Grid / _Resolution;
float2 HashTex = Grid;
}

float4 ColorMap = tex2D(CShade_SampleGammaTex, ColorMapTex);
float3 Dither = 0.0;
Expand Down

0 comments on commit d802277

Please sign in to comment.