Fix #124847: Cycles OSL UDIM wrong extrapolation with negative UV

Pull Request: https://projects.blender.org/blender/blender/pulls/133507
This commit is contained in:
Brecht Van Lommel 2025-01-23 22:20:52 +01:00 • committed by Brecht Van Lommel
parent 222d6b54cf
commit 82cc0a3eff

View file

@ -58,7 +58,7 @@ color image_texture_lookup(string filename,
/* Flip the y coordinate, but preserve UDIM tiles. */
float flip_v;
if (is_tiled) {
float v_i = (int)v;
float v_i = floor(v);
flip_v = v_i + (1.0 - (v - v_i));
}
else {