Fix T74395: Box interpolation does not support repeat extrapolation
Reviewers: fclem Differential Revision: https://developer.blender.org/D7009
This commit is contained in:
parent
bc2343d5c3
commit
7f404f1c74
Notes:
blender-bot
2023-02-13 23:18:18 +01:00
Referenced by issue #74395, Setting image interpolation to "closest" and projection to "box" causes extrapolation setting "repeat" to fail
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue