Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpu_shader_text_simple_geom.glsl « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 79dc996997b90c0000afa0da46253f4fbdeeece1 (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
25
26
27
28
29
30
31
32
33
34

layout(points) in;
layout(triangle_strip, max_vertices = 4) out;

in vec4 pos_rect[];
in vec4 tex_rect[];
in vec4 color[];

flat out vec4 color_flat;
noperspective out vec2 texCoord_interp;

void main()
{
	color_flat = color[0];
	gl_Position.zw = vec2(0.0, 1.0);

	gl_Position.xy  = pos_rect[0].xy;
	texCoord_interp = tex_rect[0].xy;
	EmitVertex();

	gl_Position.xy  = pos_rect[0].zy;
	texCoord_interp = tex_rect[0].zy;
	EmitVertex();

	gl_Position.xy  = pos_rect[0].xw;
	texCoord_interp = tex_rect[0].xw;
	EmitVertex();

	gl_Position.xy  = pos_rect[0].zw;
	texCoord_interp = tex_rect[0].zw;
	EmitVertex();

	EndPrimitive();
}