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/draw/modes/shaders/edit_lattice_overlay_frag.glsl
Clément Foucault 86193d25db Edit Mesh: Refactor Edit cage drawing to use old style drawing
This is work in progress. Look is not final.

This align data VBO data structure used for edti cage drawing to the one
use for normal drawing.

We no longer use barycentric coords to draw the lines an just rasterize
line primitives for edge drawing. This is a bit slower than using the
previous fast method but faster than the "correct" (edge artifact free)
method. This also make the code way simpler.

This also makes it possible to reuse possible and normal vbos used for
shading if the edit cage matches the

This also touches the UV batch code to share as much render data as
possible. The code also prepare for edit cage "modified" drawing cage (with
modifier applied) but is not enabled since selection and operators does not
work with modified cage yet.
2019-02-05 15:02:15 +01:00

20 lines
282 B
GLSL

flat in int vertFlag;
out vec4 FragColor;
void main()
{
/* TODO: vertex size */
if ((vertFlag & VERT_SELECTED) != 0) {
FragColor = colorVertexSelect;
}
else if ((vertFlag & VERT_ACTIVE) != 0) {
FragColor = colorEditMeshActive;
}
else {
FragColor = colorVertex;
}
}