diff options
-rw-r--r-- | core/math/bvh.h | 2 | ||||
-rw-r--r-- | doc/classes/Environment.xml | 4 | ||||
-rw-r--r-- | doc/classes/ProceduralSkyMaterial.xml | 2 | ||||
-rw-r--r-- | editor/editor_resource_preview.cpp | 2 | ||||
-rw-r--r-- | modules/bullet/soft_body_bullet.cpp | 8 | ||||
-rw-r--r-- | modules/theora/video_stream_theora.cpp | 2 | ||||
-rw-r--r-- | modules/webm/video_stream_webm.cpp | 2 | ||||
-rw-r--r-- | scene/2d/joint_2d.cpp | 5 | ||||
-rw-r--r-- | scene/3d/voxel_gi.cpp | 2 | ||||
-rw-r--r-- | scene/3d/voxelizer.cpp | 3 | ||||
-rw-r--r-- | scene/gui/control.h | 2 | ||||
-rw-r--r-- | scene/resources/environment.cpp | 4 | ||||
-rw-r--r-- | scene/resources/sky_material.cpp | 14 | ||||
-rw-r--r-- | servers/rendering/renderer_canvas_cull.h | 2 | ||||
-rw-r--r-- | servers/rendering/renderer_scene_cull.h | 2 | ||||
-rw-r--r-- | servers/rendering/renderer_viewport.h | 6 | ||||
-rw-r--r-- | servers/rendering/rendering_server_default.cpp | 2 | ||||
-rw-r--r-- | servers/rendering_server.h | 2 |
18 files changed, 34 insertions, 32 deletions
diff --git a/core/math/bvh.h b/core/math/bvh.h index cefbc9b0db..65b8b102a3 100644 --- a/core/math/bvh.h +++ b/core/math/bvh.h @@ -200,7 +200,7 @@ public: // use in conjunction with activate if you have deferred the collision check, and // set pairable has never been called. - // (deferred collision checks are a workaround for visual server for historical reasons) + // (deferred collision checks are a workaround for rendering server for historical reasons) void force_collision_check(BVHHandle p_handle) { if (USE_PAIRS) { // the aabb should already be up to date in the BVH diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index c7123bb75b..98b0de6ce1 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -202,10 +202,10 @@ If [code]true[/code], screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [VoxelGI]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others. </member> <member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" default="0.15"> - The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). + The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). Only positive values are valid (negative values will be clamped to [code]0.0[/code]). </member> <member name="ss_reflections_fade_out" type="float" setter="set_ssr_fade_out" getter="get_ssr_fade_out" default="2.0"> - The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. + The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to [code]0.0[/code]). </member> <member name="ss_reflections_max_steps" type="int" setter="set_ssr_max_steps" getter="get_ssr_max_steps" default="64"> The maximum number of steps for screen-space reflections. Higher values are slower. diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml index 02e6a2d9f8..e3db74894b 100644 --- a/doc/classes/ProceduralSkyMaterial.xml +++ b/doc/classes/ProceduralSkyMaterial.xml @@ -5,7 +5,7 @@ </brief_description> <description> ProceduralSkyMaterial provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly, the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky. - The [ProceduralSkyMaterial] uses a lightweight shader to draw the sky and is thus suited for real time updates. When you do not need a quick sky that is not realistic, this is a good option. + The [ProceduralSkyMaterial] uses a lightweight shader to draw the sky and is thus suited for real time updates. When you do not need a quick sky that is not realistic, this is a good option. If you need a more realistic option, try using [PhysicalSkyMaterial] instead. The [ProceduralSkyMaterial] supports up to 4 suns. Each sun takes its color, energy, and direction from the corresponding [DirectionalLight3D] in the scene. </description> <tutorials> diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 8fc1345f3e..8783fe4fc0 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -439,7 +439,7 @@ void EditorResourcePreview::stop() { preview_sem.post(); while (!exited.is_set()) { OS::get_singleton()->delay_usec(10000); - RenderingServer::get_singleton()->sync(); //sync pending stuff, as thread may be blocked on visual server + RenderingServer::get_singleton()->sync(); //sync pending stuff, as thread may be blocked on rendering server } thread.wait_to_finish(); } diff --git a/modules/bullet/soft_body_bullet.cpp b/modules/bullet/soft_body_bullet.cpp index 371800d8f3..81b832fb42 100644 --- a/modules/bullet/soft_body_bullet.cpp +++ b/modules/bullet/soft_body_bullet.cpp @@ -71,7 +71,7 @@ void SoftBodyBullet::update_rendering_server(RenderingServerHandler *p_rendering return; } - /// Update visual server vertices + /// Update rendering server vertices const btSoftBody::tNodeArray &nodes(bt_soft_body->m_nodes); const int nodes_count = nodes.size(); @@ -298,11 +298,11 @@ bool SoftBodyBullet::set_trimesh_body_shape(Vector<int> p_indices, Vector<Vector ERR_FAIL_COND_V(p_indices.is_empty(), false); ERR_FAIL_COND_V(p_vertices.is_empty(), false); - /// Parse visual server indices to physical indices. - /// Merge all overlapping vertices and create a map of physical vertices to visual server + /// Parse rendering server indices to physical indices. + /// Merge all overlapping vertices and create a map of physical vertices to rendering server { - /// This is the map of visual server indices to physics indices (So it's the inverse of idices_map), Thanks to it I don't need make a heavy search in the indices_map + /// This is the map of rendering server indices to physics indices (So it's the inverse of idices_map), Thanks to it I don't need make a heavy search in the indices_map Vector<int> vs_indices_to_physics_table; { // Map vertices diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index 2f6faec8ec..8e80dfffca 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -108,7 +108,7 @@ void VideoStreamPlaybackTheora::video_write() { Ref<Image> img = memnew(Image(size.x, size.y, 0, Image::FORMAT_RGBA8, frame_data)); //zero copy image creation - texture->update(img); //zero copy send to visual server + texture->update(img); //zero copy send to rendering server frames_pending = 1; } diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp index 12e0f5bd25..187a27b6c2 100644 --- a/modules/webm/video_stream_webm.cpp +++ b/modules/webm/video_stream_webm.cpp @@ -311,7 +311,7 @@ void VideoStreamPlaybackWebm::update(float p_delta) { if (converted) { Ref<Image> img = memnew(Image(image.w, image.h, 0, Image::FORMAT_RGBA8, frame_data)); - texture->update(img); //Zero copy send to visual server + texture->update(img); //Zero copy send to rendering server video_frame_done = true; } } diff --git a/scene/2d/joint_2d.cpp b/scene/2d/joint_2d.cpp index 3b371d4a07..8a528151cf 100644 --- a/scene/2d/joint_2d.cpp +++ b/scene/2d/joint_2d.cpp @@ -74,6 +74,8 @@ void Joint2D::_update_joint(bool p_only_free) { PhysicsBody2D *body_a = Object::cast_to<PhysicsBody2D>(node_a); PhysicsBody2D *body_b = Object::cast_to<PhysicsBody2D>(node_b); + bool valid = false; + if (node_a && !body_a && node_b && !body_b) { warning = TTR("Node A and Node B must be PhysicsBody2Ds"); } else if (node_a && !body_a) { @@ -86,11 +88,12 @@ void Joint2D::_update_joint(bool p_only_free) { warning = TTR("Node A and Node B must be different PhysicsBody2Ds"); } else { warning = String(); + valid = true; } update_configuration_warnings(); - if (!warning.is_empty()) { + if (!valid) { PhysicsServer2D::get_singleton()->joint_clear(joint); return; } diff --git a/scene/3d/voxel_gi.cpp b/scene/3d/voxel_gi.cpp index d3d12d94e9..377abd5b38 100644 --- a/scene/3d/voxel_gi.cpp +++ b/scene/3d/voxel_gi.cpp @@ -398,7 +398,7 @@ void VoxelGI::bake(Node *p_from_node, bool p_create_visual_debug) { baker.end_bake(); - //create the data for visual server + //create the data for rendering server if (p_create_visual_debug) { MultiMeshInstance3D *mmi = memnew(MultiMeshInstance3D); diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp index 04f371f4b2..aa1236521d 100644 --- a/scene/3d/voxelizer.cpp +++ b/scene/3d/voxelizer.cpp @@ -618,7 +618,6 @@ void Voxelizer::begin_bake(int p_subdiv, const AABB &p_bounds) { bake_cells.resize(1); material_cache.clear(); - print_line("subdiv: " + itos(p_subdiv)); //find out the actual real bounds, power of 2, which gets the highest subdivision po2_bounds = p_bounds; int longest_axis = po2_bounds.get_longest_axis_index(); @@ -661,7 +660,7 @@ void Voxelizer::end_bake() { _fixup_plot(0, 0); } -//create the data for visual server +//create the data for rendering server int Voxelizer::get_voxel_gi_octree_depth() const { return cell_subdiv; diff --git a/scene/gui/control.h b/scene/gui/control.h index bdc06319ea..be692b6a0c 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -408,7 +408,7 @@ public: Rect2 get_rect() const; Rect2 get_global_rect() const; Rect2 get_screen_rect() const; - Rect2 get_window_rect() const; ///< use with care, as it blocks waiting for the visual server + Rect2 get_window_rect() const; ///< use with care, as it blocks waiting for the rendering server Rect2 get_anchorable_rect() const override; void set_rect(const Rect2 &p_rect); // Reset anchors to begin and set rect, for faster container children sorting. diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index cb59039852..9a3f081a8b 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -292,7 +292,7 @@ int Environment::get_ssr_max_steps() const { } void Environment::set_ssr_fade_in(float p_fade_in) { - ssr_fade_in = p_fade_in; + ssr_fade_in = MAX(p_fade_in, 0.0f); _update_ssr(); } @@ -301,7 +301,7 @@ float Environment::get_ssr_fade_in() const { } void Environment::set_ssr_fade_out(float p_fade_out) { - ssr_fade_out = p_fade_out; + ssr_fade_out = MAX(p_fade_out, 0.0f); _update_ssr(); } diff --git a/scene/resources/sky_material.cpp b/scene/resources/sky_material.cpp index b6d3c96cb7..de94c92cac 100644 --- a/scene/resources/sky_material.cpp +++ b/scene/resources/sky_material.cpp @@ -175,14 +175,14 @@ void ProceduralSkyMaterial::_bind_methods() { ClassDB::bind_method(D_METHOD("get_sun_curve"), &ProceduralSkyMaterial::get_sun_curve); ADD_GROUP("Sky", "sky_"); - ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sky_top_color"), "set_sky_top_color", "get_sky_top_color"); - ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sky_horizon_color"), "set_sky_horizon_color", "get_sky_horizon_color"); + ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sky_top_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_sky_top_color", "get_sky_top_color"); + ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sky_horizon_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_sky_horizon_color", "get_sky_horizon_color"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_curve", PROPERTY_HINT_EXP_EASING), "set_sky_curve", "get_sky_curve"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sky_energy", "get_sky_energy"); ADD_GROUP("Ground", "ground_"); - ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ground_bottom_color"), "set_ground_bottom_color", "get_ground_bottom_color"); - ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ground_horizon_color"), "set_ground_horizon_color", "get_ground_horizon_color"); + ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ground_bottom_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_ground_bottom_color", "get_ground_bottom_color"); + ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ground_horizon_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_ground_horizon_color", "get_ground_horizon_color"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ground_curve", PROPERTY_HINT_EXP_EASING), "set_ground_curve", "get_ground_curve"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ground_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_ground_energy", "get_ground_energy"); @@ -531,16 +531,16 @@ void PhysicalSkyMaterial::_bind_methods() { ADD_GROUP("Rayleigh", "rayleigh_"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rayleigh_coefficient", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_rayleigh_coefficient", "get_rayleigh_coefficient"); - ADD_PROPERTY(PropertyInfo(Variant::COLOR, "rayleigh_color"), "set_rayleigh_color", "get_rayleigh_color"); + ADD_PROPERTY(PropertyInfo(Variant::COLOR, "rayleigh_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_rayleigh_color", "get_rayleigh_color"); ADD_GROUP("Mie", "mie_"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mie_coefficient", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_mie_coefficient", "get_mie_coefficient"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mie_eccentricity", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_mie_eccentricity", "get_mie_eccentricity"); - ADD_PROPERTY(PropertyInfo(Variant::COLOR, "mie_color"), "set_mie_color", "get_mie_color"); + ADD_PROPERTY(PropertyInfo(Variant::COLOR, "mie_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_mie_color", "get_mie_color"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "turbidity", PROPERTY_HINT_RANGE, "0,1000,0.01"), "set_turbidity", "get_turbidity"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_disk_scale", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_disk_scale", "get_sun_disk_scale"); - ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ground_color"), "set_ground_color", "get_ground_color"); + ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ground_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_ground_color", "get_ground_color"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "exposure", PROPERTY_HINT_RANGE, "0,128,0.01"), "set_exposure", "get_exposure"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dither_strength", PROPERTY_HINT_RANGE, "0,10,0.01"), "set_dither_strength", "get_dither_strength"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "night_sky", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_night_sky", "get_night_sky"); diff --git a/servers/rendering/renderer_canvas_cull.h b/servers/rendering/renderer_canvas_cull.h index 5e343dcf02..a2fdf95c76 100644 --- a/servers/rendering/renderer_canvas_cull.h +++ b/servers/rendering/renderer_canvas_cull.h @@ -315,4 +315,4 @@ public: ~RendererCanvasCull(); }; -#endif // VISUALSERVERCANVAS_H +#endif // RENDERING_SERVER_CANVAS_CULL_H diff --git a/servers/rendering/renderer_scene_cull.h b/servers/rendering/renderer_scene_cull.h index 8fbe9c8b26..905d0eb558 100644 --- a/servers/rendering/renderer_scene_cull.h +++ b/servers/rendering/renderer_scene_cull.h @@ -1158,4 +1158,4 @@ public: virtual ~RendererSceneCull(); }; -#endif // VISUALSERVERSCENE_H +#endif // RENDERING_SERVER_SCENE_CULL_H diff --git a/servers/rendering/renderer_viewport.h b/servers/rendering/renderer_viewport.h index f6095e18d7..41d818cf99 100644 --- a/servers/rendering/renderer_viewport.h +++ b/servers/rendering/renderer_viewport.h @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef VISUALSERVERVIEWPORT_H -#define VISUALSERVERVIEWPORT_H +#ifndef RENDERER_VIEWPORT_H +#define RENDERER_VIEWPORT_H #include "core/templates/local_vector.h" #include "core/templates/rid_owner.h" @@ -282,4 +282,4 @@ public: virtual ~RendererViewport() {} }; -#endif // VISUALSERVERVIEWPORT_H +#endif // RENDERER_VIEWPORT_H diff --git a/servers/rendering/rendering_server_default.cpp b/servers/rendering/rendering_server_default.cpp index 62390f9d4d..107c9f8040 100644 --- a/servers/rendering/rendering_server_default.cpp +++ b/servers/rendering/rendering_server_default.cpp @@ -38,7 +38,7 @@ #include "renderer_scene_cull.h" #include "rendering_server_globals.h" -// careful, these may run in different threads than the visual server +// careful, these may run in different threads than the rendering server int RenderingServerDefault::changes = 0; diff --git a/servers/rendering_server.h b/servers/rendering_server.h index 7367343017..2dffa6bc75 100644 --- a/servers/rendering_server.h +++ b/servers/rendering_server.h @@ -1416,7 +1416,7 @@ public: /* FREE */ - virtual void free(RID p_rid) = 0; ///< free RIDs associated with the visual server + virtual void free(RID p_rid) = 0; ///< free RIDs associated with the rendering server virtual void request_frame_drawn_callback(Object *p_where, const StringName &p_method, const Variant &p_userdata) = 0; |