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

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

uniform mat4 ModelViewProjectionMatrix;
uniform mat3 NormalMatrix;

#if __VERSION__ == 120
  attribute vec3 pos;
  attribute vec3 nor;
  varying vec3 normal;
#else
  in vec3 pos;
  in vec3 nor;
  out vec3 normal;
#endif

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