Skip to content
Snippets Groups Projects
Commit 6ed0ae55 authored by Alexander Rose's avatar Alexander Rose
Browse files

fix black artifacts

- on specular highlights with transparent background
parent 84448d0a
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ Note that since we don't clearly distinguish between a public and private interf
- Optimize BinaryCIF integer packing encoder
- Fix Dual depth peeling when post-processing is off or when rendering direct-volumes
- Add `cameraClipping.minNear` parameter
- Fix black artifacts on specular highlights with transparent background
## [v3.18.0] - 2022-09-17
......
......@@ -74,6 +74,7 @@ export class SmaaPass {
state.viewport(x, y, width, height);
state.scissor(x, y, width, height);
state.colorMask(true, true, true, true);
state.clearColor(0, 0, 0, 1);
gl.clear(gl.COLOR_BUFFER_BIT);
......
......@@ -57,6 +57,7 @@ export const apply_light_color = `
RE_IndirectSpecular_Physical(radiance, iblIrradiance, clearcoatRadiance, geometry, physicalMaterial, reflectedLight);
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular;
outgoingLight = clamp(outgoingLight, 0.0, 1.0); // prevents black artifacts on specular highlight with transparent background
gl_FragColor = vec4(outgoingLight, color.a);
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment