mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Make highlight occlusion match overlay occlusion
This commit is contained in:
parent
87ff6dd56d
commit
2f3a9412f3
1 changed files with 2 additions and 3 deletions
|
@ -26,7 +26,6 @@ layout(location=0) in vec2 varTexCoord0;
|
|||
layout(location=0) out vec4 outFragColor;
|
||||
|
||||
const float FAR_Z = 1.0;
|
||||
const float LINEAR_DEPTH_BIAS = 5e-3;
|
||||
const float OPACITY_EPSILON = 5e-3;
|
||||
|
||||
<@func main(IS_FILLED)@>
|
||||
|
@ -46,7 +45,7 @@ void main(void) {
|
|||
highlightedDepth = -evalZeyeFromZdb(highlightedDepth);
|
||||
sceneDepth = -evalZeyeFromZdb(sceneDepth);
|
||||
|
||||
if (sceneDepth < (highlightedDepth-LINEAR_DEPTH_BIAS)) {
|
||||
if (sceneDepth < highlightedDepth) {
|
||||
outFragColor = vec4(params._fillOccludedColor, params._fillOccludedAlpha);
|
||||
} else {
|
||||
outFragColor = vec4(params._fillUnoccludedColor, params._fillUnoccludedAlpha);
|
||||
|
@ -107,7 +106,7 @@ void main(void) {
|
|||
sceneDepth = -evalZeyeFromZdb(sceneDepth);
|
||||
|
||||
// Are we occluded?
|
||||
if (sceneDepth < (outlinedDepth/*-LINEAR_DEPTH_BIAS*/)) {
|
||||
if (sceneDepth < outlinedDepth) {
|
||||
outFragColor = vec4(params._outlineOccludedColor, intensity * params._outlineOccludedAlpha);
|
||||
} else {
|
||||
outFragColor = vec4(params._outlineUnoccludedColor, intensity * params._outlineUnoccludedAlpha);
|
||||
|
|
Loading…
Reference in a new issue