[Bf-blender-cvs] [bff0951] master: Cleanup: Don't use f suffix for values in GLSL

Sergey Sharybin noreply at git.blender.org
Fri May 20 18:14:19 CEST 2016


Commit: bff095184a144a3c9ba4414a8ee71e6b1d43fd78
Author: Sergey Sharybin
Date:   Fri May 20 18:14:04 2016 +0200
Branches: master
https://developer.blender.org/rBbff095184a144a3c9ba4414a8ee71e6b1d43fd78

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