This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/gpu/shaders/gpu_shader_vertex.glsl

19 lines
447 B
GLSL

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;
#ifdef GPU_NVIDIA
// Setting gl_ClipVertex is necessary to get glClipPlane working on NVIDIA
// graphic cards, while on ATI it can cause a software fallback.
gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex;
#endif