new-stars-v2
Hleb Valoshka 2021-03-15 00:13:15 +02:00
parent 3a9a19ca52
commit edbc16417d
2 changed files with 2 additions and 2 deletions

View File

@ -31,5 +31,5 @@ void main()
float spikes = (max(0.0, 1.0 - abs(offset.x + offset.y)) + max(0.0, 1.0 - abs(offset.x - offset.y))) * diffSpikeBrightness;
b += glareBrightness / (glareFalloff * pow(r2, 1.5) + 1.0) * (spikes + 0.5);
#endif
gl_FragColor = vec4(linearToSRGB(b * exposure * color.rgb * brightness * 5.0), 1.0);
gl_FragColor = vec4(linearToSRGB(b * min(500.0, exposure) * color.rgb * brightness * 5.0), 1.0);
}

View File

@ -32,7 +32,7 @@ void main()
vec2 devicePosition = projectedPosition.xy / projectedPosition.w;
pointCenter = (devicePosition * 0.5 + vec2(0.5, 0.5)) * viewportSize + viewportCoord;
color = in_Color;
float b = pow(2.512, min(-3.5, -appMag * magScale));
float b = pow(2.512, -appMag * magScale);
float r2 = -log(thresholdBrightness / (exposure * b)) * 2.0 * sigma2;
float rGlare2 = (exposure * glareBrightness * b / thresholdBrightness - 1.0) / glareFalloff;
gl_PointSize = 2.0 * sqrt(max(r2, rGlare2));