File tree Expand file tree Collapse file tree
Packages/com.unity.render-pipelines.universal/Runtime/2D/Shadows Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -274,9 +274,9 @@ internal bool IsLit(Light2D light)
274274 {
275275 // Oddly adding and subtracting vectors is expensive here because of the new structures created...
276276 Vector3 deltaPos ;
277- deltaPos . x = light . m_CachedPosition . x - boundingSphere . position . x ;
278- deltaPos . y = light . m_CachedPosition . y - boundingSphere . position . y ;
279- deltaPos . z = light . m_CachedPosition . z - boundingSphere . position . z ;
277+ deltaPos . x = light . boundingSphere . position . x - boundingSphere . position . x ;
278+ deltaPos . y = light . boundingSphere . position . y - boundingSphere . position . y ;
279+ deltaPos . z = light . boundingSphere . position . z - boundingSphere . position . z ;
280280
281281 float distanceSq = Vector3 . SqrMagnitude ( deltaPos ) ;
282282
You can’t perform that action at this time.
0 commit comments