Skip to content

Commit 010a5dc

Browse files
author
Florian Maas
committed
better cluster highlighting
1 parent 6afedf1 commit 010a5dc

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

frontend/src/shaders/instancedQuad.frag

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,11 @@ void main() {
123123
intensity = 1.0 - smoothstep(0.32, 1.0, vHighlightProgress);
124124
}
125125

126-
// Apply brightness boost
127-
float highlightBoost = exp(-normalizedDist * 2.0) * 0.6 * intensity;
126+
// Apply brightness boost - wider glow for smaller points, reduced intensity for larger
127+
float sizeForHighlight = clamp((vSize - 12.0) / 68.0, 0.0, 1.0);
128+
float highlightFalloff = mix(1.2, 2.0, sizeForHighlight); // 1.2 for small, 2.0 for large
129+
float highlightIntensity = mix(0.6, 0.35, sizeForHighlight); // 0.6 for small, 0.35 for large
130+
float highlightBoost = exp(-normalizedDist * highlightFalloff) * highlightIntensity * intensity;
128131
vec3 warmWhite = vec3(1.0, 0.98, 0.94);
129132
finalColor.rgb = mix(finalColor.rgb, warmWhite, highlightBoost);
130133
finalColor.a = max(finalColor.a, finalColor.a + highlightBoost * 0.4);

0 commit comments

Comments
 (0)