From 997a874c0e7f8d646b6c92a71b596660ae09099e Mon Sep 17 00:00:00 2001 From: Lynix Date: Thu, 15 Dec 2016 23:55:35 +0100 Subject: [PATCH] Graphics/ForwardRenderTechnique: Fix light selection --- include/Nazara/Graphics/ForwardRenderTechnique.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/Nazara/Graphics/ForwardRenderTechnique.inl b/include/Nazara/Graphics/ForwardRenderTechnique.inl index 208aa9f81..07b735dac 100644 --- a/include/Nazara/Graphics/ForwardRenderTechnique.inl +++ b/include/Nazara/Graphics/ForwardRenderTechnique.inl @@ -208,7 +208,7 @@ namespace Nz 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 - 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) { ///TODO: Exclude spot lights based on their direction and outer angle? - return object.Contains(light.position); + return object.Intersect(Spheref(light.position, light.radius)); } }