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
Clément Foucault 542462d35c Workbench: Xray: Add selected/active non-occluded outlines
This Fix the problem when multiple objects are selected and one of them
occlude the others. You cannot see clearly what is selected.

With this option, selection is more clear when Xray mode is enabled.
2018-06-10 20:06:26 +02:00

17 lines
301 B
GLSL

uniform mat4 ModelViewMatrix;
uniform mat4 ModelViewProjectionMatrix;
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;
}