This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/draw/modes/shaders/object_outline_prepass_vert.glsl
Campbell Barton e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00

22 lines
444 B
GLSL

uniform mat4 ModelViewMatrix;
uniform mat4 ModelViewProjectionMatrix;
uniform mat4 ModelMatrix;
in vec3 pos;
out vec4 pPos;
out vec3 vPos;
void main()
{
vPos = (ModelViewMatrix * vec4(pos, 1.0)).xyz;
pPos = ModelViewProjectionMatrix * vec4(pos, 1.0);
/* Small bias to always be on top of the geom. */
pPos.z -= 1e-3;
#ifdef USE_WORLD_CLIP_PLANES
world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
#endif
}