Complete various class references

This commit is contained in:
clayjohn 2020-01-25 21:59:51 -08:00
parent be1bc53d42
commit c5700f7464
16 changed files with 68 additions and 9 deletions

View file

@ -172,10 +172,13 @@
The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX].
</member> </member>
<member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PoolColorArray( )"> <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PoolColorArray( )">
Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member> </member>
<member name="emission_normals" type="PoolVector3Array" setter="set_emission_normals" getter="get_emission_normals"> <member name="emission_normals" type="PoolVector3Array" setter="set_emission_normals" getter="get_emission_normals">
Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member> </member>
<member name="emission_points" type="PoolVector3Array" setter="set_emission_points" getter="get_emission_points" default="PoolVector3Array( )"> <member name="emission_points" type="PoolVector3Array" setter="set_emission_points" getter="get_emission_points" default="PoolVector3Array( )">
Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member> </member>
<member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles.EmissionShape" default="0"> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles.EmissionShape" default="0">
Particles will be emitted inside this region. See [enum EmissionShape] for possible values. Particles will be emitted inside this region. See [enum EmissionShape] for possible values.

View file

@ -170,10 +170,13 @@
Particle draw order. Uses [enum DrawOrder] values. Particle draw order. Uses [enum DrawOrder] values.
</member> </member>
<member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors"> <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors">
Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member> </member>
<member name="emission_normals" type="PoolVector2Array" setter="set_emission_normals" getter="get_emission_normals"> <member name="emission_normals" type="PoolVector2Array" setter="set_emission_normals" getter="get_emission_normals">
Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member> </member>
<member name="emission_points" type="PoolVector2Array" setter="set_emission_points" getter="get_emission_points"> <member name="emission_points" type="PoolVector2Array" setter="set_emission_points" getter="get_emission_points">
Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member> </member>
<member name="emission_rect_extents" type="Vector2" setter="set_emission_rect_extents" getter="get_emission_rect_extents"> <member name="emission_rect_extents" type="Vector2" setter="set_emission_rect_extents" getter="get_emission_rect_extents">
The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_RECTANGLE]. The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_RECTANGLE].

View file

@ -24,8 +24,10 @@
The custom [Viewport] node assigned to the [CanvasLayer]. If [code]null[/code], uses the default viewport instead. The custom [Viewport] node assigned to the [CanvasLayer]. If [code]null[/code], uses the default viewport instead.
</member> </member>
<member name="follow_viewport_enable" type="bool" setter="set_follow_viewport" getter="is_following_viewport" default="false"> <member name="follow_viewport_enable" type="bool" setter="set_follow_viewport" getter="is_following_viewport" default="false">
Sets the layer to follow the viewport in order to simulate a pseudo 3D effect.
</member> </member>
<member name="follow_viewport_scale" type="float" setter="set_follow_viewport_scale" getter="get_follow_viewport_scale" default="1.0"> <member name="follow_viewport_scale" type="float" setter="set_follow_viewport_scale" getter="get_follow_viewport_scale" default="1.0">
Scales the layer when using [member follow_viewport_enable]. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales.
</member> </member>
<member name="layer" type="int" setter="set_layer" getter="get_layer" default="1"> <member name="layer" type="int" setter="set_layer" getter="get_layer" default="1">
Layer index for draw order. Lower values are drawn first. Layer index for draw order. Lower values are drawn first.

View file

@ -193,6 +193,7 @@
<argument index="0" name="normal" type="Vector3"> <argument index="0" name="normal" type="Vector3">
</argument> </argument>
<description> <description>
Used internally by the engine.
</description> </description>
</method> </method>
<method name="intersect_polygons_2d"> <method name="intersect_polygons_2d">

View file

