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/draw/engines/gpencil/shaders/gpencil_frag.glsl')
-rw-r--r--source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl
index 8c2032f834a..d81c6f4fe0b 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl
@@ -99,8 +99,10 @@ void main()
discard;
}
+ vec2 fb_size = max(vec2(textureSize(gpSceneDepthTexture, 0).xy),
+ vec2(textureSize(gpMaskTexture, 0).xy));
+ vec2 uvs = gl_FragCoord.xy / fb_size;
/* Manual depth test */
- vec2 uvs = gl_FragCoord.xy / vec2(textureSize(gpSceneDepthTexture, 0).xy);
float scene_depth = texture(gpSceneDepthTexture, uvs).r;
if (gl_FragCoord.z > scene_depth) {
discard;