-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Physically based camera #4585
Physically based camera #4585
Conversation
Added flag to enable/disable physically based camera.
Also added getters, setters and copying of physically based camera parameters.
82f00ac
to
3cb2bdb
Compare
Co-authored-by: Will Eastcott <[email protected]>
} | ||
|
||
/** | ||
* Set camera shutter speed in seconds, the default value is 1s. Longer shutter means more exposure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really not sure about 1s as a default here. What are we going to do in the future when we perhaps add a motion blur? I think the default value should be something that would work reasonably well for future purposes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressing that here:
set aperture(newValue) { | ||
this._aperture = newValue; | ||
} | ||
|
||
get aperture() { | ||
return this._aperture; | ||
} | ||
|
||
set sensitivity(newValue) { | ||
this._sensitivity = newValue; | ||
} | ||
|
||
get sensitivity() { | ||
return this._sensitivity; | ||
} | ||
|
||
set shutter(newValue) { | ||
this._shutter = newValue; | ||
} | ||
|
||
get shutter() { | ||
return this._shutter; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently these functions do nothing other than se / return the value. Personally, I'd remove them, and just rename the private variables to not have underscores in them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was just to have it be consistent with the other parameters, like clearDepth and clearDepthBuffer, etc.
Description
Initial PR for physical light units #3252 by enabling the use of physically based camera properties. The default properties (f/1.0, ISO 100, 1s) could have an effect on the overall lighting in the scene, so these are behind a switch.