Modified SceneNode::FrustumCull
Now provides an implementation which will test the bounding volume against the frustum (Basic frustum culling) Is now const Disabled face culling on sprites Former-commit-id: 5cb7a94b38ef8b0ffa5a78f16f5ef65a59ab375d
This commit is contained in:
@@ -229,7 +229,7 @@ void NzLight::Disable(const NzShader* shader, const NzLightUniforms& uniforms, i
|
||||
shader->SendInteger(uniforms.locations.type + offset, -1);
|
||||
}
|
||||
|
||||
bool NzLight::FrustumCull(const NzFrustumf& frustum)
|
||||
bool NzLight::FrustumCull(const NzFrustumf& frustum) const
|
||||
{
|
||||
switch (m_type)
|
||||
{
|
||||
@@ -244,10 +244,7 @@ bool NzLight::FrustumCull(const NzFrustumf& frustum)
|
||||
return frustum.Contains(NzSpheref(m_derivedPosition, m_radius));
|
||||
|
||||
case nzLightType_Spot:
|
||||
if (!m_boundingVolumeUpdated)
|
||||
UpdateBoundingVolume();
|
||||
|
||||
return frustum.Contains(m_boundingVolume);
|
||||
return NzSceneNode::FrustumCull(frustum);
|
||||
}
|
||||
|
||||
NazaraError("Invalid light type (0x" + NzString::Number(m_type, 16) + ')');
|
||||
|
||||
Reference in New Issue
Block a user