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

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

/* Note: nearly the same code as for 2D version... Maybe we could deduplicate? */

uniform mat4 ModelViewProjectionMatrix;
uniform vec2 viewport_size;

in vec3 pos;
noperspective out float distance_along_line;

void main()
{
	gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);

	/* Hack - prevent stupid GLSL compiler to optimize out unused viewport_size uniform, which gives crash! */
	distance_along_line = viewport_size.x * 0.000001f - viewport_size.x * 0.0000009f;
}