mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Prompt editor restart when reflection probe size is updated
Also formally deprecate the RS function for updating an individual probes size. The functionality was removed in 4.0, but the function itself was mistakenly left exposed.
This commit is contained in:
parent
8d8041bd4d
commit
aa8bc0b56d
6 changed files with 5 additions and 22 deletions
|
@ -3350,12 +3350,12 @@
|
||||||
Sets the render reflection mask for this reflection probe. Only instances with a matching layer will have reflections applied from this probe. Equivalent to [member ReflectionProbe.reflection_mask].
|
Sets the render reflection mask for this reflection probe. Only instances with a matching layer will have reflections applied from this probe. Equivalent to [member ReflectionProbe.reflection_mask].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="reflection_probe_set_resolution">
|
<method name="reflection_probe_set_resolution" deprecated="This method has not done anything since Godot 3.">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<param index="0" name="probe" type="RID" />
|
<param index="0" name="probe" type="RID" />
|
||||||
<param index="1" name="resolution" type="int" />
|
<param index="1" name="resolution" type="int" />
|
||||||
<description>
|
<description>
|
||||||
Sets the resolution to use when rendering the specified reflection probe. The [param resolution] is specified for each cubemap face: for instance, specifying [code]512[/code] will allocate 6 faces of 512×512 each (plus mipmaps for roughness levels).
|
Deprecated. This method does nothing.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="reflection_probe_set_size">
|
<method name="reflection_probe_set_size">
|
||||||
|
|
|
@ -562,10 +562,7 @@ void LightStorage::reflection_probe_set_reflection_mask(RID p_probe, uint32_t p_
|
||||||
}
|
}
|
||||||
|
|
||||||
void LightStorage::reflection_probe_set_resolution(RID p_probe, int p_resolution) {
|
void LightStorage::reflection_probe_set_resolution(RID p_probe, int p_resolution) {
|
||||||
ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
|
WARN_PRINT_ONCE("reflection_probe_set_resolution is not available in Godot 4. ReflectionProbe size is configured in the project settings with the rendering/reflections/reflection_atlas/reflection_size setting.");
|
||||||
ERR_FAIL_NULL(reflection_probe);
|
|
||||||
|
|
||||||
reflection_probe->resolution = p_resolution;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AABB LightStorage::reflection_probe_get_aabb(RID p_probe) const {
|
AABB LightStorage::reflection_probe_get_aabb(RID p_probe) const {
|
||||||
|
|
|
@ -113,7 +113,6 @@ struct LightInstance {
|
||||||
|
|
||||||
struct ReflectionProbe {
|
struct ReflectionProbe {
|
||||||
RS::ReflectionProbeUpdateMode update_mode = RS::REFLECTION_PROBE_UPDATE_ONCE;
|
RS::ReflectionProbeUpdateMode update_mode = RS::REFLECTION_PROBE_UPDATE_ONCE;
|
||||||
int resolution = 256;
|
|
||||||
float intensity = 1.0;
|
float intensity = 1.0;
|
||||||
float blend_distance = 1.0;
|
float blend_distance = 1.0;
|
||||||
RS::ReflectionProbeAmbientMode ambient_mode = RS::REFLECTION_PROBE_AMBIENT_ENVIRONMENT;
|
RS::ReflectionProbeAmbientMode ambient_mode = RS::REFLECTION_PROBE_AMBIENT_ENVIRONMENT;
|
||||||
|
|
|
@ -1169,11 +1169,7 @@ void LightStorage::reflection_probe_set_reflection_mask(RID p_probe, uint32_t p_
|
||||||
}
|
}
|
||||||
|
|
||||||
void LightStorage::reflection_probe_set_resolution(RID p_probe, int p_resolution) {
|
void LightStorage::reflection_probe_set_resolution(RID p_probe, int p_resolution) {
|
||||||
ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
|
WARN_PRINT_ONCE("reflection_probe_set_resolution is not available in Godot 4. ReflectionProbe size is configured in the project settings with the rendering/reflections/reflection_atlas/reflection_size setting.");
|
||||||
ERR_FAIL_NULL(reflection_probe);
|
|
||||||
ERR_FAIL_COND(p_resolution < 32);
|
|
||||||
|
|
||||||
reflection_probe->resolution = p_resolution;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LightStorage::reflection_probe_set_mesh_lod_threshold(RID p_probe, float p_ratio) {
|
void LightStorage::reflection_probe_set_mesh_lod_threshold(RID p_probe, float p_ratio) {
|
||||||
|
@ -1259,13 +1255,6 @@ float LightStorage::reflection_probe_get_mesh_lod_threshold(RID p_probe) const {
|
||||||
return reflection_probe->mesh_lod_threshold;
|
return reflection_probe->mesh_lod_threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LightStorage::reflection_probe_get_resolution(RID p_probe) const {
|
|
||||||
const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
|
|
||||||
ERR_FAIL_NULL_V(reflection_probe, 0);
|
|
||||||
|
|
||||||
return reflection_probe->resolution;
|
|
||||||
}
|
|
||||||
|
|
||||||
float LightStorage::reflection_probe_get_baked_exposure(RID p_probe) const {
|
float LightStorage::reflection_probe_get_baked_exposure(RID p_probe) const {
|
||||||
const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
|
const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
|
||||||
ERR_FAIL_NULL_V(reflection_probe, 1.0);
|
ERR_FAIL_NULL_V(reflection_probe, 1.0);
|
||||||
|
|
|
@ -220,7 +220,6 @@ private:
|
||||||
|
|
||||||
struct ReflectionProbe {
|
struct ReflectionProbe {
|
||||||
RS::ReflectionProbeUpdateMode update_mode = RS::REFLECTION_PROBE_UPDATE_ONCE;
|
RS::ReflectionProbeUpdateMode update_mode = RS::REFLECTION_PROBE_UPDATE_ONCE;
|
||||||
int resolution = 256;
|
|
||||||
float intensity = 1.0;
|
float intensity = 1.0;
|
||||||
float blend_distance = 1.0;
|
float blend_distance = 1.0;
|
||||||
RS::ReflectionProbeAmbientMode ambient_mode = RS::REFLECTION_PROBE_AMBIENT_ENVIRONMENT;
|
RS::ReflectionProbeAmbientMode ambient_mode = RS::REFLECTION_PROBE_AMBIENT_ENVIRONMENT;
|
||||||
|
@ -864,7 +863,6 @@ public:
|
||||||
virtual float reflection_probe_get_origin_max_distance(RID p_probe) const override;
|
virtual float reflection_probe_get_origin_max_distance(RID p_probe) const override;
|
||||||
virtual float reflection_probe_get_mesh_lod_threshold(RID p_probe) const override;
|
virtual float reflection_probe_get_mesh_lod_threshold(RID p_probe) const override;
|
||||||
|
|
||||||
int reflection_probe_get_resolution(RID p_probe) const;
|
|
||||||
float reflection_probe_get_baked_exposure(RID p_probe) const;
|
float reflection_probe_get_baked_exposure(RID p_probe) const;
|
||||||
virtual bool reflection_probe_renders_shadows(RID p_probe) const override;
|
virtual bool reflection_probe_renders_shadows(RID p_probe) const override;
|
||||||
|
|
||||||
|
|
|
@ -3649,7 +3649,7 @@ void RenderingServer::init() {
|
||||||
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/reflections/sky_reflections/ggx_samples", PROPERTY_HINT_RANGE, "0,256,1"), 32);
|
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/reflections/sky_reflections/ggx_samples", PROPERTY_HINT_RANGE, "0,256,1"), 32);
|
||||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/reflections/sky_reflections/ggx_samples.mobile", PROPERTY_HINT_RANGE, "0,128,1"), 16);
|
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/reflections/sky_reflections/ggx_samples.mobile", PROPERTY_HINT_RANGE, "0,128,1"), 16);
|
||||||
GLOBAL_DEF("rendering/reflections/sky_reflections/fast_filter_high_quality", false);
|
GLOBAL_DEF("rendering/reflections/sky_reflections/fast_filter_high_quality", false);
|
||||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/reflections/reflection_atlas/reflection_size", PROPERTY_HINT_RANGE, "0,4096,1"), 256);
|
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/reflections/reflection_atlas/reflection_size", PROPERTY_HINT_RANGE, "0,4096,1"), 256);
|
||||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/reflections/reflection_atlas/reflection_size.mobile", PROPERTY_HINT_RANGE, "0,2048,1"), 128);
|
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/reflections/reflection_atlas/reflection_size.mobile", PROPERTY_HINT_RANGE, "0,2048,1"), 128);
|
||||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/reflections/reflection_atlas/reflection_count", PROPERTY_HINT_RANGE, "0,256,1"), 64);
|
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/reflections/reflection_atlas/reflection_count", PROPERTY_HINT_RANGE, "0,256,1"), 64);
|
||||||
GLOBAL_DEF_RST("rendering/reflections/specular_occlusion/enabled", true);
|
GLOBAL_DEF_RST("rendering/reflections/specular_occlusion/enabled", true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue