blob: 71100a5681a6714c026d9179ee34028084c3d5a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma BLENDER_REQUIRE(common_view_lib.glsl)
#define IMAGE_DRAW_FLAG_DO_REPEAT (1 << 4)
#define IMAGE_Z_DEPTH 0.75
uniform int drawFlags;
in vec2 pos;
in vec2 uv;
/* Normalized screen space uv coordinates. */
out vec2 uv_screen;
out vec2 uv_image;
void main()
{
vec3 image_pos = vec3(pos, 0.0);
uv_screen = image_pos.xy;
uv_image = uv;
vec3 world_pos = point_object_to_world(image_pos);
vec4 position = point_world_to_ndc(world_pos);
gl_Position = position;
}
|