@ -17,6 +17,7 @@
<argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags"> <argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the specified flag is enabled.
</description> </description>
</method> </method>
<method name="get_param" qualifiers="const"> <method name="get_param" qualifiers="const">
@ -25,6 +26,7 @@
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument> </argument>
<description> <description>
Returns the value of the specified parameter.
</description> </description>
</method> </method>
<method name="get_param_randomness" qualifiers="const"> <method name="get_param_randomness" qualifiers="const">
@ -33,6 +35,7 @@
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument> </argument>
<description> <description>
Returns the randomness ratio associated with the specified parameter.
</description> </description>
</method> </method>
<method name="get_param_texture" qualifiers="const"> <method name="get_param_texture" qualifiers="const">
@ -41,6 +44,7 @@
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument> </argument>
<description> <description>
Returns the [Texture] used by the specified parameter.
</description> </description>
</method> </method>
<method name="set_flag"> <method name="set_flag">
@ -51,6 +55,7 @@
<argument index="1" name="enable" type="bool"> <argument index="1" name="enable" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code], enables the specified flag. See [enum Flags] for options.
</description> </description>
</method> </method>
<method name="set_param"> <method name="set_param">
@ -61,6 +66,7 @@
<argument index="1" name="value" type="float"> <argument index="1" name="value" type="float">
</argument> </argument>
<description> <description>
Sets the specified [enum Parameter].
</description> </description>
</method> </method>
<method name="set_param_randomness"> <method name="set_param_randomness">
@ -71,6 +77,7 @@
<argument index="1" name="randomness" type="float"> <argument index="1" name="randomness" type="float">
</argument> </argument>
<description> <description>
Sets the randomness ratio for the specified [enum Parameter].
</description> </description>
</method> </method>
<method name="set_param_texture"> <method name="set_param_texture">
@ -81,6 +88,7 @@
<argument index="1" name="texture" type="Texture"> <argument index="1" name="texture" type="Texture">
</argument> </argument>
<description> <description>
Sets the [Texture] for the specified [enum Parameter].
</description> </description>
</method> </method>
</methods> </methods>

View file

@ -170,10 +170,13 @@
</members> </members>
<constants> <constants>
<constant name="PLANE_YZ" value="Plane( 1, 0, 0, 0 )"> <constant name="PLANE_YZ" value="Plane( 1, 0, 0, 0 )">
A plane that extends in the Y and Z axes.
</constant> </constant>
<constant name="PLANE_XZ" value="Plane( 0, 1, 0, 0 )"> <constant name="PLANE_XZ" value="Plane( 0, 1, 0, 0 )">
A plane that extends in the X and Z axes.
</constant> </constant>
<constant name="PLANE_XY" value="Plane( 0, 0, 1, 0 )"> <constant name="PLANE_XY" value="Plane( 0, 0, 1, 0 )">
A plane that extends in the X and Y axes.
</constant> </constant>
</constants> </constants>
</class> </class>

View file

@ -63,14 +63,19 @@
</members> </members>
<constants> <constants>
<constant name="TEXTURE_SIZE_256" value="0" enum="TextureSize"> <constant name="TEXTURE_SIZE_256" value="0" enum="TextureSize">
Sky texture will be 256x128.
</constant> </constant>
<constant name="TEXTURE_SIZE_512" value="1" enum="TextureSize"> <constant name="TEXTURE_SIZE_512" value="1" enum="TextureSize">
Sky texture will be 512x256.
</constant> </constant>
<constant name="TEXTURE_SIZE_1024" value="2" enum="TextureSize"> <constant name="TEXTURE_SIZE_1024" value="2" enum="TextureSize">
Sky texture will be 1024x512. This is the default size.
</constant> </constant>
<constant name="TEXTURE_SIZE_2048" value="3" enum="TextureSize"> <constant name="TEXTURE_SIZE_2048" value="3" enum="TextureSize">
Sky texture will be 2048x1024.
</constant> </constant>
<constant name="TEXTURE_SIZE_4096" value="4" enum="TextureSize"> <constant name="TEXTURE_SIZE_4096" value="4" enum="TextureSize">
Sky texture will be 4096x2048.
</constant> </constant>
<constant name="TEXTURE_SIZE_MAX" value="5" enum="TextureSize"> <constant name="TEXTURE_SIZE_MAX" value="5" enum="TextureSize">
Represents the size of the [enum TextureSize] enum. Represents the size of the [enum TextureSize] enum.

View file

@ -195,6 +195,7 @@
</members> </members>
<constants> <constants>
<constant name="IDENTITY" value="Quat( 0, 0, 0, 1 )"> <constant name="IDENTITY" value="Quat( 0, 0, 0, 1 )">
The identity rotation. Equivalent to an identity matrix. If a vector is transformed by an identity quaternion, it will not change.
</constant> </constant>
</constants> </constants>
</class> </class>

View file

