diff options
Diffstat (limited to 'source/blender/draw/modes/shaders/object_camera_image_vert.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/object_camera_image_vert.glsl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/draw/modes/shaders/object_camera_image_vert.glsl b/source/blender/draw/modes/shaders/object_camera_image_vert.glsl new file mode 100644 index 00000000000..61b88c013aa --- /dev/null +++ b/source/blender/draw/modes/shaders/object_camera_image_vert.glsl @@ -0,0 +1,18 @@ +uniform mat4 TransformMat; +uniform float flipX; +uniform float flipY; +uniform float depth; + +in vec2 texCoord; +in vec2 pos; + +out vec2 texCoord_interp; + +void main() +{ + vec4 position = TransformMat * vec4((pos - 0.5) * 2.0, 1.0, 1.0); + gl_Position = vec4(position.xy, depth, 1.0); + + vec2 uv_mul = vec2(flipX, flipY); + texCoord_interp = texCoord * uv_mul; +} |