Get the latest Blender, older versions, or experimental builds.
Stay up-to-date with the new features in the latest Blender releases.
Access production assets and knowledge from the open movies.
Documentation on the usage and features in Blender.
Latest development updates, by Blender developers.
Guidelines, release notes and development docs.
A platform to collect and share results of the Blender Benchmark.
The yearly event that brings the community together.
Support core development with a monthly contribution.
Perform a single donation with more payment options available.
#if defined(USE_SOLID_LIGHTING) || defined(USE_SCENE_LIGHTING)
#if defined(USE_FLAT_NORMAL)
varying vec3 eyespace_vert_pos;
#else
varying vec3 varying_normal;
#endif
#ifndef USE_SOLID_LIGHTING
varying vec3 varying_position;
#ifdef USE_COLOR
#ifdef DRAW_LINE
varying vec4 varying_vertex_color_line;
varying vec4 varying_vertex_color;
#ifdef USE_TEXTURE
varying vec2 varying_texture_coord;
#ifdef CLIP_WORKAROUND
varying float gl_ClipDistance[6];
void main()
{
vec4 co = gl_ModelViewMatrix * gl_Vertex;
#if !defined(USE_FLAT_NORMAL)
varying_normal = normalize(gl_NormalMatrix * gl_Normal);
/* transform vertex into eyespace */
eyespace_vert_pos = (gl_ModelViewMatrix * gl_Vertex).xyz;
varying_position = co.xyz;
gl_Position = gl_ProjectionMatrix * co;
int i;
for (i = 0; i < 6; i++)
gl_ClipDistance[i] = dot(co, gl_ClipPlane[i]);
#elif !defined(GPU_ATI)
// Setting gl_ClipVertex is necessary to get glClipPlane working on NVIDIA
// graphic cards, while on ATI it can cause a software fallback.
gl_ClipVertex = co;
varying_vertex_color_line = gl_Color;
varying_vertex_color = gl_Color;
varying_texture_coord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st;
}