diff options
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index cf7a83e8a87..1cbf58f9d16 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -1162,8 +1162,9 @@ vec3 cellnoise_color(vec3 p) float floorfrac(float x, out int i) { - i = floor_to_int(x); - return x - i; + float x_floor = floor(x); + i = int(x_floor); + return x - x_floor; } /* bsdfs */ |