Archived
1
Fork 0

Don't render shadows unless it's actually enabled on the light

This commit is contained in:
Joshua Goins 2022-02-07 15:52:11 -05:00
parent ad29cf3174
commit 8816d64e42

View file

@ -98,6 +98,9 @@ void ShadowPass::render(GFXCommandBuffer* command_buffer, Scene& scene) {
auto lights = scene.get_all<Light>();
for(auto [obj, light] : lights) {
if(!light.enable_shadows)
continue;
switch(light.type) {
case Light::Type::Sun:
render_sun(command_buffer, scene, obj, light);