Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-03-08 16:43:06 +0300
committerJacques Lucke <jacques@blender.org>2020-03-08 16:43:06 +0300
commit7f404f1c74294c72cb66a708b26841b5ed6a84fb (patch)
tree1b2b92d6c7e8e5599e3aea77c5eb960e146c04ff /source/blender/gpu
parentbc2343d5c39dfb110d9d35ecb8ba4bcc15555aff (diff)
Fix T74395: Box interpolation does not support repeat extrapolation
Reviewers: fclem Differential Revision: https://developer.blender.org/D7009
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/shaders/material/gpu_shader_material_tex_image.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_tex_image.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_tex_image.glsl
index 4633e59fde1..c39bec8ac64 100644
--- a/source/blender/gpu/shaders/material/gpu_shader_material_tex_image.glsl
+++ b/source/blender/gpu/shaders/material/gpu_shader_material_tex_image.glsl
@@ -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);
}