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:
authorJeroen Bakker <j.bakker@atmind.nl>2019-03-21 18:44:01 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-03-22 10:21:12 +0300
commit177623dd40431b25b34fcfea368024eb66767228 (patch)
tree95418174891a0af494d1199fc85196ef9d53ef15 /source/blender/draw/modes/shaders/paint_texture_vert.glsl
parent5cd3e1b5d153bc2809d4fdfcdd030b054a301a4e (diff)
Implement Stencil Mask Drawing for Texture Painting
Stencil mask drawing was not implemented yet. This commit will implement this for texture painting. It brings the state back to how it was for B279. Reviewed By: fclem Maniphest Tasks: T58727 Differential Revision: https://developer.blender.org/D4570
Diffstat (limited to 'source/blender/draw/modes/shaders/paint_texture_vert.glsl')
-rw-r--r--source/blender/draw/modes/shaders/paint_texture_vert.glsl14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/draw/modes/shaders/paint_texture_vert.glsl b/source/blender/draw/modes/shaders/paint_texture_vert.glsl
index c53439f46a0..43a353f0278 100644
--- a/source/blender/draw/modes/shaders/paint_texture_vert.glsl
+++ b/source/blender/draw/modes/shaders/paint_texture_vert.glsl
@@ -5,15 +5,27 @@ uniform mat4 ModelMatrix;
in vec2 u; /* active uv map */
in vec3 pos;
+#ifdef TEXTURE_PAINT_MASK
+in vec2 mu; /* masking uv map */
+#endif
+
out vec2 uv_interp;
+#ifdef TEXTURE_PAINT_MASK
+out vec2 masking_uv_interp;
+#endif
+
void main()
{
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
uv_interp = u;
+#ifdef TEXTURE_PAINT_MASK
+ masking_uv_interp = mu;
+#endif
+
#ifdef USE_WORLD_CLIP_PLANES
- world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
+ world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
#endif
}