diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-01-18 16:29:46 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-01-18 16:32:26 +0300 |
commit | dfe22a53bb8d3d2b94f4c80ec4030d28028e9ca6 (patch) | |
tree | e5f9897fb34066bdc185e99e7e390d5627f8f90b | |
parent | 0d7b3ed39c77e1cdd43815a65993afe179691672 (diff) |
Fix T95003: Shader issue using voronoi noise.
Cause of the issue isn't that clear, but the NVIDIA GLSL compiler
complained that it couldn't find an overloaded function when the second
parameter is an interger. This change fixes it by using a float.
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_tex_voronoi.glsl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_tex_voronoi.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_tex_voronoi.glsl index 0f69a4b9aa0..c8219848e29 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_tex_voronoi.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_tex_voronoi.glsl @@ -72,7 +72,7 @@ void node_tex_voronoi_smooth_f1_1d(vec3 coord, out float outRadius) { randomness = clamp(randomness, 0.0, 1.0); - smoothness = clamp(smoothness / 2.0, 0, 0.5); + smoothness = clamp(smoothness / 2.0, 0.0, 0.5); float scaledCoord = w * scale; float cellPosition = floor(scaledCoord); @@ -301,7 +301,7 @@ void node_tex_voronoi_smooth_f1_2d(vec3 coord, out float outRadius) { randomness = clamp(randomness, 0.0, 1.0); - smoothness = clamp(smoothness / 2.0, 0, 0.5); + smoothness = clamp(smoothness / 2.0, 0.0, 0.5); vec2 scaledCoord = coord.xy * scale; vec2 cellPosition = floor(scaledCoord); @@ -565,7 +565,7 @@ void node_tex_voronoi_smooth_f1_3d(vec3 coord, out float outRadius) { randomness = clamp(randomness, 0.0, 1.0); - smoothness = clamp(smoothness / 2.0, 0, 0.5); + smoothness = clamp(smoothness / 2.0, 0.0, 0.5); vec3 scaledCoord = coord * scale; vec3 cellPosition = floor(scaledCoord); @@ -852,7 +852,7 @@ void node_tex_voronoi_smooth_f1_4d(vec3 coord, out float outRadius) { randomness = clamp(randomness, 0.0, 1.0); - smoothness = clamp(smoothness / 2.0, 0, 0.5); + smoothness = clamp(smoothness / 2.0, 0.0, 0.5); vec4 scaledCoord = vec4(coord, w) * scale; vec4 cellPosition = floor(scaledCoord); |