Fix T63789: Precision issues in glsl noise texture
There is a significant precision loss when converting large float values to int.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user