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 @@ -279,9 +279,9 @@ internal bool IsLit(Light2D light)
279279 {
280280 // Oddly adding and subtracting vectors is expensive here because of the new structures created...
281281 Vector3 deltaPos ;
282- deltaPos . x = light . m_CachedPosition . x - boundingSphere . position . x ;
283- deltaPos . y = light . m_CachedPosition . y - boundingSphere . position . y ;
284- deltaPos . z = light . m_CachedPosition . z - boundingSphere . position . z ;
282+ deltaPos . x = light . boundingSphere . position . x - boundingSphere . position . x ;
283+ deltaPos . y = light . boundingSphere . position . y - boundingSphere . position . y ;
284+ deltaPos . z = light . boundingSphere . position . z - boundingSphere . position . z ;
285285
286286 float distanceSq = Vector3 . SqrMagnitude ( deltaPos ) ;
287287
You can’t perform that action at this time.
0 commit comments