Graphics/ForwardRenderTechnique: Fix light selection
This commit is contained in:
parent
5aa0c362a6
commit
997a874c0e
|
|
@ -208,7 +208,7 @@ namespace Nz
|
||||||
inline bool ForwardRenderTechnique::IsPointLightSuitable(const Spheref& object, const AbstractRenderQueue::PointLight& light)
|
inline bool ForwardRenderTechnique::IsPointLightSuitable(const Spheref& object, const AbstractRenderQueue::PointLight& light)
|
||||||
{
|
{
|
||||||
// If the object is too far away from this point light, there is not way it could light it
|
// If the object is too far away from this point light, there is not way it could light it
|
||||||
return object.Contains(light.position);
|
return object.Intersect(Spheref(light.position, light.radius));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -222,6 +222,6 @@ namespace Nz
|
||||||
inline bool ForwardRenderTechnique::IsSpotLightSuitable(const Spheref& object, const AbstractRenderQueue::SpotLight& light)
|
inline bool ForwardRenderTechnique::IsSpotLightSuitable(const Spheref& object, const AbstractRenderQueue::SpotLight& light)
|
||||||
{
|
{
|
||||||
///TODO: Exclude spot lights based on their direction and outer angle?
|
///TODO: Exclude spot lights based on their direction and outer angle?
|
||||||
return object.Contains(light.position);
|
return object.Intersect(Spheref(light.position, light.radius));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue