Archived
1
Fork 0

Adjust point light sizes for example scene

This commit is contained in:
Joshua Goins 2022-02-15 09:03:05 -05:00
parent 840a1e861f
commit d30869cc5e

View file

@ -20,11 +20,13 @@ void ExampleApp::initialize_render() {
camera_obj = scene->add_object(); camera_obj = scene->add_object();
auto& camera = scene->add<Camera>(camera_obj); auto& camera = scene->add<Camera>(camera_obj);
camera.near = 0.1f;
auto sun_obj = scene->add_object(); auto sun_obj = scene->add_object();
auto& sun = scene->add<Light>(sun_obj); auto& sun = scene->add<Light>(sun_obj);
sun.type = Light::Type::Point; sun.type = Light::Type::Point;
sun.use_dynamic_shadows = true; sun.use_dynamic_shadows = true;
sun.size = 25.0f;
auto& sun_trans = scene->get<Transform>(sun_obj); auto& sun_trans = scene->get<Transform>(sun_obj);
sun_trans.position = {-2, 5, 1}; sun_trans.position = {-2, 5, 1};
@ -33,6 +35,7 @@ void ExampleApp::initialize_render() {
second_sun.type = Light::Type::Point; second_sun.type = Light::Type::Point;
second_sun.color = {1, 0, 0}; second_sun.color = {1, 0, 0};
second_sun.use_dynamic_shadows = true; second_sun.use_dynamic_shadows = true;
second_sun.size = 25.0f;
scene->get<Transform>(second_sun_obj).position = {-14, 1, -1}; scene->get<Transform>(second_sun_obj).position = {-14, 1, -1};
auto third_sun_obj = scene->add_object(); auto third_sun_obj = scene->add_object();
@ -40,6 +43,7 @@ void ExampleApp::initialize_render() {
third_sun.type = Light::Type::Point; third_sun.type = Light::Type::Point;
third_sun.color = {0, 0, 1}; third_sun.color = {0, 0, 1};
third_sun.use_dynamic_shadows = true; third_sun.use_dynamic_shadows = true;
third_sun.size = 25.0f;
scene->get<Transform>(third_sun_obj).position = {3, 1, -1}; scene->get<Transform>(third_sun_obj).position = {3, 1, -1};
main_object = scene->add_object(); main_object = scene->add_object();