Choose 0.1 as a new reasonable default for camera near plane
This commit is contained in:
parent
c6da6e05ce
commit
e7c157bb7b
2 changed files with 2 additions and 3 deletions
|
@ -97,7 +97,7 @@ struct Light {
|
||||||
|
|
||||||
struct Camera {
|
struct Camera {
|
||||||
float fov = 75.0f;
|
float fov = 75.0f;
|
||||||
float near = 1.0f;
|
float near = 0.1f;
|
||||||
float exposure = 1.0f;
|
float exposure = 1.0f;
|
||||||
|
|
||||||
Matrix4x4 view, perspective;
|
Matrix4x4 view, perspective;
|
||||||
|
|
|
@ -15,8 +15,7 @@ void ExampleApp::initialize_render() {
|
||||||
auto scene = engine->create_empty_scene();
|
auto scene = engine->create_empty_scene();
|
||||||
|
|
||||||
camera_obj = scene->add_object();
|
camera_obj = scene->add_object();
|
||||||
auto& camera = scene->add<Camera>(camera_obj);
|
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);
|
||||||
|
|
Reference in a new issue