summaryrefslogtreecommitdiff
path: root/doc/classes/RenderingServer.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/RenderingServer.xml')
-rw-r--r--doc/classes/RenderingServer.xml230
1 files changed, 128 insertions, 102 deletions
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 9c8c964967..74eb6a17e5 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -404,28 +404,6 @@
The mode of the light, see [enum CanvasLightMode] constants.
</description>
</method>
- <method name="canvas_light_set_scale">
- <return type="void">
- </return>
- <argument index="0" name="light" type="RID">
- </argument>
- <argument index="1" name="scale" type="float">
- </argument>
- <description>
- Sets the texture's scale factor of the light. Equivalent to [member Light2D.texture_scale].
- </description>
- </method>
- <method name="canvas_light_set_shadow_buffer_size">
- <return type="void">
- </return>
- <argument index="0" name="light" type="RID">
- </argument>
- <argument index="1" name="size" type="int">
- </argument>
- <description>
- Sets the width of the shadow buffer, size gets scaled to the next power of two for this.
- </description>
- </method>
<method name="canvas_light_set_shadow_color">
<return type="void">
</return>
@@ -478,7 +456,7 @@
<argument index="1" name="texture" type="RID">
</argument>
<description>
- Sets texture to be used by light. Equivalent to [member Light2D.texture].
+ Sets the texture to be used by a [PointLight2D]. Equivalent to [member PointLight2D.texture].
</description>
</method>
<method name="canvas_light_set_texture_offset">
@@ -489,7 +467,18 @@
<argument index="1" name="offset" type="Vector2">
</argument>
<description>
- Sets the offset of the light's texture. Equivalent to [member Light2D.offset].
+ Sets the offset of a [PointLight2D]'s texture. Equivalent to [member PointLight2D.offset].
+ </description>
+ </method>
+ <method name="canvas_light_set_texture_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="scale" type="float">
+ </argument>
+ <description>
+ Sets the scale factor of a [PointLight2D]'s texture. Equivalent to [member PointLight2D.texture_scale].
</description>
</method>
<method name="canvas_light_set_transform">
@@ -548,17 +537,6 @@
Sets the shape of the occluder polygon.
</description>
</method>
- <method name="canvas_occluder_polygon_set_shape_as_lines">
- <return type="void">
- </return>
- <argument index="0" name="occluder_polygon" type="RID">
- </argument>
- <argument index="1" name="shape" type="PackedVector2Array">
- </argument>
- <description>
- Sets the shape of the occluder polygon as lines.
- </description>
- </method>
<method name="canvas_set_item_mirroring">
<return type="void">
</return>
@@ -583,6 +561,12 @@
Modulates all colors in the given canvas.
</description>
</method>
+ <method name="create_local_rendering_device" qualifiers="const">
+ <return type="RenderingDevice">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="directional_light_create">
<return type="RID">
</return>
@@ -613,7 +597,9 @@
</argument>
<argument index="4" name="saturation" type="float">
</argument>
- <argument index="5" name="ramp" type="RID">
+ <argument index="5" name="use_1d_color_correction" type="bool">
+ </argument>
+ <argument index="6" name="color_correction" type="RID">
</argument>
<description>
Sets the values to be used with the "Adjustment" post-process effect. See [Environment] for more details.
@@ -702,6 +688,8 @@
</argument>
<argument index="7" name="height_density" type="float">
</argument>
+ <argument index="8" name="aerial_perspective" type="float">
+ </argument>
<description>
</description>
</method>
@@ -712,7 +700,7 @@
</argument>
<argument index="1" name="enable" type="bool">
</argument>
- <argument index="2" name="level_flags" type="int">
+ <argument index="2" name="levels" type="PackedFloat32Array">
</argument>
<argument index="3" name="intensity" type="float">
</argument>
@@ -1426,6 +1414,17 @@
Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight3D.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options.
</description>
</method>
+ <method name="light_directional_set_sky_only">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ If [code]true[/code], this light will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon.
+ </description>
+ </method>
<method name="light_omni_set_shadow_mode">
<return type="void">
</return>
@@ -1615,26 +1614,6 @@
Sets a shader material's shader.
</description>
</method>
- <method name="mesh_add_surface_from_arrays">
- <return type="void">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType">
- </argument>
- <argument index="2" name="arrays" type="Array">
- </argument>
- <argument index="3" name="blend_shapes" type="Array" default="[ ]">
- </argument>
- <argument index="4" name="lods" type="Dictionary" default="{
-
-}">
- </argument>
- <argument index="5" name="compress_format" type="int" default="31744">
- </argument>
- <description>
- </description>
- </method>
<method name="mesh_clear">
<return type="void">
</return>
@@ -1733,32 +1712,46 @@
Returns a mesh's surface's arrays for blend shapes.
</description>
</method>
- <method name="mesh_surface_get_format_offset" qualifiers="const">
+ <method name="mesh_surface_get_format_attribute_stride" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="format" type="int">
</argument>
- <argument index="1" name="vertex_len" type="int">
+ <argument index="1" name="vertex_count" type="int">
</argument>
- <argument index="2" name="index_len" type="int">
+ <description>
+ </description>
+ </method>
+ <method name="mesh_surface_get_format_offset" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="format" type="int">
+ </argument>
+ <argument index="1" name="vertex_count" type="int">
</argument>
- <argument index="3" name="array_index" type="int">
+ <argument index="2" name="array_index" type="int">
</argument>
<description>
- Function is unused in Godot 3.x.
</description>
</method>
- <method name="mesh_surface_get_format_stride" qualifiers="const">
+ <method name="mesh_surface_get_format_skin_stride" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="format" type="int">
</argument>
- <argument index="1" name="vertex_len" type="int">
+ <argument index="1" name="vertex_count" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="mesh_surface_get_format_vertex_stride" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="format" type="int">
</argument>
- <argument index="2" name="index_len" type="int">
+ <argument index="1" name="vertex_count" type="int">
</argument>
<description>
- Function is unused in Godot 3.x.
</description>
</method>
<method name="mesh_surface_get_material" qualifiers="const">
@@ -2960,6 +2953,16 @@
Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options.
</description>
</method>
+ <method name="viewport_set_use_debanding">
+ <return type="void">
+ </return>
+ <argument index="0" name="viewport" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="viewport_set_use_xr">
<return type="void">
</return>
@@ -3065,16 +3068,24 @@
<constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
Array is an UV coordinates array for the second UV coordinates.
</constant>
- <constant name="ARRAY_BONES" value="6" enum="ArrayType">
+ <constant name="ARRAY_CUSTOM0" value="6" enum="ArrayType">
+ </constant>
+ <constant name="ARRAY_CUSTOM1" value="7" enum="ArrayType">
+ </constant>
+ <constant name="ARRAY_CUSTOM2" value="8" enum="ArrayType">
+ </constant>
+ <constant name="ARRAY_CUSTOM3" value="9" enum="ArrayType">
+ </constant>
+ <constant name="ARRAY_BONES" value="10" enum="ArrayType">
Array contains bone information.
</constant>
- <constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
+ <constant name="ARRAY_WEIGHTS" value="11" enum="ArrayType">
Array is weight information.
</constant>
- <constant name="ARRAY_INDEX" value="8" enum="ArrayType">
+ <constant name="ARRAY_INDEX" value="12" enum="ArrayType">
Array is index array.
</constant>
- <constant name="ARRAY_MAX" value="9" enum="ArrayType">
+ <constant name="ARRAY_MAX" value="13" enum="ArrayType">
Represents the size of the [enum ArrayType] enum.
</constant>
<constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat">
@@ -3095,40 +3106,45 @@
<constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat">
Flag used to mark an UV coordinates array for the second UV coordinates.
</constant>
- <constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat">
+ <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat">
+ </constant>
+ <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat">
+ </constant>
+ <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat">
+ </constant>
+ <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat">
+ </constant>
+ <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat">
Flag used to mark a bone information array.
</constant>
- <constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat">
+ <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat">
Flag used to mark a weights array.
</constant>
- <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat">
+ <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat">
Flag used to mark an index array.
</constant>
- <constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat">
- Flag used to mark a compressed (half float) normal array.
+ <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="2147475463" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_TANGENT" value="2048" enum="ArrayFormat">
- Flag used to mark a compressed (half float) tangent array.
+ <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_COLOR" value="4096" enum="ArrayFormat">
- Flag used to mark a compressed (half float) color array.
+ <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_TEX_UV" value="8192" enum="ArrayFormat">
- Flag used to mark a compressed (half float) UV coordinates array.
+ <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat">
- Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates.
+ <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat">
- Flag used to mark a compressed index array.
+ <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_DEFAULT" value="31744" enum="ArrayFormat">
- Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly.
+ <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat">
+ <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat">
+ </constant>
+ <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat">
Flag used to mark that the array contains 2D vertices.
</constant>
- <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="1048576" enum="ArrayFormat">
+ <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat">
+ </constant>
+ <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat">
</constant>
<constant name="PRIMITIVE_POINTS" value="0" enum="PrimitiveType">
Primitive to draw consists of points.
@@ -3359,7 +3375,8 @@
Objects are displayed with only light information.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_OVERDRAW" value="3" enum="ViewportDebugDraw">
- Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw means you are wasting performance on drawing pixels that are being hidden behind others.
+ Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw (represented by brighter colors) means you are wasting performance on drawing pixels that are being hidden behind others.
+ [b]Note:[/b] When using this debug draw mode, custom shaders will be ignored. This means vertex displacement won't be visible anymore.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_WIREFRAME" value="4" enum="ViewportDebugDraw">
Debug draw draws objects in wireframe.
@@ -3574,22 +3591,24 @@
<constant name="INSTANCE_PARTICLES" value="4" enum="InstanceType">
The instance is a particle emitter.
</constant>
- <constant name="INSTANCE_LIGHT" value="5" enum="InstanceType">
+ <constant name="INSTANCE_PARTICLES_COLLISION" value="5" enum="InstanceType">
+ </constant>
+ <constant name="INSTANCE_LIGHT" value="6" enum="InstanceType">
The instance is a light.
</constant>
- <constant name="INSTANCE_REFLECTION_PROBE" value="6" enum="InstanceType">
+ <constant name="INSTANCE_REFLECTION_PROBE" value="7" enum="InstanceType">
The instance is a reflection probe.
</constant>
- <constant name="INSTANCE_DECAL" value="7" enum="InstanceType">
+ <constant name="INSTANCE_DECAL" value="8" enum="InstanceType">
The instance is a decal.
</constant>
- <constant name="INSTANCE_GI_PROBE" value="8" enum="InstanceType">
+ <constant name="INSTANCE_GI_PROBE" value="9" enum="InstanceType">
The instance is a GI probe.
</constant>
- <constant name="INSTANCE_LIGHTMAP" value="9" enum="InstanceType">
+ <constant name="INSTANCE_LIGHTMAP" value="10" enum="InstanceType">
The instance is a lightmap.
</constant>
- <constant name="INSTANCE_MAX" value="10" enum="InstanceType">
+ <constant name="INSTANCE_MAX" value="11" enum="InstanceType">
Represents the size of the [enum InstanceType] enum.
</constant>
<constant name="INSTANCE_GEOMETRY_MASK" value="30" enum="InstanceType">
@@ -3667,18 +3686,25 @@
<constant name="CANVAS_ITEM_TEXTURE_REPEAT_MAX" value="4" enum="CanvasItemTextureRepeat">
Max value for [enum CanvasItemTextureRepeat] enum.
</constant>
- <constant name="CANVAS_LIGHT_MODE_ADD" value="0" enum="CanvasLightMode">
+ <constant name="CANVAS_GROUP_MODE_DISABLED" value="0" enum="CanvasGroupMode">
+ </constant>
+ <constant name="CANVAS_GROUP_MODE_OPAQUE" value="1" enum="CanvasGroupMode">
+ </constant>
+ <constant name="CANVAS_GROUP_MODE_TRANSPARENT" value="2" enum="CanvasGroupMode">
+ </constant>
+ <constant name="CANVAS_LIGHT_MODE_POINT" value="0" enum="CanvasLightMode">
+ </constant>
+ <constant name="CANVAS_LIGHT_MODE_DIRECTIONAL" value="1" enum="CanvasLightMode">
+ </constant>
+ <constant name="CANVAS_LIGHT_BLEND_MODE_ADD" value="0" enum="CanvasLightBlendMode">
Adds light color additive to the canvas.
</constant>
- <constant name="CANVAS_LIGHT_MODE_SUB" value="1" enum="CanvasLightMode">
+ <constant name="CANVAS_LIGHT_BLEND_MODE_SUB" value="1" enum="CanvasLightBlendMode">
Adds light color subtractive to the canvas.
</constant>
- <constant name="CANVAS_LIGHT_MODE_MIX" value="2" enum="CanvasLightMode">
+ <constant name="CANVAS_LIGHT_BLEND_MODE_MIX" value="2" enum="CanvasLightBlendMode">
The light adds color depending on transparency.
</constant>
- <constant name="CANVAS_LIGHT_MODE_MASK" value="3" enum="CanvasLightMode">
- The light adds color depending on mask.
- </constant>
<constant name="CANVAS_LIGHT_FILTER_NONE" value="0" enum="CanvasLightShadowFilter">
Do not apply a filter to canvas light shadows.
</constant>