diff options
-rw-r--r-- | .github/CODEOWNERS | 64 | ||||
-rw-r--r-- | core/math/geometry_2d.cpp | 12 | ||||
-rw-r--r-- | doc/classes/Environment.xml | 3 |
3 files changed, 54 insertions, 25 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 748d787b86..68bd4bc4ce 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,7 +2,7 @@ # Each line is a file pattern followed by one or more owners. # Owners can be @users, @org/teams or emails -# Buildsystem +# Buildsystem (Before everything to be overwritten) * @godotengine/buildsystem @@ -17,10 +17,11 @@ # Doc /doc/ @godotengine/documentation -**/doc_classes/ @godotengine/documentation # Drivers +/drivers/ @godotengine/_systems + ## Audio /drivers/alsa/ @godotengine/audio /drivers/alsamidi/ @godotengine/audio @@ -34,7 +35,9 @@ ## Rendering /drivers/d3d12/ @godotengine/rendering /drivers/dummy/ @godotengine/rendering +/drivers/egl/ @godotengine/rendering /drivers/gles3/ @godotengine/rendering +/drivers/metal/ @godotengine/rendering /drivers/spirv-reflect/ @godotengine/rendering /drivers/vulkan/ @godotengine/rendering @@ -47,18 +50,19 @@ # Editor -/editor/*debugger* @godotengine/debugger +/editor/ @godotengine/_editor +/editor/**/*2d* @godotengine/2d-editor +/editor/**/*3d* @godotengine/3d-editor +/editor/**/*code* @godotengine/script-editor +/editor/**/*debugger* @godotengine/debugger +/editor/**/*dock* @godotengine/docks +/editor/**/*script* @godotengine/script-editor +/editor/**/*shader* @godotengine/shaders +/editor/debugger/ @godotengine/debugger /editor/gui/ @godotengine/usability @godotengine/gui-nodes /editor/icons/ @godotengine/usability /editor/import/ @godotengine/import -/editor/plugins/*2d_*.* @godotengine/2d-editor -/editor/plugins/*3d_*.* @godotengine/3d-editor -/editor/plugins/script_*.* @godotengine/script-editor -/editor/plugins/*shader*.* @godotengine/shaders /editor/themes/ @godotengine/usability @godotengine/gui-nodes -/editor/code_editor.* @godotengine/script-editor -/editor/*dock*.* @godotengine/docks -/editor/*shader*.* @godotengine/shaders # Main @@ -71,9 +75,16 @@ # Modules +/modules/ @godotengine/_engine +/modules/**/doc_classes/ @godotengine/_engine @godotengine/documentation +/modules/**/editor/ @godotengine/_engine @godotengine/_editor +/modules/**/icons/ @godotengine/_engine @godotengine/usability +/modules/**/tests/ @godotengine/_engine @godotengine/tests + ## Audio (+ video) /modules/interactive_music/ @godotengine/audio /modules/interactive_music/doc_classes/ @godotengine/audio @godotengine/documentation +/modules/interactive_music/editor/ @godotengine/audio @godotengine/_editor /modules/minimp3/ @godotengine/audio /modules/minimp3/doc_classes/ @godotengine/audio @godotengine/documentation /modules/ogg/ @godotengine/audio @@ -93,8 +104,10 @@ /modules/etcpak/ @godotengine/import /modules/fbx/ @godotengine/import /modules/fbx/doc_classes/ @godotengine/import @godotengine/documentation +/modules/fbx/editor/ @godotengine/import @godotengine/_editor /modules/gltf/ @godotengine/import /modules/gltf/doc_classes/ @godotengine/import @godotengine/documentation +/modules/gltf/editor/ @godotengine/import @godotengine/_editor /modules/gltf/tests/ @godotengine/import @godotengine/tests /modules/hdr/ @godotengine/import /modules/jpg/ @godotengine/import @@ -112,12 +125,14 @@ /modules/mbedtls/tests/ @godotengine/network @godotengine/tests /modules/multiplayer/ @godotengine/network /modules/multiplayer/doc_classes/ @godotengine/network @godotengine/documentation +/modules/multiplayer/editor/ @godotengine/network @godotengine/_editor /modules/upnp/ @godotengine/network /modules/upnp/doc_classes/ @godotengine/network @godotengine/documentation /modules/webrtc/ @godotengine/network /modules/webrtc/doc_classes/ @godotengine/network @godotengine/documentation /modules/websocket/ @godotengine/network /modules/websocket/doc_classes/ @godotengine/network @godotengine/documentation +/modules/websocket/editor/ @godotengine/network @godotengine/_editor ## Physics /modules/godot_physics_2d/ @godotengine/physics @@ -134,12 +149,14 @@ ## Scripting /modules/gdscript/ @godotengine/gdscript /modules/gdscript/doc_classes/ @godotengine/gdscript @godotengine/documentation +/modules/gdscript/editor/ @godotengine/gdscript @godotengine/_editor /modules/gdscript/icons/ @godotengine/gdscript @godotengine/usability /modules/gdscript/tests/ @godotengine/gdscript @godotengine/tests /modules/jsonrpc/ @godotengine/gdscript @godotengine/network /modules/jsonrpc/tests @godotengine/gdscript @godotengine/network @godotengine/tests /modules/mono/ @godotengine/dotnet /modules/mono/doc_classes/ @godotengine/dotnet @godotengine/documentation +/modules/mono/editor/ @godotengine/dotnet @godotengine/_editor /modules/mono/icons/ @godotengine/dotnet @godotengine/usability ## Text @@ -156,19 +173,24 @@ /modules/mobile_vr/doc_classes/ @godotengine/xr @godotengine/documentation /modules/openxr/ @godotengine/xr /modules/openxr/doc_classes/ @godotengine/xr @godotengine/documentation +/modules/openxr/editor/ @godotengine/xr @godotengine/_editor /modules/webxr/ @godotengine/xr /modules/webxr/doc_classes/ @godotengine/xr @godotengine/documentation ## Misc /modules/csg/ @godotengine/3d-nodes /modules/csg/doc_classes/ @godotengine/3d-nodes @godotengine/documentation +/modules/csg/editor/ @godotengine/3d-nodes @godotengine/_editor /modules/csg/icons/ @godotengine/3d-nodes @godotengine/usability -/modules/navigation/ @godotengine/navigation /modules/gridmap/ @godotengine/3d-nodes /modules/gridmap/doc_classes/ @godotengine/3d-nodes @godotengine/documentation +/modules/gridmap/editor/ @godotengine/3d-nodes @godotengine/_editor /modules/gridmap/icons/ @godotengine/3d-nodes @godotengine/usability +/modules/navigation/ @godotengine/navigation +/modules/navigation/editor/ @godotengine/navigation @godotengine/_editor /modules/noise/ @godotengine/core /modules/noise/doc_classes/ @godotengine/core @godotengine/documentation +/modules/noise/editor/ @godotengine/core @godotengine/_editor /modules/noise/icons/ @godotengine/core @godotengine/usability /modules/noise/tests/ @godotengine/core @godotengine/tests /modules/regex/ @godotengine/core @@ -180,6 +202,7 @@ # Platform +/platform/ @godotengine/_platforms /platform/android/ @godotengine/android /platform/android/doc_classes/ @godotengine/android @godotengine/documentation /platform/ios/ @godotengine/ios @@ -195,6 +218,7 @@ # Scene +/scene/ @godotengine/_systems @godotengine/core /scene/2d/ @godotengine/2d-nodes /scene/2d/physics/ @godotengine/2d-nodes @godotengine/physics /scene/3d/ @godotengine/3d-nodes @@ -213,14 +237,16 @@ # Servers -/servers/audio* @godotengine/audio -/servers/camera* @godotengine/xr -/servers/display_server.* @godotengine/_platforms -/servers/navigation_server*.* @godotengine/navigation -/servers/physics* @godotengine/physics -/servers/rendering* @godotengine/rendering -/servers/text_server.* @godotengine/gui-nodes -/servers/xr* @godotengine/xr +/servers/ @godotengine/_systems +/servers/**/audio* @godotengine/audio +/servers/**/camera* @godotengine/xr +/servers/**/debugger* @godotengine/debugger +/servers/**/display* @godotengine/_platforms +/servers/**/navigation* @godotengine/navigation +/servers/**/physics* @godotengine/physics +/servers/**/rendering* @godotengine/rendering +/servers/**/text* @godotengine/gui-nodes +/servers/**/xr* @godotengine/xr # Tests diff --git a/core/math/geometry_2d.cpp b/core/math/geometry_2d.cpp index d60619b27f..a49826958a 100644 --- a/core/math/geometry_2d.cpp +++ b/core/math/geometry_2d.cpp @@ -35,7 +35,8 @@ #define STB_RECT_PACK_IMPLEMENTATION #include "thirdparty/misc/stb_rect_pack.h" -#define PRECISION 5 // Based on CMP_EPSILON. +const int clipper_precision = 5; // Based on CMP_EPSILON. +const double clipper_scale = Math::pow(10.0, clipper_precision); Vector<Vector<Vector2>> Geometry2D::decompose_polygon_in_convex(const Vector<Point2> &polygon) { Vector<Vector<Vector2>> decomp; @@ -224,7 +225,7 @@ Vector<Vector<Point2>> Geometry2D::_polypaths_do_operation(PolyBooleanOperation path_b[i] = PointD(p_polypath_b[i].x, p_polypath_b[i].y); } - ClipperD clp(PRECISION); // Scale points up internally to attain the desired precision. + ClipperD clp(clipper_precision); // Scale points up internally to attain the desired precision. clp.PreserveCollinear(false); // Remove redundant vertices. if (is_a_open) { clp.AddOpenSubject({ path_a }); @@ -298,9 +299,10 @@ Vector<Vector<Point2>> Geometry2D::_polypath_offset(const Vector<Point2> &p_poly } // Inflate/deflate. - PathsD paths = InflatePaths({ polypath }, p_delta, jt, et, 2.0, PRECISION, 0.0); - // Here the miter_limit = 2.0 and arc_tolerance = 0.0 are Clipper2 defaults, - // and the PRECISION is used to scale points up internally, to attain the desired precision. + PathsD paths = InflatePaths({ polypath }, p_delta, jt, et, 2.0, clipper_precision, 0.25 * clipper_scale); + // Here the points are scaled up internally and + // the arc_tolerance is scaled accordingly + // to attain the desired precision. Vector<Vector<Point2>> polypaths; for (PathsD::size_type i = 0; i < paths.size(); ++i) { diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index de3295fbe0..1779408a4d 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -81,8 +81,9 @@ The background mode. See [enum BGMode] for possible values. </member> <member name="fog_aerial_perspective" type="float" setter="set_fog_aerial_perspective" getter="get_fog_aerial_perspective" default="0.0"> - If set above [code]0.0[/code] (exclusive), blends between the fog's color and the color of the background [Sky]. This has a small performance cost when set above [code]0.0[/code]. Must have [member background_mode] set to [constant BG_SKY]. + If set above [code]0.0[/code] (exclusive), blends between the fog's color and the color of the background [Sky], as read from the radiance cubemap. This has a small performance cost when set above [code]0.0[/code]. Must have [member background_mode] set to [constant BG_SKY]. This is useful to simulate [url=https://en.wikipedia.org/wiki/Aerial_perspective]aerial perspective[/url] in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to [code]1.0[/code], the fog color comes completely from the [Sky]. If set to [code]0.0[/code], aerial perspective is disabled. + Notice that this does not sample the [Sky] directly, but rather the radiance cubemap. The cubemap is sampled at a mipmap level depending on the depth of the rendered pixel; the farther away, the higher the resolution of the sampled mipmap. This results in the actual color being a blurred version of the sky, with more blur closer to the camera. The highest mipmap resolution is used at a depth of [member Camera3D.far]. </member> <member name="fog_density" type="float" setter="set_fog_density" getter="get_fog_density" default="0.01"> The fog density to be used. This is demonstrated in different ways depending on the [member fog_mode] mode chosen: |