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

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

uniform mat4 ModelViewProjectionMatrix;
uniform mat3 NormalMatrix;

in vec3 pos;
in vec3 nor;
in vec4 color;

#ifdef USE_FLAT_NORMAL
flat out vec3 normal;
flat out vec4 finalColor;
#else
out vec3 normal;
out vec4 finalColor;
#endif

void main()
{
	normal = normalize(NormalMatrix * nor);
	gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
	finalColor = color;
}