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

background_vert.glsl « shaders « eevee « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8b4bc3382f47c1c18e177944c19aac32b9f16918 (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

in vec2 pos;

out vec3 viewPosition;

#ifndef VOLUMETRICS
/* necessary for compilation*/
out vec3 worldPosition;
out vec3 worldNormal;
out vec3 viewNormal;
#endif

void main()
{
	gl_Position = vec4(pos, 1.0, 1.0);
	viewPosition = vec3(pos, -1.0);

#ifndef VOLUMETRICS
	/* Not used in practice but needed to avoid compilation errors. */
	worldPosition = viewPosition;
	worldNormal = viewNormal = normalize(-viewPosition);
#endif

#ifdef USE_ATTR
	pass_attr(viewPosition);
#endif
}