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.
This commit is contained in:
parent
0d7b3ed39c
commit
dfe22a53bb
Notes:
blender-bot
2023-02-14 06:00:51 +01:00
Referenced by issue #95003, Regression: Proper material shown as magenta
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue