engine icon indicating copy to clipboard operation
engine copied to clipboard

Area Light rendering artifacts on materials

Open yaustar opened this issue 2 years ago • 2 comments

Project https://playcanvas.com/project/1044972/overview/f-playcanvasomnilight

Clear coat and very high Glossiness materials have black outlines with area lights image

The disc light has a 'fuzziness' black area when an object is close to it image

Reported to only happen on Mac and iOS.

yaustar avatar Mar 01 '23 09:03 yaustar

Another mention of this: https://forum.playcanvas.com/t/issue-with-area-light-area-lights-creating-a-black-spot-and-black-line/35153

cloned repro project: https://playcanvas.com/project/1197986/overview/area-light-issue-fork

mvaligursky avatar Mar 07 '24 14:03 mvaligursky

Potentially related:

I noticed this code using vNormalW, which is wrong. https://github.com/playcanvas/engine/blob/main/src/scene/shader-lib/chunks/lit/frag/ltc.js#L106

It should either have worldNormal passed in or it should use litArgs_worldNormal directly.

(vNormalW is the pre-normalised vertex attribute which doesn't include normalmap perturbation etc and isn't normalised).

slimbuck avatar May 07 '24 16:05 slimbuck

This is fixed by https://github.com/playcanvas/engine/pull/7015

before: Screenshot 2024-10-09 at 11 40 40 now Screenshot 2024-10-09 at 11 40 46

mvaligursky avatar Oct 09 '24 10:10 mvaligursky