From 07c5e8fcb172a7b88073b2f5d35b2dfbee1b4ca4 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sat, 18 Jun 2016 02:05:52 +0300 Subject: [PATCH] Fixed smooth bilinear filter --- Shaders/SmoothBilinear.fsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Shaders/SmoothBilinear.fsh b/Shaders/SmoothBilinear.fsh index 443a10f..ab242f5 100644 --- a/Shaders/SmoothBilinear.fsh +++ b/Shaders/SmoothBilinear.fsh @@ -9,10 +9,10 @@ vec4 scale(sampler2D image) vec4 q21 = texture(image, vec2(ceil(pixel.x) / textureDimensions.x, floor(pixel.y) / textureDimensions.y)); vec4 q22 = texture(image, vec2(ceil(pixel.x) / textureDimensions.x, ceil(pixel.y) / textureDimensions.y)); - vec2 smooth = smoothstep(0., 1., fract(pixel)); + vec2 s = smoothstep(0., 1., fract(pixel)); - vec4 r1 = mix(q11, q21, fract(smooth.x)); - vec4 r2 = mix(q12, q22, fract(smooth.x)); + vec4 r1 = mix(q11, q21, fract(s.x)); + vec4 r2 = mix(q12, q22, fract(s.x)); - return mix (r1, r2, fract(smooth.y)); + return mix (r1, r2, fract(s.y)); } \ No newline at end of file