From fd1f8aa5d79aff57fa6a464483d5906cfcec4baf Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 27 Mar 2024 16:12:15 +0100 Subject: [PATCH] Update docs for the vertex lights 3d module. --- doc/classes/@GlobalScope.xml | 3 + doc/classes/ProjectSettings.xml | 3 + doc/classes/World3D.xml | 3 + .../doc_classes/VertexLight3D.xml | 14 ++-- .../doc_classes/VertexLight3DEnvironment.xml | 6 +- .../doc_classes/VertexLights3DServer.xml | 70 ++++++------------- 6 files changed, 39 insertions(+), 60 deletions(-) diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 249f4fdc3..c2a0c1810 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -137,6 +137,9 @@ The [VertexLights2DServer] singleton. + + The [VertexLights3DServer] singleton. + diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 7e48abda4..efc3675c7 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -2122,6 +2122,9 @@ + The default internal quadrant size of the [VertexLights2DServer] singleton. + + Cell size used for the 2D hash grid that [VisibilityNotifier2D] uses (in pixels). diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml index 7740984cd..0c497dd22 100644 --- a/doc/classes/World3D.xml +++ b/doc/classes/World3D.xml @@ -30,6 +30,9 @@ The World's physics space. + + The [RID] of this world's vertex light 3d space resource. Used by the [VertexLights3DServer] for static 3D lights. If the vertex lights 3d module is not enabled this will just return an empty RID. + diff --git a/modules/vertex_lights_3d/doc_classes/VertexLight3D.xml b/modules/vertex_lights_3d/doc_classes/VertexLight3D.xml index 4514069dc..eb41e2a84 100644 --- a/modules/vertex_lights_3d/doc_classes/VertexLight3D.xml +++ b/modules/vertex_lights_3d/doc_classes/VertexLight3D.xml @@ -1,10 +1,10 @@ - + - A [Node3D] that manages a light in [VertexLights3DServer]. + A [Spatial] that manages a light in [VertexLights3DServer]. - A [Node3D] that manages a light in [VertexLights3DServer]. + A [Spatial] that manages a light in [VertexLights3DServer]. @@ -23,18 +23,12 @@ The light's item cull mask. - - The light's layer range. - The light's mode. - + The light's range. - - The light's z range. - diff --git a/modules/vertex_lights_3d/doc_classes/VertexLight3DEnvironment.xml b/modules/vertex_lights_3d/doc_classes/VertexLight3DEnvironment.xml index 3db352c3b..2de0ebdaf 100644 --- a/modules/vertex_lights_3d/doc_classes/VertexLight3DEnvironment.xml +++ b/modules/vertex_lights_3d/doc_classes/VertexLight3DEnvironment.xml @@ -1,10 +1,10 @@ - + - A [Node3D] that manages a map's base color in [VertexLights3DServer]. + A [Spatial] that manages a map's base color in [VertexLights3DServer]. - A [Node3D] that manages a map's base color in [VertexLights3DServer]. + A [Spatial] that manages a map's base color in [VertexLights3DServer]. diff --git a/modules/vertex_lights_3d/doc_classes/VertexLights3DServer.xml b/modules/vertex_lights_3d/doc_classes/VertexLights3DServer.xml index 0c6dc6812..c5cf5c3a3 100644 --- a/modules/vertex_lights_3d/doc_classes/VertexLights3DServer.xml +++ b/modules/vertex_lights_3d/doc_classes/VertexLights3DServer.xml @@ -1,14 +1,14 @@ - A server that provides a way to store static lights that can be used to bake lighting information into mesh vertex data, or [CanvasItem]'s color modulation. + A server that provides a way to store static lights that can be used to bake lighting information into mesh vertex data, or [SpatialMaterial]'s albedo modulation. - A server that provides a way to store static lights that can be used to bake lighting information into mesh vertex data, or [CanvasItem]'s color modulation. + A server that provides a way to store static lights that can be used to bake lighting information into mesh vertex data, or [SpatialMaterial]'s albedo modulation. With this class extremely complex light information can be stored and used with no additional cost on the GPU side. - After adding lights, you can use [member sample_light] to sample lighting at a specified point in the map's space, then use the resulting [Color] to either further modifty the modulate property of [CanvasItem]s, or you can render meshes using this color in you custom _draw methods. + After adding lights, you can use [member sample_light] to sample lighting at a specified point in the map's space, then use the resulting [Color] to either further modifty the albedo color in your shader, or you can bake vertex colors of your meshes. The drawback of this method is that it's more expensive change lights. - Note that you can use the normal 3D lighting system on top of this if you need dynamic lights (like [Light3D]). That system is better suited for that purpose. + Note that you can use the normal 3D lighting system on top of this if you need dynamic lights (like [OmniLight]). That system is better suited for that purpose. Currently this class stores lights inside quadrants. Their optimal size should be a bit more than the radius of the biggest light you want to have. @@ -28,7 +28,7 @@ - + Get the default internal quadrant size. @@ -67,13 +67,6 @@ Get a light's item cull mask property. - - - - - Get a light's layer range property. - - @@ -89,26 +82,19 @@ - + Get a light's position. - + Get a light's range. - - - - - Get a light's z range property. - - @@ -141,14 +127,6 @@ Set a light's item cull mask property. - - - - - - Set a light's layer range property. - - @@ -168,7 +146,7 @@ - + Set a light's position. @@ -176,19 +154,11 @@ - + Set a light's range. - - - - - - Set a light's z range property. - - @@ -217,7 +187,7 @@ - + Returns a map's quadrant size. @@ -234,27 +204,33 @@ - + - Sets a map's quadrant size. - + + + + + Sample the lighing information at a specific position with the specified normal. + + + + + + - - Sample the lighing information at a specific position. - + - Set the default internal quadrant size.