public void BeginCull(CullRequest.Set cullRequest) { Assert.IsNotNull(cullRequest); cullRequest.Clear(); if (m_Material == null) { return; } if (cullRequest.cullingGroup != null) { Debug.LogError("Begin/EndCull() called out of sequence for decal projectors."); } // let the culling group code do some of the heavy lifting for global draw distance m_BoundingDistances[0] = DecalSystem.instance.DrawDistance; m_NumResults = 0; var cullingGroup = CullingGroupManager.instance.Alloc(); cullingGroup.targetCamera = instance.CurrentCamera; cullingGroup.SetDistanceReferencePoint(cullingGroup.targetCamera.transform.position); cullingGroup.SetBoundingDistances(m_BoundingDistances); cullingGroup.SetBoundingSpheres(m_BoundingSpheres); cullingGroup.SetBoundingSphereCount(m_DecalsCount); cullRequest.Initialize(0, cullingGroup); }
public void EndCull(CullRequest.Set request) { if (m_Material == null) { return; } if (request.cullingGroup == null) { Debug.LogError("Begin/EndCull() called out of sequence for decal projectors."); } else { request.Clear(); } }