diff options
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_image_interlace_frag.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_image_interlace_frag.glsl | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_image_interlace_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_interlace_frag.glsl index 8b303104bb3..2445b0206ec 100644 --- a/source/blender/gpu/shaders/gpu_shader_image_interlace_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_image_interlace_frag.glsl @@ -4,14 +4,9 @@ #define INTERLACE_COLUMN 1 #define INTERLACE_CHECKERBOARD 2 -#if __VERSION__ == 120 - varying vec2 texCoord_interp; - #define fragColor gl_FragColor -#else - in vec2 texCoord_interp; - out vec4 fragColor; - #define texture2DRect texture -#endif +:n vec2 texCoord_interp; +out vec4 fragColor; +#define texture2DRect texture uniform int interlace_id; uniform sampler2DRect image_a; @@ -19,17 +14,6 @@ uniform sampler2DRect image_b; bool interlace() { -#if __VERSION__ == 120 - if (interlace_id == INTERLACE_CHECKERBOARD) { - return int(mod(gl_FragCoord.x + gl_FragCoord.y, 2)) != 0; - } - else if (interlace_id == INTERLACE_ROW) { - return int(mod(gl_FragCoord.y, 2)) != 0; - } - else if (interlace_id == INTERLACE_COLUMN) { - return int(mod(gl_FragCoord.x, 2)) != 0; - } -#else if (interlace_id == INTERLACE_CHECKERBOARD) { return (int(gl_FragCoord.x + gl_FragCoord.y) & 1) != 0; } @@ -39,7 +23,6 @@ bool interlace() else if (interlace_id == INTERLACE_COLUMN) { return (int(gl_FragCoord.x) & 1) != 0; } -#endif } void main() |