diff options
author | clayjohn <claynjohn@gmail.com> | 2020-07-10 17:07:30 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2020-07-11 00:10:15 -0700 |
commit | a54f93c169d8bacb05b210ed585b3e8a5354cca0 (patch) | |
tree | f9dbd621f802f6ebc505f45888a1902a094302ed /scene | |
parent | 0fa165f0c936411a775bb41f362da394074b797f (diff) |
Add incremental update mode to sky
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/sky.cpp | 6 | ||||
-rw-r--r-- | scene/resources/sky.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/scene/resources/sky.cpp b/scene/resources/sky.cpp index 38d1346541..7e32516f94 100644 --- a/scene/resources/sky.cpp +++ b/scene/resources/sky.cpp @@ -83,8 +83,8 @@ void Sky::_bind_methods() { ClassDB::bind_method(D_METHOD("get_material"), &Sky::get_material); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "sky_material", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,PanoramaSkyMaterial,ProceduralSkyMaterial,PhysicalSkyMaterial"), "set_material", "get_material"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Automatic,HighQuality,HighQualityIncremental,RealTime"), "set_process_mode", "get_process_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "radiance_size", PROPERTY_HINT_ENUM, "32,64,128,256,512,1024,2048"), "set_radiance_size", "get_radiance_size"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "HighQuality,RealTime"), "set_process_mode", "get_process_mode"); BIND_ENUM_CONSTANT(RADIANCE_SIZE_32); BIND_ENUM_CONSTANT(RADIANCE_SIZE_64); @@ -95,12 +95,14 @@ void Sky::_bind_methods() { BIND_ENUM_CONSTANT(RADIANCE_SIZE_2048); BIND_ENUM_CONSTANT(RADIANCE_SIZE_MAX); + BIND_ENUM_CONSTANT(PROCESS_MODE_AUTOMATIC); BIND_ENUM_CONSTANT(PROCESS_MODE_QUALITY); + BIND_ENUM_CONSTANT(PROCESS_MODE_INCREMENTAL); BIND_ENUM_CONSTANT(PROCESS_MODE_REALTIME); } Sky::Sky() { - mode = PROCESS_MODE_QUALITY; + mode = PROCESS_MODE_AUTOMATIC; radiance_size = RADIANCE_SIZE_256; sky = RS::get_singleton()->sky_create(); } diff --git a/scene/resources/sky.h b/scene/resources/sky.h index 37f0a589f9..06704b35ea 100644 --- a/scene/resources/sky.h +++ b/scene/resources/sky.h @@ -51,7 +51,9 @@ public: }; enum ProcessMode { + PROCESS_MODE_AUTOMATIC, PROCESS_MODE_QUALITY, + PROCESS_MODE_INCREMENTAL, PROCESS_MODE_REALTIME }; |