@ -277,7 +277,7 @@
<argument index="0" name="offset" type="Vector3"> <argument index="0" name="offset" type="Vector3">
</argument> </argument>
<description> <description>
Changes the node's position by given offset [Vector3]. Changes the node's position by the given offset [Vector3].
Note that the translation [code]offset[/code] is affected by the node's scale, so if scaled by e.g. [code](10, 1, 1)[/code], a translation by an offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) to the X coordinate. Note that the translation [code]offset[/code] is affected by the node's scale, so if scaled by e.g. [code](10, 1, 1)[/code], a translation by an offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) to the X coordinate.
</description> </description>
</method> </method>
@ -287,6 +287,7 @@
<argument index="0" name="offset" type="Vector3"> <argument index="0" name="offset" type="Vector3">
</argument> </argument>
<description> <description>
Changes the node's position by the given offset [Vector3] in local space.
</description> </description>
</method> </method>
<method name="update_gizmo"> <method name="update_gizmo">

View file

@ -174,6 +174,7 @@
<return type="Array"> <return type="Array">
</return> </return>
<description> <description>
Commits the data to the same format used by [method ArrayMesh.add_surface_from_arrays]. This way you can further process the mesh data using the [ArrayMesh] API.
</description> </description>
</method> </method>
<method name="create_from"> <method name="create_from">
@ -197,6 +198,7 @@
<argument index="2" name="blend_shape" type="String"> <argument index="2" name="blend_shape" type="String">
</argument> </argument>
<description> <description>
Creates a vertex array from the specified blend shape of an existing [Mesh]. This can be used to extract a specific pose from a blend shape.
</description> </description>
</method> </method>
<method name="deindex"> <method name="deindex">

View file

@ -6,6 +6,7 @@
<description> <description>
A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control]. A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control].
Textures are often created by loading them from a file. See [method @GDScript.load]. Textures are often created by loading them from a file. See [method @GDScript.load].
[Texture] is a base for other resources. It cannot be used directly.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -24,6 +25,7 @@
<argument index="4" name="normal_map" type="Texture" default="null"> <argument index="4" name="normal_map" type="Texture" default="null">
</argument> </argument>
<description> <description>
Draws the texture using a [CanvasItem] with the [VisualServer] API at the specified [code]position[/code]. Equivalent to [method VisualServer.canvas_item_add_texture_rect] with a rect at [code]position[/code] and the size of this [Texture].
</description> </description>
</method> </method>
<method name="draw_rect" qualifiers="const"> <method name="draw_rect" qualifiers="const">
@ -42,6 +44,7 @@
<argument index="5" name="normal_map" type="Texture" default="null"> <argument index="5" name="normal_map" type="Texture" default="null">
</argument> </argument>
<description> <description>
Draws the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect].
</description> </description>
</method> </method>
<method name="draw_rect_region" qualifiers="const"> <method name="draw_rect_region" qualifiers="const">
@ -62,12 +65,14 @@
<argument index="6" name="clip_uv" type="bool" default="true"> <argument index="6" name="clip_uv" type="bool" default="true">
</argument> </argument>
<description> <description>
Draws a part of the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect_region].
</description> </description>
</method> </method>
<method name="get_data" qualifiers="const"> <method name="get_data" qualifiers="const">
<return type="Image"> <return type="Image">
</return> </return>
<description> <description>
Returns an [Image] with the data from this [Texture]. [Image]s can be accessed and manipulated directly.
</description> </description>
</method> </method>
<method name="get_height" qualifiers="const"> <method name="get_height" qualifiers="const">
@ -95,12 +100,13 @@
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Returns [code]true[/code] if this [Texture] has an alpha channel.
</description> </description>
</method> </method>
</methods> </methods>
<members> <members>
<member name="flags" type="int" setter="set_flags" getter="get_flags" default="4"> <member name="flags" type="int" setter="set_flags" getter="get_flags" default="4">
The texture's flags. The texture's [enum Flags]. [enum Flags] are used to set various properties of the [Texture].
</member> </member>
</members> </members>
<constants> <constants>

View file

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="TextureArray" inherits="TextureLayered" category="Core" version="3.2"> <class name="TextureArray" inherits="TextureLayered" category="Core" version="3.2">
<brief_description> <brief_description>
Array of textures stored in a single primitive.
</brief_description> </brief_description>
<description> <description>
[TextureArray]s store an array of images in a single [Texture] primitive. Each layer of the texture array has its own mipmap chain. This makes it is a good alternative to texture atlases.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>

