Convert tabs to spaces in area scaling shaders

This commit is contained in:
ZenoArrows 2024-09-10 19:11:33 +02:00
commit 968b8986a1
2 changed files with 122 additions and 122 deletions

View file

@ -43,10 +43,10 @@ vec4 QuickSample(vec2 uv)
const float threshold = 0.00000001; const float threshold = 0.00000001;
vec2 xy = uv.xy * GetResolution(); vec2 xy = uv.xy * GetResolution();
// Sampling outside the valid range, draw in yellow // Sampling outside the valid range, draw in yellow
if (xy.x < (srcX0 - threshold) || xy.x > (srcX1 + threshold) || xy.y < (srcY0 - threshold) || xy.y > (srcY1 + threshold)) if (xy.x < (srcX0 - threshold) || xy.x >(srcX1 + threshold) || xy.y < (srcY0 - threshold) || xy.y >(srcY1 + threshold))
return vec4(1.0, 1.0, 0.0, 1); return vec4(1.0, 1.0, 0.0, 1);
// Sampling at the edges, draw in purple // Sampling at the edges, draw in purple
if (xy.x < srcX0 + 1.0 || xy.x > (srcX1 - 1.0) || xy.y < srcY0 + 1.0 || xy.y > (srcY1 - 1.0)) if (xy.x < srcX0 + 1.0 || xy.x >(srcX1 - 1.0) || xy.y < srcY0 + 1.0 || xy.y >(srcY1 - 1.0))
return vec4(0.5, 0, 0.5, 1); return vec4(0.5, 0, 0.5, 1);
#endif #endif
return texture(Source, uv); return texture(Source, uv);

View file

@ -46,10 +46,10 @@ vec4 QuickSample(vec2 uv)
const float threshold = 0.00000001; const float threshold = 0.00000001;
vec2 xy = uv.xy * GetResolution(); vec2 xy = uv.xy * GetResolution();
// Sampling outside the valid range, draw in yellow // Sampling outside the valid range, draw in yellow
if (xy.x < (srcX0 - threshold) || xy.x > (srcX1 + threshold) || xy.y < (srcY0 - threshold) || xy.y > (srcY1 + threshold)) if (xy.x < (srcX0 - threshold) || xy.x >(srcX1 + threshold) || xy.y < (srcY0 - threshold) || xy.y >(srcY1 + threshold))
return vec4(1.0, 1.0, 0.0, 1); return vec4(1.0, 1.0, 0.0, 1);
// Sampling at the edges, draw in purple // Sampling at the edges, draw in purple
if (xy.x < srcX0 + 1.0 || xy.x > (srcX1 - 1.0) || xy.y < srcY0 + 1.0 || xy.y > (srcY1 - 1.0)) if (xy.x < srcX0 + 1.0 || xy.x >(srcX1 - 1.0) || xy.y < srcY0 + 1.0 || xy.y >(srcY1 - 1.0))
return vec4(0.5, 0, 0.5, 1); return vec4(0.5, 0, 0.5, 1);
#endif #endif
return texture(Source, uv); return texture(Source, uv);