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

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

varying vec3 varposition;
varying vec3 varnormal;

void main()
{
	vec4 co = gl_ModelViewMatrix * gl_Vertex;

	varposition = co.xyz;
	varnormal = normalize(gl_NormalMatrix * gl_Normal);
	gl_Position = gl_ProjectionMatrix * co;

	// Setting gl_ClipVertex is necessary to get glClipPlane working on NVIDIA graphic cards.
	// gl_ClipVertex works only on NVIDIA graphic cards so we have to check with 
	// __GLSL_CG_DATA_TYPES if a NVIDIA graphic card is used (Cg support).
	// gl_ClipVerte is supported up to GLSL 1.20.
	#ifdef __GLSL_CG_DATA_TYPES 
		gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex; 
	#endif