View file

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="TextureLayered" inherits="Resource" category="Core" version="3.2"> <class name="TextureLayered" inherits="Resource" category="Core" version="3.2">
<brief_description> <brief_description>
Base class for 3D texture types.
</brief_description> </brief_description>
<description> <description>
Base class for [Texture3D] and [TextureArray]. Cannot be used directly.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>

View file

@ -73,6 +73,7 @@
<argument index="0" name="quadrant" type="int"> <argument index="0" name="quadrant" type="int">
</argument> </argument>
<description> <description>
Returns the [enum ShadowAtlasQuadrantSubdiv] of the specified quadrant.
</description> </description>
</method> </method>
<method name="get_size_override" qualifiers="const"> <method name="get_size_override" qualifiers="const">
@ -156,12 +157,14 @@
<argument index="0" name="rect" type="Rect2"> <argument index="0" name="rect" type="Rect2">
</argument> </argument>
<description> <description>
Attaches this [Viewport] to the root [Viewport] with the specified rectangle. This bypasses the need for another node to display this [Viewport] but makes you responsible for updating the position of this [Viewport] manually.
</description> </description>
</method> </method>
<method name="set_input_as_handled"> <method name="set_input_as_handled">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Stops the input from propagating further down the [SceneTree].
</description> </description>
</method> </method>
<method name="set_shadow_atlas_quadrant_subdiv"> <method name="set_shadow_atlas_quadrant_subdiv">
@ -172,6 +175,7 @@
<argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv"> <argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv">
</argument> </argument>
<description> <description>
Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
</description> </description>
</method> </method>
<method name="set_size_override"> <method name="set_size_override">
@ -243,13 +247,13 @@
<member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true"> <member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true">
</member> </member>
<member name="hdr" type="bool" setter="set_hdr" getter="get_hdr" default="true"> <member name="hdr" type="bool" setter="set_hdr" getter="get_hdr" default="true">
If [code]true[/code], the viewport rendering will receive benefits from High Dynamic Range algorithm. If [code]true[/code], the viewport rendering will receive benefits from High Dynamic Range algorithm. High Dynamic Range allows the viewport to receive values that are outside the 0-1 range. In Godot HDR uses 16 bits, meaning it does not store the full range of a floating point number.
</member> </member>
<member name="keep_3d_linear" type="bool" setter="set_keep_3d_linear" getter="get_keep_3d_linear" default="false"> <member name="keep_3d_linear" type="bool" setter="set_keep_3d_linear" getter="get_keep_3d_linear" default="false">
If [code]true[/code], the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output. If [code]true[/code], the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output.
</member> </member>
<member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA" default="0"> <member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA" default="0">
The multisample anti-aliasing mode. The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targetting very high-end systems.
</member> </member>
<member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world" default="false"> <member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world" default="false">
If [code]true[/code], the viewport will use [World] defined in [code]world[/code] property. If [code]true[/code], the viewport will use [World] defined in [code]world[/code] property.
@ -270,16 +274,16 @@
If [code]true[/code], the result of rendering will be flipped vertically. If [code]true[/code], the result of rendering will be flipped vertically.
</member> </member>
<member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2"> <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
The subdivision amount of first quadrant on shadow atlas. The subdivision amount of the first quadrant on the shadow atlas.
</member> </member>
<member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2"> <member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
The subdivision amount of second quadrant on shadow atlas. The subdivision amount of the second quadrant on the shadow atlas.
</member> </member>
<member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="3"> <member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="3">
The subdivision amount of third quadrant on shadow atlas. The subdivision amount of the third quadrant on the shadow atlas.
</member> </member>
<member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="4"> <member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="4">
The subdivision amount of fourth quadrant on shadow atlas. The subdivision amount of the fourth quadrant on the shadow atlas.
</member> </member>
<member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="0"> <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="0">
The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2. The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
@ -332,18 +336,25 @@
Always update the render target. Always update the render target.
</constant> </constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv"> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will not be used.
</constant> </constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1" enum="ShadowAtlasQuadrantSubdiv"> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will only be used by one shadow map.
</constant> </constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2" enum="ShadowAtlasQuadrantSubdiv"> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will be split in 4 and used by up to 4 shadow maps.
</constant> </constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_16" value="3" enum="ShadowAtlasQuadrantSubdiv"> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_16" value="3" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will be split 16 ways and used by up to 16 shadow maps.
</constant> </constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_64" value="4" enum="ShadowAtlasQuadrantSubdiv"> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_64" value="4" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will be split 64 ways and used by up to 64 shadow maps.
</constant> </constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_256" value="5" enum="ShadowAtlasQuadrantSubdiv"> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_256" value="5" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the [member shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
</constant> </constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1024" value="6" enum="ShadowAtlasQuadrantSubdiv"> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1024" value="6" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the [member shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
</constant> </constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="ShadowAtlasQuadrantSubdiv"> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="ShadowAtlasQuadrantSubdiv">
Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum. Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum.
@ -385,20 +396,28 @@
Multisample anti-aliasing mode disabled. This is the default value. Multisample anti-aliasing mode disabled. This is the default value.
</constant> </constant>
<constant name="MSAA_2X" value="1" enum="MSAA"> <constant name="MSAA_2X" value="1" enum="MSAA">
Use 2x Multisample Antialiasing.
</constant> </constant>
<constant name="MSAA_4X" value="2" enum="MSAA"> <constant name="MSAA_4X" value="2" enum="MSAA">
Use 4x Multisample Antialiasing.
</constant> </constant>
<constant name="MSAA_8X" value="3" enum="MSAA"> <constant name="MSAA_8X" value="3" enum="MSAA">
Use 8x Multisample Antialiasing. Likely unsupported on low-end and older hardware.
</constant> </constant>
<constant name="MSAA_16X" value="4" enum="MSAA"> <constant name="MSAA_16X" value="4" enum="MSAA">
Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware.
</constant> </constant>
<constant name="USAGE_2D" value="0" enum="Usage"> <constant name="USAGE_2D" value="0" enum="Usage">
Allocates all buffers needed for drawing 2D scenes. This takes less VRAM than the 3D usage modes.
</constant> </constant>
<constant name="USAGE_2D_NO_SAMPLING" value="1" enum="Usage"> <constant name="USAGE_2D_NO_SAMPLING" value="1" enum="Usage">
Allocates buffers needed for 2D scenes without allocating a buffer for screen copy. Accordingly, you cannot read from the screen. Of the [enum Usage] types, this requires the least VRAM.
</constant> </constant>
<constant name="USAGE_3D" value="2" enum="Usage"> <constant name="USAGE_3D" value="2" enum="Usage">
Allocates full buffers for drawing 3D scenes and all 3D effects including buffers needed for 2D scenes and effects.
</constant> </constant>
<constant name="USAGE_3D_NO_EFFECTS" value="3" enum="Usage"> <constant name="USAGE_3D_NO_EFFECTS" value="3" enum="Usage">
Allocates buffers needed for drawing 3D scenes. But does not allocate buffers needed for reading from the screen and post-processing effects. Saves some VRAM.
</constant> </constant>
<constant name="CLEAR_MODE_ALWAYS" value="0" enum="ClearMode"> <constant name="CLEAR_MODE_ALWAYS" value="0" enum="ClearMode">
Always clear the render target before drawing. Always clear the render target before drawing.

View file

@ -3897,7 +3897,7 @@
<argument index="2" name="screen" type="int" default="0"> <argument index="2" name="screen" type="int" default="0">
</argument> </argument>
<description> <description>
Copies viewport to a region of the screen specified by [code]rect[/code]. If Viewport.[member Viewport.render_direct_to_screen] is [code]true[/code], then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. Copies viewport to a region of the screen specified by [code]rect[/code]. If [member Viewport.render_direct_to_screen] is [code]true[/code], then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
For example, you can set the root viewport to not render at all with the following code: For example, you can set the root viewport to not render at all with the following code:
[codeblock] [codeblock]
func _ready(): func _ready():

View file

@ -16,6 +16,7 @@
If [code]true[/code], the resulting texture contains a normal map created from the original noise interpreted as a bump map. If [code]true[/code], the resulting texture contains a normal map created from the original noise interpreted as a bump map.
</member> </member>
<member name="bump_strength" type="float" setter="set_bump_strength" getter="get_bump_strength" default="8.0"> <member name="bump_strength" type="float" setter="set_bump_strength" getter="get_bump_strength" default="8.0">
Strength of the bump maps used in this texture. A higher value will make the bump maps appear larger while a lower value will make them appear softer.
</member> </member>
<member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="7" /> <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="7" />
<member name="height" type="int" setter="set_height" getter="get_height" default="512"> <member name="height" type="int" setter="set_height" getter="get_height" default="512">