diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-04-17 23:09:56 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-04-17 23:25:59 +0300 |
commit | 38399c0b10e73cec5772a71809d4074332bb6231 (patch) | |
tree | 9aa20b1877403d467c6702e5338be646b1c5b2e5 | |
parent | 3f762dd76409a285bc0f40df0ff8a6bae6d065b0 (diff) |
Object Mode: Outlines: Fix precision issue on intel GPU.
-rw-r--r-- | source/blender/draw/modes/shaders/object_outline_detect_frag.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/modes/shaders/object_outline_detect_frag.glsl b/source/blender/draw/modes/shaders/object_outline_detect_frag.glsl index a7e68485b86..dc457100d1c 100644 --- a/source/blender/draw/modes/shaders/object_outline_detect_frag.glsl +++ b/source/blender/draw/modes/shaders/object_outline_detect_frag.glsl @@ -40,8 +40,8 @@ void main() #ifdef GL_ARB_texture_gather vec2 texel_size = 1.0 / vec2(textureSize(outlineId, 0).xy); - vec2 uv1 = gl_FragCoord.xy * texel_size - texel_size; - vec2 uv2 = gl_FragCoord.xy * texel_size; + vec2 uv1 = floor(gl_FragCoord.xy) * texel_size - texel_size; + vec2 uv2 = floor(gl_FragCoord.xy) * texel_size; /* Samples order is CW starting from top left. */ uvec4 tmp1 = textureGather(outlineId, uv1); |