Overlay Engine: Outlines: Fix occluded alpha being too low
This commit is contained in:
@@ -95,7 +95,7 @@ void OVERLAY_outline_cache_init(OVERLAY_Data *vedata)
|
||||
|
||||
grp = DRW_shgroup_create(sh, psl->outlines_detect_ps);
|
||||
/* Don't occlude the "outline" detection pass if in xray mode (too much flickering). */
|
||||
DRW_shgroup_uniform_float_copy(grp, "alphaOcclu", (pd->xray_enabled) ? 1.0f : 0.125f);
|
||||
DRW_shgroup_uniform_float_copy(grp, "alphaOcclu", (pd->xray_enabled) ? 1.0f : 0.35f);
|
||||
DRW_shgroup_uniform_bool_copy(grp, "doThickOutlines", do_expand);
|
||||
DRW_shgroup_uniform_bool_copy(grp, "doAntiAliasing", pd->antialiasing.enabled);
|
||||
DRW_shgroup_uniform_bool_copy(grp, "isXrayWires", pd->xray_enabled_and_not_wire);
|
||||
|
||||
@@ -233,7 +233,7 @@ void main()
|
||||
bool occluded = (ref_depth > scene_depth + epsilon);
|
||||
|
||||
/* NOTE: We never set alpha to 1.0 to avoid Antialiasing destroying the line. */
|
||||
fragColor *= (occluded) ? alphaOcclu : (254.0 / 255.0);
|
||||
fragColor *= (occluded ? alphaOcclu : 1.0) * (254.0 / 255.0);
|
||||
|
||||
int edge_case = 0;
|
||||
edge_case += int(has_edge_pos_x) * XPOS;
|
||||
|
||||
Reference in New Issue
Block a user