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_3D_vert.glsl
Campbell Barton e72fa714a8 Cleanup: remove duplicated shaders that only added clipping checks
Originally I wanted to avoid adding draw manager specific ifdef's all
over generic shaders however this isn't needed in so many places.

Also there are shaders that are only used by the draw manager so
duplicating them only to have the original unused doesn't make sense.
2019-01-25 08:01:07 +11:00

18 lines
306 B
GLSL

uniform mat4 ModelViewProjectionMatrix;
#ifdef USE_WORLD_CLIP_PLANES
uniform mat4 ModelMatrix;
#endif
in vec3 pos;
void main()
{
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
#ifdef USE_WORLD_CLIP_PLANES
world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
#endif
}