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/overlay/shaders/edit_uv_tiled_image_borders_vert.glsl')
-rw-r--r--source/blender/draw/engines/overlay/shaders/edit_uv_tiled_image_borders_vert.glsl12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/draw/engines/overlay/shaders/edit_uv_tiled_image_borders_vert.glsl b/source/blender/draw/engines/overlay/shaders/edit_uv_tiled_image_borders_vert.glsl
new file mode 100644
index 00000000000..c762858a910
--- /dev/null
+++ b/source/blender/draw/engines/overlay/shaders/edit_uv_tiled_image_borders_vert.glsl
@@ -0,0 +1,12 @@
+#pragma BLENDER_REQUIRE(common_view_lib.glsl)
+
+in vec3 pos;
+
+void main()
+{
+ /* `pos` contains the coordinates of a quad (-1..1). but we need the coordinates of an image
+ * plane (0..1) */
+ vec3 image_pos = pos * 0.5 + 0.5;
+ vec4 position = point_object_to_ndc(image_pos);
+ gl_Position = position;
+}