fix: guard shader pow() bases so a NaN pixel can no longer black out the frame
This commit is contained in:
@@ -209,7 +209,7 @@ function additive(billboard: boolean) {
|
||||
varying vec4 vGlow;
|
||||
void main() {
|
||||
float r = 1.0 - min(1.0, length(vUv - 0.5) * 2.0);
|
||||
float shape = ${billboard ? 'pow(r, 3.0) * 1.3 + pow(r, 1.2) * 0.22' : 'pow(r, 1.8) * 0.7'};
|
||||
float shape = ${billboard ? 'pow(max(r, 0.0), 3.0) * 1.3 + pow(max(r, 0.0), 1.2) * 0.22' : 'pow(max(r, 0.0), 1.8) * 0.7'};
|
||||
gl_FragColor = vec4(vGlow.rgb * shape * vGlow.w, 1.0);
|
||||
#include <tonemapping_fragment>
|
||||
#include <colorspace_fragment>
|
||||
|
||||
Reference in New Issue
Block a user