diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-03-28 01:05:41 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-03-28 01:05:41 +0300 |
commit | 21d0f719633d9cf92ca98773ca2931deec3a198b (patch) | |
tree | 5af355656197ad5ba81061b03bd75afb4730ee87 /source/blender/draw/modes/shaders/object_outline_expand_frag.glsl | |
parent | 64359838765db71f4c94e2f5b995630bc0a28b50 (diff) |
New Outline: Fix ATI compile error.
Diffstat (limited to 'source/blender/draw/modes/shaders/object_outline_expand_frag.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/object_outline_expand_frag.glsl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/draw/modes/shaders/object_outline_expand_frag.glsl b/source/blender/draw/modes/shaders/object_outline_expand_frag.glsl index b57c4f5ea0e..e0568d1157a 100644 --- a/source/blender/draw/modes/shaders/object_outline_expand_frag.glsl +++ b/source/blender/draw/modes/shaders/object_outline_expand_frag.glsl @@ -9,10 +9,10 @@ uniform sampler2D outlineDepth; uniform float alpha; uniform bool doExpand; -void search_outline(ivec2 uv, ivec2 offset, inout bool found_edge) +void search_outline(ivec2 uv, inout bool found_edge) { if (!found_edge) { - vec4 color = texelFetchOffset(outlineColor, uv, 0, offset).rgba; + vec4 color = texelFetch(outlineColor, uv, 0).rgba; if (color.a != 0.0) { if (doExpand || color.a != 1.0) { FragColor = color; @@ -32,10 +32,10 @@ void main() return; bool found_edge = false; - search_outline(uv, ivec2( 1, 0), found_edge); - search_outline(uv, ivec2( 0, 1), found_edge); - search_outline(uv, ivec2(-1, 0), found_edge); - search_outline(uv, ivec2( 0, -1), found_edge); + search_outline(uv + ivec2( 1, 0), found_edge); + search_outline(uv + ivec2( 0, 1), found_edge); + search_outline(uv + ivec2(-1, 0), found_edge); + search_outline(uv + ivec2( 0, -1), found_edge); /* We Hit something ! */ if (found_edge) { |