From 6ef5bc1b99be97e60225fd643d4faff102063414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 18 Oct 2018 15:17:21 +0200 Subject: Cleanup: node_tex_checker: Vectorize operation in GLSL --- source/blender/gpu/shaders/gpu_shader_material.glsl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source/blender/gpu/shaders') diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 64f04e5b1fe..7b4748056a7 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -1859,9 +1859,7 @@ void node_tex_checker(vec3 co, vec4 color1, vec4 color2, float scale, out vec4 c vec3 p = co * scale; /* Prevent precision issues on unit coordinates. */ - p.x = (p.x + 0.000001) * 0.999999; - p.y = (p.y + 0.000001) * 0.999999; - p.z = (p.z + 0.000001) * 0.999999; + p = (p + 0.000001) * 0.999999; int xi = int(abs(floor(p.x))); int yi = int(abs(floor(p.y))); -- cgit v1.2.3