Skip to content
Snippets Groups Projects
Unverified Commit 6a32f85e authored by Alexander Rose's avatar Alexander Rose Committed by GitHub
Browse files

Merge pull request #603 from giagitom/transparent-bg-fixes

parents d7798123 f29c62ec
Branches
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ export const apply_light_color = ` ...@@ -57,7 +57,7 @@ export const apply_light_color = `
RE_IndirectSpecular_Physical(radiance, iblIrradiance, clearcoatRadiance, geometry, physicalMaterial, reflectedLight); RE_IndirectSpecular_Physical(radiance, iblIrradiance, clearcoatRadiance, geometry, physicalMaterial, reflectedLight);
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular; 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 outgoingLight = clamp(outgoingLight, 0.01, 0.99); // prevents black artifacts on specular highlight with transparent background
gl_FragColor = vec4(outgoingLight, color.a); gl_FragColor = vec4(outgoingLight, color.a);
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment