Fix T74395: Box interpolation does not support repeat extrapolation

Reviewers: fclem

Differential Revision: https://developer.blender.org/D7009
This commit is contained in:
2020-03-08 14:43:06 +01:00
parent bc2343d5c3
commit 7f404f1c74

View File

@@ -183,21 +183,21 @@ void tex_box_sample_nearest(
if (N.x < 0.0) {
uv.x = 1.0 - uv.x;
}
ivec2 pix = ivec2(uv.xy * textureSize(ima, 0).xy);
ivec2 pix = ivec2(fract(uv.xy) * textureSize(ima, 0).xy);
color1 = texelFetch(ima, pix, 0);
/* Y projection */
uv = texco.xz;
if (N.y > 0.0) {
uv.x = 1.0 - uv.x;
}
pix = ivec2(uv.xy * textureSize(ima, 0).xy);
pix = ivec2(fract(uv.xy) * textureSize(ima, 0).xy);
color2 = texelFetch(ima, pix, 0);
/* Z projection */
uv = texco.yx;
if (N.z > 0.0) {
uv.x = 1.0 - uv.x;
}
pix = ivec2(uv.xy * textureSize(ima, 0).xy);
pix = ivec2(fract(uv.xy) * textureSize(ima, 0).xy);
color3 = texelFetch(ima, pix, 0);
}