diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 9d64026c424..058e8e61da9 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -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 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. diff --git a/drivers/gles3/storage/light_storage.cpp b/drivers/gles3/storage/light_storage.cpp index f58f769b3e4..6fda0af6f24 100644 --- a/drivers/gles3/storage/light_storage.cpp +++ b/drivers/gles3/storage/light_storage.cpp @@ -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) { - ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe); - ERR_FAIL_NULL(reflection_probe); - - reflection_probe->resolution = p_resolution; + 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."); } AABB LightStorage::reflection_probe_get_aabb(RID p_probe) const { diff --git a/drivers/gles3/storage/light_storage.h b/drivers/gles3/storage/light_storage.h index 1e7dc195dbc..167e9d88bc0 100644 --- a/drivers/gles3/storage/light_storage.h +++ b/drivers/gles3/storage/light_storage.h @@ -113,7 +113,6 @@ struct LightInstance { struct ReflectionProbe { RS::ReflectionProbeUpdateMode update_mode = RS::REFLECTION_PROBE_UPDATE_ONCE; - int resolution = 256; float intensity = 1.0; float blend_distance = 1.0; RS::ReflectionProbeAmbientMode ambient_mode = RS::REFLECTION_PROBE_AMBIENT_ENVIRONMENT; diff --git a/servers/rendering/renderer_rd/storage_rd/light_storage.cpp b/servers/rendering/renderer_rd/storage_rd/light_storage.cpp index bfbf85aa350..b11170888ef 100644 --- a/servers/rendering/renderer_rd/storage_rd/light_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/light_storage.cpp @@ -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) { - ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe); - ERR_FAIL_NULL(reflection_probe); - ERR_FAIL_COND(p_resolution < 32); - - reflection_probe->resolution = p_resolution; + 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."); } 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; } -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 { const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe); ERR_FAIL_NULL_V(reflection_probe, 1.0); diff --git a/servers/rendering/renderer_rd/storage_rd/light_storage.h b/servers/rendering/renderer_rd/storage_rd/light_storage.h index 0d60da5811e..b5fbe7826a5 100644 --- a/servers/rendering/renderer_rd/storage_rd/light_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/light_storage.h @@ -220,7 +220,6 @@ private: struct ReflectionProbe { RS::ReflectionProbeUpdateMode update_mode = RS::REFLECTION_PROBE_UPDATE_ONCE; - int resolution = 256; float intensity = 1.0; float blend_distance = 1.0; 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_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; virtual bool reflection_probe_renders_shadows(RID p_probe) const override; diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index a2b7ae4faf9..ebf327e9d73 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -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(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(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_count", PROPERTY_HINT_RANGE, "0,256,1"), 64); GLOBAL_DEF_RST("rendering/reflections/specular_occlusion/enabled", true);