fix: guard shader pow() bases so a NaN pixel can no longer black out the frame
This commit is contained in:
@@ -275,7 +275,7 @@ export function createMaintenanceWindow(resources: SceneResourceBag) {
|
||||
varying float vReturn;
|
||||
void main() {
|
||||
float across = abs(vUv.y);
|
||||
float body = (1.0 - smoothstep(0.0, 1.0, across)) * pow(vUv.x, 1.6);
|
||||
float body = (1.0 - smoothstep(0.0, 1.0, across)) * pow(clamp(vUv.x, 0.0, 1.0), 1.6);
|
||||
float head = 1.0 - smoothstep(0.0, 1.0, length(vec2((vUv.x - 0.9) * 5.0, across)));
|
||||
float alpha = max(body * 0.7, head) * vAlpha;
|
||||
if (alpha < 0.004) discard;
|
||||
|
||||
Reference in New Issue
Block a user