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:
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);
}