Solve artifact with clustering of lights

Changed how a spot light is detected when sampling light, which caused false positives and produced
that visual artifact when a cluster/pixel was detected incorrectly as being lit with a spot light when maybe none were there.
This issue seems somewhat related to that issue that prevents rendering spotlights and point lights shadow at the same time.
This commit is contained in:
N8n5h 2020-12-27 16:02:35 -03:00
parent 3e819d7e99
commit 893b313643

View file

@ -403,7 +403,7 @@ void main() {
, li, lightsArray[li * 2].w, true // bias
#endif
#ifdef _Spot
, li > numPoints - 1
, lightsArray[li * 2 + 1].w != 0.0
, lightsArray[li * 2 + 1].w // cutoff
, lightsArraySpot[li].w // cutoff - exponent
, lightsArraySpot[li].xyz // spotDir