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

workbench_prepass_vert.glsl « shaders « workbench « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f2df117d897a8a63e7c6dd88bb56f0d4d774504c (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
uniform mat4 ModelViewProjectionMatrix;
#ifdef NORMAL_VIEWPORT_PASS_ENABLED
uniform mat3 NormalMatrix;
#endif /* NORMAL_VIEWPORT_PASS_ENABLED */

in vec3 pos;
#ifdef NORMAL_VIEWPORT_PASS_ENABLED
in vec3 nor;
#endif /* NORMAL_VIEWPORT_PASS_ENABLED */
#ifdef OB_TEXTURE
in vec2 uv;
#endif

#ifdef NORMAL_VIEWPORT_PASS_ENABLED
out vec3 normal_viewport;
#endif /* NORMAL_VIEWPORT_PASS_ENABLED */
#ifdef OB_TEXTURE
out vec2 uv_interp;
#endif

void main()
{
#ifdef OB_TEXTURE
	uv_interp = uv;
#endif
#ifdef NORMAL_VIEWPORT_PASS_ENABLED
	normal_viewport = normalize(NormalMatrix * nor);
#endif /* NORMAL_VIEWPORT_PASS_ENABLED */
	gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
}