Implement Physical Light Units as an optional setting.
This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value. In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
This commit is contained in:
1 parent
736632ee7e
commit
385ee5c70b
131 files changed
+2692
-1283
No files matched your search
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "material_editor_plugin.h"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
@@ -161,6 +162,10 @@ MaterialEditor::MaterialEditor() {
|
||||
// without much distortion.
|
||||
camera->set_perspective(20, 0.1, 10);
|
||||
camera->make_current();
|
||||
if (GLOBAL_GET("rendering/lights_and_shadows/use_physical_light_units")) {
|
||||
camera_attributes.instantiate();
|
||||
camera->set_attributes(camera_attributes);
|
||||
}
|
||||
viewport->add_child(camera);
|
||||
|
||||
light1 = memnew(DirectionalLight3D);
|
||||
|
||||
Reference in new issue
Block a user