Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use better defaults for physically based camera parameters #4617

Merged
merged 1 commit into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/framework/components/camera/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ class CameraComponent extends Component {
}

/**
* Set camera aperture in f-stops, the default value is 1.0. Higher value means less exposure.
* Set camera aperture in f-stops, the default value is 16.0. Higher value means less exposure.
*
* @type {number}
*/
Expand All @@ -405,7 +405,7 @@ class CameraComponent extends Component {
}

/**
* Set camera sensitivity in ISO, the default value is 100. Higher value means more exposure.
* Set camera sensitivity in ISO, the default value is 1000. Higher value means more exposure.
*
* @type {number}
*/
Expand All @@ -418,7 +418,7 @@ class CameraComponent extends Component {
}

/**
* Set camera shutter speed in seconds, the default value is 1s. Longer shutter means more exposure.
* Set camera shutter speed in seconds, the default value is 1/1000s. Longer shutter means more exposure.
*
* @type {number}
*/
Expand Down
6 changes: 3 additions & 3 deletions src/scene/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ class Camera {
this._renderTarget = null;
this._scissorRect = new Vec4(0, 0, 1, 1);
this._scissorRectClear = false; // by default rect is used when clearing. this allows scissorRect to be used when clearing.
this._aperture = 1.0;
this._shutter = 1;
this._sensitivity = 100;
this._aperture = 16.0;
this._shutter = 1.0 / 1000.0;
this._sensitivity = 1000;

this._projMat = new Mat4();
this._projMatDirty = true;
Expand Down