[Bf-blender-cvs] [289b377] compositor-2016: Cleanup: Don't use f suffix for values in GLSL

Sergey Sharybin noreply at git.blender.org
Wed Jun 8 21:48:31 CEST 2016


Commit: 289b377e29a40b86935b3e946ef8c6d421d831f8
Author: Sergey Sharybin
Date:   Fri May 20 18:14:04 2016 +0200
Branches: compositor-2016
https://developer.blender.org/rB289b377e29a40b86935b3e946ef8c6d421d831f8

Cleanup: Don't use f suffix for values in GLSL

Was giving an issues in the past, will avoid it for now.

===================================================================

M	source/blender/gpu/shaders/gpu_shader_material.glsl

===================================================================

diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 8289389..ca0888d 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -2321,7 +2321,7 @@ float integer_noise(int n)
 	n = (n + 1013) & 0x7fffffff;
 	n = (n >> 13) ^ n;
 	nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
-	return 0.5f * (float(nn) / 1073741824.0);
+	return 0.5 * (float(nn) / 1073741824.0);
 }
 
 int floor_to_int(float x)
@@ -2858,7 +2858,7 @@ void node_tex_magic(vec3 co, float scale, float distortion, float depth, out vec
 		z /= distortion;
 	}
 
-	color = vec4(0.5f - x, 0.5f - y, 0.5f - z, 1.0);
+	color = vec4(0.5 - x, 0.5 - y, 0.f - z, 1.0);
 	fac = (color.x + color.y + color.z) / 3.0;
 }




More information about the Bf-blender-cvs mailing list