diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-05-22 16:31:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-05-23 10:40:48 +0300 |
commit | f21c235c6fa6782dfc9c0ba7a66fa3c1005b2897 (patch) | |
tree | 2059c43758cfa26d15bd4fed1e9af29d332a1fe6 /source/blender/draw/modes/shaders | |
parent | 44f91a9a18d6d942d958e7640f4d1c301d230150 (diff) |
DwM: texture paint support & mask mode
Uses workaround so material slots are used when neither blender-internal
or cycles are enabled.
Diffstat (limited to 'source/blender/draw/modes/shaders')
-rw-r--r-- | source/blender/draw/modes/shaders/paint_texture_frag.glsl | 11 | ||||
-rw-r--r-- | source/blender/draw/modes/shaders/paint_texture_vert.glsl | 15 |
2 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/draw/modes/shaders/paint_texture_frag.glsl b/source/blender/draw/modes/shaders/paint_texture_frag.glsl new file mode 100644 index 00000000000..18c58a54dca --- /dev/null +++ b/source/blender/draw/modes/shaders/paint_texture_frag.glsl @@ -0,0 +1,11 @@ + +in vec2 uv_interp; +out vec4 fragColor; + +uniform sampler2D image; + + +void main() +{ + fragColor = texture(image, uv_interp); +} diff --git a/source/blender/draw/modes/shaders/paint_texture_vert.glsl b/source/blender/draw/modes/shaders/paint_texture_vert.glsl new file mode 100644 index 00000000000..4ce12e048fa --- /dev/null +++ b/source/blender/draw/modes/shaders/paint_texture_vert.glsl @@ -0,0 +1,15 @@ + +uniform mat4 ModelViewProjectionMatrix; + +in vec2 uv; +in vec3 pos; + +out vec2 uv_interp; + +void main() +{ + gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); + + uv_interp = uv; + +} |