~thestr4ng3r/lavos

78e12184f6414812f11283d80c7ebe7df7c7ed37 — Florian Märkl 3 years ago 09c4dd7
Fix Spot Lights without Shadows
1 files changed, 3 insertions(+), 2 deletions(-)

M lavos/src/renderer.cpp
M lavos/src/renderer.cpp => lavos/src/renderer.cpp +3 -2
@@ 275,9 275,10 @@ void Renderer::UpdateShadowDescriptors(LightCollection *light_collection)
	{
		vk::ImageView image_view;
		vk::Sampler sampler;
		if(i < light_collection->spot_lights.size())
		SpotLightShadow *shadow;
		if(i < light_collection->spot_lights.size()
				&& (shadow = light_collection->spot_lights[i]->GetShadow()))
		{
			SpotLightShadow *shadow = light_collection->spot_lights[i]->GetShadow();
			image_view = shadow->GetFinalImageView();
			sampler = shadow->GetSampler();
		}