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

gpu_shader_3D_groundline_geom.glsl « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f16fa21b3428faab69f26f1ad358b356f943a3a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

/* Make to be used with dynamic batching so no Model Matrix needed */
uniform mat4 ViewProjectionMatrix;

layout(points) in;
layout(line_strip, max_vertices = 2) out;

void main()
{
	vec3 vert = gl_in[0].gl_Position.xyz;
	gl_Position = ViewProjectionMatrix * vec4(vert.xyz, 1.0);
	EmitVertex();
	gl_Position = ViewProjectionMatrix * vec4(vert.xy, 0.0, 1.0);
	EmitVertex();
	EndPrimitive();
}