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:
parent
c68c81a870
commit
d32a103d53
Notes:
blender-bot
2023-05-31 04:43:10 +02:00
Referenced by issue #63789, Generated noise texture is not infinite / looped
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue