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:
parent
3e819d7e99
commit
893b313643
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue