There was a Full Shading bool that was shared across the WP, VP and TP modes. This commit makes some changes: - Replace the bool with a factor. This gives the user more control on the visibility. - Also draw it on top of the Material and Rendered mode so the user can control what he needs. In certain cases you don't want to see the final rendered material, but the actual texture. - Removed the skipping of objects when in paint modes. As now the paint modes are blended.
23 lines
411 B
GLSL
23 lines
411 B
GLSL
|
|
flat in int finalFlag;
|
|
out vec4 fragColor;
|
|
|
|
#define VERTEX_SELECTED (1 << 0)
|
|
#define VERTEX_HIDE (1 << 4)
|
|
|
|
void main()
|
|
{
|
|
if (bool(finalFlag & VERTEX_HIDE)) {
|
|
discard;
|
|
}
|
|
|
|
#ifdef VERTEX_MODE
|
|
vec4 colSel = colorEdgeSelect;
|
|
colSel.rgb = clamp(colSel.rgb - 0.2, 0.0, 1.0);
|
|
#else
|
|
const vec4 colSel = vec4(1.0, 1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
fragColor = bool(finalFlag & VERTEX_SELECTED) ? colSel : colorWire;
|
|
}
|