Don't render shadows unless it's actually enabled on the light
This commit is contained in:
parent
ad29cf3174
commit
8816d64e42
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Reference in a new issue