diff options
Diffstat (limited to 'c2.cpp')
-rw-r--r-- | c2.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -754,7 +754,7 @@ struct C2 : public App { auto sun = world->create_entity(); auto [light] = world->add<Sun_Light>(sun); light.colour = v3f(1.0f, 0.95f, 0.80f); - light.dir = v3f(0.57f, 0.57f, 0.57f); + light.dir = v3f(-0.57f, 0.57f, 0.57f); light.brightness = 1.0f; light.caster = true; } @@ -889,15 +889,15 @@ struct C2 : public App { renderer.env_cubemap = eprobe.get_cubemap(); renderer.clamped_linear = clamped_linear; - renderer.drawlists[FORWARD].camera = camera; - renderer.drawlists[SHADOW_MAP_START].camera = camera; + renderer.setcam(FORWARD, camera); Texture& bb = dev->get_texture(hdr_target); pcam.asp = (float)bb.w / (float)bb.h; orbit_cam.update_orbit(*this); pcam.update(); - lighting.update(dev, ctx, *world); + lighting.update(dev, ctx, *world, renderer, scene); update_scene(scene, dev, lighting, pcam, *world); + lr.add_box(scene.bound); ctx.debug_push("scene"); renderer.render( dev, @@ -1004,7 +1004,7 @@ struct C2 : public App { quad.destroy(dev); scene.destroy(dev); sky.destroy(dev); - lighting.destroy(dev); + lighting.destroy(dev, renderer); lr.destroy(dev); eprobe.destroy(dev); tonemap.destroy(dev); |