diff options
Diffstat (limited to 'doc/classes/VisualServer.xml')
-rw-r--r-- | doc/classes/VisualServer.xml | 417 |
1 files changed, 396 insertions, 21 deletions
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 895aba2473..6b66721237 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -6,8 +6,16 @@ <description> Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display. The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. + The visual server can be used to bypass the scene system entirely. + Resources are created using the [code]*_create[/code] functions. + All objects are drawn to a viewport. You can use the [Viewport] attached to the [SceneTree] or you can create one yourself with [method viewport_create]. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using [method viewport_set_scenario] or [method viewport_attach_canvas]. + In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the visual server from a running game, the scenario can be accessed from the scene tree from any [Spatial] node with [method Spatial.get_world]. Otherwise, a scenario can be created with [method scenario_create]. + Similarly in 2D, a canvas is needed to draw all canvas items. + In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible. + In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. </description> <tutorials> + <link>http://docs.godotengine.org/en/latest/tutorials/optimization/using_servers.html</link> </tutorials> <methods> <method name="black_bars_set_images"> @@ -44,6 +52,8 @@ <return type="RID"> </return> <description> + Creates a camera and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="camera_set_cull_mask"> @@ -54,6 +64,7 @@ <argument index="1" name="layers" type="int"> </argument> <description> + Sets the cull mask associated with this camera. The cull mask describes which 3d layers are rendered by this camera. Equivalent to [member Camera.cull_mask]. </description> </method> <method name="camera_set_environment"> @@ -64,6 +75,7 @@ <argument index="1" name="env" type="RID"> </argument> <description> + Sets the environment used by this camera. Equivalent to [member Camera.environment]. </description> </method> <method name="camera_set_frustum"> @@ -80,6 +92,7 @@ <argument index="4" name="z_far" type="float"> </argument> <description> + Sets camera to use frustum projection. This mode allows adjusting the [code]offset[/code] argument to create "tilted frustum" effects. </description> </method> <method name="camera_set_orthogonal"> @@ -94,6 +107,7 @@ <argument index="3" name="z_far" type="float"> </argument> <description> + Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. </description> </method> <method name="camera_set_perspective"> @@ -108,6 +122,7 @@ <argument index="3" name="z_far" type="float"> </argument> <description> + Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away. </description> </method> <method name="camera_set_transform"> @@ -118,6 +133,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets [Transform] of camera. </description> </method> <method name="camera_set_use_vertical_aspect"> @@ -128,13 +144,15 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], preserves the horizontal aspect ratio which is equivalent to [constant Camera.KEEP_WIDTH]. If [code]false[/code], preserves the vertical aspect ratio which is equivalent to [constant Camera.KEEP_HEIGHT]. </description> </method> <method name="canvas_create"> <return type="RID"> </return> <description> - Creates a canvas and returns the assigned [RID]. + Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_item_add_circle"> @@ -198,6 +216,7 @@ <argument index="5" name="normal_map" type="RID"> </argument> <description> + Adds a mesh command to the [CanvasItem]'s draw commands. </description> </method> <method name="canvas_item_add_multimesh"> @@ -411,7 +430,12 @@ </argument> <argument index="9" name="normal_map" type="RID"> </argument> + <argument index="10" name="antialiased" type="bool" default="false"> + </argument> + <argument index="11" name="antialiasing_use_indices" type="bool" default="false"> + </argument> <description> + Adds a triangle array to the [CanvasItem]'s draw commands. </description> </method> <method name="canvas_item_clear"> @@ -427,7 +451,8 @@ <return type="RID"> </return> <description> - Creates a new [CanvasItem] and returns its [RID]. + Creates a new [CanvasItem] and returns its [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_item_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_item_set_clip"> @@ -475,6 +500,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Enables the use of distance fields for GUI elements that are rendering distance field based fonts. </description> </method> <method name="canvas_item_set_draw_behind_parent"> @@ -540,7 +566,7 @@ <argument index="1" name="parent" type="RID"> </argument> <description> - Sets the parent for the [CanvasItem]. + Sets the parent for the [CanvasItem]. The parent can be another canvas item, or it can be the root canvas that is attached to the viewport. </description> </method> <method name="canvas_item_set_self_modulate"> @@ -635,7 +661,8 @@ <return type="RID"> </return> <description> - Creates a canvas light. + Creates a canvas light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_light_occluder_attach_to_canvas"> @@ -653,7 +680,8 @@ <return type="RID"> </return> <description> - Creates a light occluder. + Creates a light occluder and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_ocluder_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_light_occluder_set_enabled"> @@ -787,7 +815,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.CanvasLightMode"> </argument> <description> - The mode of the light, see [code]CANVAS_LIGHT_MODE_*[/code] constants. + The mode of the light, see [enum CanvasLightMode] constants. </description> </method> <method name="canvas_light_set_scale"> @@ -798,6 +826,7 @@ <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"> @@ -841,7 +870,7 @@ <argument index="1" name="filter" type="int" enum="VisualServer.CanvasLightShadowFilter"> </argument> <description> - Sets the canvas light's shadow's filter, see [code]CANVAS_LIGHT_SHADOW_FILTER_*[/code] constants. + Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants. </description> </method> <method name="canvas_light_set_shadow_gradient_length"> @@ -874,6 +903,7 @@ <argument index="1" name="texture" type="RID"> </argument> <description> + Sets texture to be used by light. Equivalent to [member Light2D.texture]. </description> </method> <method name="canvas_light_set_texture_offset"> @@ -884,6 +914,7 @@ <argument index="1" name="offset" type="Vector2"> </argument> <description> + Sets the offset of the light's texture. Equivalent to [member Light2D.offset]. </description> </method> <method name="canvas_light_set_transform"> @@ -907,13 +938,15 @@ <argument index="2" name="max_z" type="int"> </argument> <description> + Sets the Z range of objects that will be affected by this light. Equivalent to [member Light2D.range_z_min] and [member Light2D.range_z_max]. </description> </method> <method name="canvas_occluder_polygon_create"> <return type="RID"> </return> <description> - Creates a new light occluder polygon. + Creates a new light occluder polygon and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_occluder_polygon_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_occluder_polygon_set_cull_mode"> @@ -924,7 +957,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.CanvasOccluderPolygonCullMode"> </argument> <description> - Sets an occluder polygons cull mode. See [code]CANVAS_OCCLUDER_POLYGON_CULL_MODE_*[/code] constants. + Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants. </description> </method> <method name="canvas_occluder_polygon_set_shape"> @@ -979,6 +1012,9 @@ <return type="RID"> </return> <description> + Creates a directional light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="draw"> @@ -989,12 +1025,15 @@ <argument index="1" name="frame_step" type="float" default="0.0"> </argument> <description> + Draws a frame. [i]This method is deprecated[/i], please use [method force_draw] instead. </description> </method> <method name="environment_create"> <return type="RID"> </return> <description> + Creates an environment and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]environment_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="environment_set_adjustment"> @@ -1013,6 +1052,7 @@ <argument index="5" name="ramp" type="RID"> </argument> <description> + Sets the values to be used with the "Adjustment" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ambient_light"> @@ -1027,6 +1067,7 @@ <argument index="3" name="sky_contibution" type="float" default="0.0"> </argument> <description> + Sets the ambient light parameters. See [Environment] for more details. </description> </method> <method name="environment_set_background"> @@ -1037,6 +1078,7 @@ <argument index="1" name="bg" type="int" enum="VisualServer.EnvironmentBG"> </argument> <description> + Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode]. </description> </method> <method name="environment_set_bg_color"> @@ -1047,6 +1089,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). </description> </method> <method name="environment_set_bg_energy"> @@ -1057,6 +1100,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the intensity of the background color. </description> </method> <method name="environment_set_canvas_max_layer"> @@ -1067,6 +1111,7 @@ <argument index="1" name="max_layer" type="int"> </argument> <description> + Sets the maximum layer to use if using Canvas background mode. </description> </method> <method name="environment_set_dof_blur_far"> @@ -1085,6 +1130,7 @@ <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality"> </argument> <description> + Sets the values to be used with the "DoF Far Blur" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_dof_blur_near"> @@ -1103,6 +1149,7 @@ <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality"> </argument> <description> + Sets the values to be used with the "DoF Near Blur" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_fog"> @@ -1119,6 +1166,7 @@ <argument index="4" name="sun_amount" type="float"> </argument> <description> + Sets the variables to be used with the scene fog. See [Environment] for more details. </description> </method> <method name="environment_set_fog_depth"> @@ -1139,6 +1187,7 @@ <argument index="6" name="transmit_curve" type="float"> </argument> <description> + Sets the variables to be used with the fog depth effect. See [Environment] for more details. </description> </method> <method name="environment_set_fog_height"> @@ -1155,6 +1204,7 @@ <argument index="4" name="height_curve" type="float"> </argument> <description> + Sets the variables to be used with the fog height effect. See [Environment] for more details. </description> </method> <method name="environment_set_glow"> @@ -1183,6 +1233,7 @@ <argument index="10" name="bicubic_upscale" type="bool"> </argument> <description> + Sets the variables to be used with the "glow" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_sky"> @@ -1193,6 +1244,7 @@ <argument index="1" name="sky" type="RID"> </argument> <description> + Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.background_sky]. </description> </method> <method name="environment_set_sky_custom_fov"> @@ -1203,6 +1255,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> + Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.background_sky_custom_fov]. </description> </method> <method name="environment_set_sky_orientation"> @@ -1213,6 +1266,7 @@ <argument index="1" name="orientation" type="Basis"> </argument> <description> + Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.background_sky_orientation]. </description> </method> <method name="environment_set_ssao"> @@ -1245,6 +1299,7 @@ <argument index="12" name="bilateral_sharpness" type="float"> </argument> <description> + Sets the variables to be used with the "Screen Space Ambient Occlusion (SSAO)" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ssr"> @@ -1265,6 +1320,7 @@ <argument index="6" name="roughness" type="bool"> </argument> <description> + Sets the variables to be used with the "screen space reflections" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_tonemap"> @@ -1289,6 +1345,7 @@ <argument index="8" name="auto_exp_grey" type="float"> </argument> <description> + Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details. </description> </method> <method name="finish"> @@ -1306,6 +1363,7 @@ <argument index="1" name="frame_step" type="float" default="0.0"> </argument> <description> + Forces a frame to be drawn when the function is called. Drawing a frame updates all [Viewport]s that are set to update. Use with extreme caution. </description> </method> <method name="force_sync"> @@ -1330,7 +1388,7 @@ <argument index="0" name="info" type="int" enum="VisualServer.RenderInfo"> </argument> <description> - Returns a certain information, see [code]RENDER_INFO_*[/code] for options. + Returns a certain information, see [enum RenderInfo] for options. </description> </method> <method name="get_test_cube"> @@ -1347,6 +1405,22 @@ Returns the id of the test texture. Creates one if none exists. </description> </method> + <method name="get_video_adapter_name" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). + [b]Note:[/b] When running a headless or server binary, this function returns an empty string. + </description> + </method> + <method name="get_video_adapter_vendor" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). + [b]Note:[/b] When running a headless or server binary, this function returns an empty string. + </description> + </method> <method name="get_white_texture"> <return type="RID"> </return> @@ -1358,6 +1432,9 @@ <return type="RID"> </return> <description> + Creates a GI probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]gi_probe_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this GI probe to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="gi_probe_get_bias" qualifiers="const"> @@ -1366,6 +1443,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the bias value for the GI probe. Bias is used to avoid self occlusion. Equivalent to [member GIProbeData.bias]. </description> </method> <method name="gi_probe_get_bounds" qualifiers="const"> @@ -1374,6 +1452,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the axis-aligned bounding box that covers the full extent of the GI probe. </description> </method> <method name="gi_probe_get_cell_size" qualifiers="const"> @@ -1382,6 +1461,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the cell size set by [method gi_probe_set_cell_size]. </description> </method> <method name="gi_probe_get_dynamic_data" qualifiers="const"> @@ -1390,6 +1470,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the data used by the GI probe. </description> </method> <method name="gi_probe_get_dynamic_range" qualifiers="const"> @@ -1398,6 +1479,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the dynamic range set for this GI probe. Equivalent to [member GIProbe.dynamic_range]. </description> </method> <method name="gi_probe_get_energy" qualifiers="const"> @@ -1406,6 +1488,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the energy multiplier for this GI probe. Equivalent to [member GIProbe.energy]. </description> </method> <method name="gi_probe_get_normal_bias" qualifiers="const"> @@ -1414,6 +1497,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the normal bias for this GI probe. Equivalent to [member GIProbe.normal_bias]. </description> </method> <method name="gi_probe_get_propagation" qualifiers="const"> @@ -1422,6 +1506,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the propagation value for this GI probe. Equivalent to [member GIProbe.propagation]. </description> </method> <method name="gi_probe_get_to_cell_xform" qualifiers="const"> @@ -1430,6 +1515,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the Transform set by [method gi_probe_set_to_cell_xform]. </description> </method> <method name="gi_probe_is_compressed" qualifiers="const"> @@ -1438,6 +1524,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns [code]true[/code] if the GI probe data associated with this GI probe is compressed. Equivalent to [member GIProbe.compress]. </description> </method> <method name="gi_probe_is_interior" qualifiers="const"> @@ -1446,6 +1533,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns [code]true[/code] if the GI probe is set to interior, meaning it does not account for sky light. Equivalent to [member GIProbe.interior]. </description> </method> <method name="gi_probe_set_bias"> @@ -1456,6 +1544,7 @@ <argument index="1" name="bias" type="float"> </argument> <description> + Sets the bias value to avoid self-occlusion. Equivalent to [member GIProbe.bias]. </description> </method> <method name="gi_probe_set_bounds"> @@ -1466,6 +1555,7 @@ <argument index="1" name="bounds" type="AABB"> </argument> <description> + Sets the axis-aligned bounding box that covers the extent of the GI probe. </description> </method> <method name="gi_probe_set_cell_size"> @@ -1476,6 +1566,7 @@ <argument index="1" name="range" type="float"> </argument> <description> + Sets the size of individual cells within the GI probe. </description> </method> <method name="gi_probe_set_compress"> @@ -1486,6 +1577,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Sets the compression setting for the GI probe data. Compressed data will take up less space but may look worse. Equivalent to [member GIProbe.compress]. </description> </method> <method name="gi_probe_set_dynamic_data"> @@ -1496,6 +1588,7 @@ <argument index="1" name="data" type="PoolIntArray"> </argument> <description> + Sets the data to be used in the GI probe for lighting calculations. Normally this is created and called internally within the [GIProbe] node. You should not try to set this yourself. </description> </method> <method name="gi_probe_set_dynamic_range"> @@ -1506,6 +1599,7 @@ <argument index="1" name="range" type="int"> </argument> <description> + Sets the dynamic range of the GI probe. Dynamic range sets the limit for how bright lights can be. A smaller range captures greater detail but limits how bright lights can be. Equivalent to [member GIProbe.dynamic_range]. </description> </method> <method name="gi_probe_set_energy"> @@ -1516,6 +1610,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the energy multiplier for this GI probe. A higher energy makes the indirect light from the GI probe brighter. Equivalent to [member GIProbe.energy]. </description> </method> <method name="gi_probe_set_interior"> @@ -1526,6 +1621,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Sets the interior value of this GI probe. A GI probe set to interior does not include the sky when calculating lighting. Equivalent to [member GIProbe.interior]. </description> </method> <method name="gi_probe_set_normal_bias"> @@ -1536,6 +1632,7 @@ <argument index="1" name="bias" type="float"> </argument> <description> + Sets the normal bias for this GI probe. Normal bias behaves similar to the other form of bias and may help reduce self-occlusion. Equivalent to [member GIProbe.normal_bias]. </description> </method> <method name="gi_probe_set_propagation"> @@ -1546,6 +1643,7 @@ <argument index="1" name="propagation" type="float"> </argument> <description> + Sets the propagation of light within this GI probe. Equivalent to [member GIProbe.propagation]. </description> </method> <method name="gi_probe_set_to_cell_xform"> @@ -1556,6 +1654,7 @@ <argument index="1" name="xform" type="Transform"> </argument> <description> + Sets the to cell [Transform] for this GI probe. </description> </method> <method name="has_changed" qualifiers="const"> @@ -1571,6 +1670,7 @@ <argument index="0" name="feature" type="int" enum="VisualServer.Features"> </argument> <description> + Not yet implemented. Always returns [code]false[/code]. </description> </method> <method name="has_os_feature" qualifiers="const"> @@ -1592,6 +1692,7 @@ <argument index="2" name="texture" type="RID"> </argument> <description> + Sets up [ImmediateGeometry] internals to prepare for drawing. Equivalent to [method ImmediateGeometry.begin]. </description> </method> <method name="immediate_clear"> @@ -1600,6 +1701,7 @@ <argument index="0" name="immediate" type="RID"> </argument> <description> + Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry.clear]. </description> </method> <method name="immediate_color"> @@ -1610,12 +1712,16 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry.set_color]. </description> </method> <method name="immediate_create"> <return type="RID"> </return> <description> + Creates an immediate geometry and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]immediate_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this immediate geometry to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="immediate_end"> @@ -1624,6 +1730,7 @@ <argument index="0" name="immediate" type="RID"> </argument> <description> + Ends drawing the [ImmediateGeometry] and displays it. Equivalent to [method ImmediateGeometry.end]. </description> </method> <method name="immediate_get_material" qualifiers="const"> @@ -1632,6 +1739,7 @@ <argument index="0" name="immediate" type="RID"> </argument> <description> + Returns the material assigned to the [ImmediateGeometry]. </description> </method> <method name="immediate_normal"> @@ -1642,6 +1750,7 @@ <argument index="1" name="normal" type="Vector3"> </argument> <description> + Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry.set_normal]. </description> </method> <method name="immediate_set_material"> @@ -1652,6 +1761,7 @@ <argument index="1" name="material" type="RID"> </argument> <description> + Sets the material to be used to draw the [ImmediateGeometry]. </description> </method> <method name="immediate_tangent"> @@ -1662,6 +1772,7 @@ <argument index="1" name="tangent" type="Plane"> </argument> <description> + Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry.set_tangent]. </description> </method> <method name="immediate_uv"> @@ -1672,6 +1783,7 @@ <argument index="1" name="tex_uv" type="Vector2"> </argument> <description> + Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv]. </description> </method> <method name="immediate_uv2"> @@ -1682,6 +1794,7 @@ <argument index="1" name="tex_uv" type="Vector2"> </argument> <description> + Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv2]. </description> </method> <method name="immediate_vertex"> @@ -1692,6 +1805,7 @@ <argument index="1" name="vertex" type="Vector3"> </argument> <description> + Adds the next vertex using the information provided in advance. Equivalent to [method ImmediateGeometry.add_vertex]. </description> </method> <method name="immediate_vertex_2d"> @@ -1702,13 +1816,14 @@ <argument index="1" name="vertex" type="Vector2"> </argument> <description> + Adds the next vertex using the information provided in advance. This is a helper class that calls [method immediate_vertex] under the hood. Equivalent to [method ImmediateGeometry.add_vertex]. </description> </method> <method name="init"> <return type="void"> </return> <description> - Initializes the visual server. + Initializes the visual server. This function is called internally by platform-dependent code during engine initialization. If called from a running game, it will not do anything. </description> </method> <method name="instance_attach_object_instance_id"> @@ -1719,6 +1834,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray]. </description> </method> <method name="instance_attach_skeleton"> @@ -1729,12 +1845,16 @@ <argument index="1" name="skeleton" type="RID"> </argument> <description> + Attaches a skeleton to an instance. Removes the previous skeleton from the instance. </description> </method> <method name="instance_create"> <return type="RID"> </return> <description> + Creates a visual instance and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using [method instance_set_base]. </description> </method> <method name="instance_create2"> @@ -1745,6 +1865,8 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Creates a visual instance, adds it to the VisualServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="instance_geometry_set_as_instance_lod"> @@ -1755,6 +1877,7 @@ <argument index="1" name="as_lod_of_instance" type="RID"> </argument> <description> + Not implemented in Godot 3.x. </description> </method> <method name="instance_geometry_set_cast_shadows_setting"> @@ -1765,6 +1888,7 @@ <argument index="1" name="shadow_casting_setting" type="int" enum="VisualServer.ShadowCastingSetting"> </argument> <description> + Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance.cast_shadow]. </description> </method> <method name="instance_geometry_set_draw_range"> @@ -1781,6 +1905,7 @@ <argument index="4" name="max_margin" type="float"> </argument> <description> + Not implemented in Godot 3.x. </description> </method> <method name="instance_geometry_set_flag"> @@ -1793,6 +1918,7 @@ <argument index="2" name="enabled" type="bool"> </argument> <description> + Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details. </description> </method> <method name="instance_geometry_set_material_override"> @@ -1803,6 +1929,7 @@ <argument index="1" name="material" type="RID"> </argument> <description> + Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance.material_override]. </description> </method> <method name="instance_set_base"> @@ -1813,6 +1940,7 @@ <argument index="1" name="base" type="RID"> </argument> <description> + Sets the base of the instance. A base can be any of the 3D objects that are created in the VisualServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap capture, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario. </description> </method> <method name="instance_set_blend_shape_weight"> @@ -1825,6 +1953,7 @@ <argument index="2" name="weight" type="float"> </argument> <description> + Sets the weight for a given blend shape associated with this instance. </description> </method> <method name="instance_set_custom_aabb"> @@ -1835,6 +1964,7 @@ <argument index="1" name="aabb" type="AABB"> </argument> <description> + Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance.set_custom_aabb]. </description> </method> <method name="instance_set_exterior"> @@ -1845,6 +1975,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Function not implemented in Godot 3.x. </description> </method> <method name="instance_set_extra_visibility_margin"> @@ -1855,6 +1986,7 @@ <argument index="1" name="margin" type="float"> </argument> <description> + Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance.extra_cull_margin]. </description> </method> <method name="instance_set_layer_mask"> @@ -1865,6 +1997,7 @@ <argument index="1" name="mask" type="int"> </argument> <description> + Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance.layers]. </description> </method> <method name="instance_set_scenario"> @@ -1875,6 +2008,7 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in. </description> </method> <method name="instance_set_surface_material"> @@ -1887,6 +2021,7 @@ <argument index="2" name="material" type="RID"> </argument> <description> + Sets the material of a specific surface. Equivalent to [method MeshInstance.set_surface_material]. </description> </method> <method name="instance_set_transform"> @@ -1897,6 +2032,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets the world space transform of the instance. Equivalent to [member Spatial.transform]. </description> </method> <method name="instance_set_use_lightmap"> @@ -1909,6 +2045,7 @@ <argument index="2" name="lightmap" type="RID"> </argument> <description> + Sets the lightmap to use with this instance. </description> </method> <method name="instance_set_visible"> @@ -1919,6 +2056,7 @@ <argument index="1" name="visible" type="bool"> </argument> <description> + Sets whether an instance is drawn or not. Equivalent to [member Spatial.visible]. </description> </method> <method name="instances_cull_aabb" qualifiers="const"> @@ -1929,6 +2067,8 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update. + [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. </description> </method> <method name="instances_cull_convex" qualifiers="const"> @@ -1939,6 +2079,8 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update. + [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. </description> </method> <method name="instances_cull_ray" qualifiers="const"> @@ -1951,7 +2093,7 @@ <argument index="2" name="scenario" type="RID"> </argument> <description> - Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. + Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. </description> </method> @@ -1963,6 +2105,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight.directional_shadow_blend_splits]. </description> </method> <method name="light_directional_set_shadow_depth_range_mode"> @@ -1973,6 +2116,7 @@ <argument index="1" name="range_mode" type="int" enum="VisualServer.LightDirectionalShadowDepthRangeMode"> </argument> <description> + Sets the shadow depth range mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_depth_range]. See [enum LightDirectionalShadowDepthRangeMode] for options. </description> </method> <method name="light_directional_set_shadow_mode"> @@ -1983,6 +2127,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.LightDirectionalShadowMode"> </argument> <description> + Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options. </description> </method> <method name="light_omni_set_shadow_detail"> @@ -1993,6 +2138,7 @@ <argument index="1" name="detail" type="int" enum="VisualServer.LightOmniShadowDetail"> </argument> <description> + Sets whether to use vertical or horizontal detail for this omni light. This can be used to alleviate artifacts in the shadow map. Equivalent to [member OmniLight.omni_shadow_detail]. </description> </method> <method name="light_omni_set_shadow_mode"> @@ -2003,6 +2149,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.LightOmniShadowMode"> </argument> <description> + Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight.omni_shadow_mode]. </description> </method> <method name="light_set_color"> @@ -2013,6 +2160,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color of the light. Equivalent to [member Light.light_color]. </description> </method> <method name="light_set_cull_mask"> @@ -2023,6 +2171,7 @@ <argument index="1" name="mask" type="int"> </argument> <description> + Sets the cull mask for this Light. Lights only affect objects in the selected layers. Equivalent to [member Light.light_cull_mask]. </description> </method> <method name="light_set_negative"> @@ -2033,6 +2182,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], light will subtract light instead of adding light. Equivalent to [member Light.light_negative]. </description> </method> <method name="light_set_param"> @@ -2045,6 +2195,7 @@ <argument index="2" name="value" type="float"> </argument> <description> + Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light.set_param]. </description> </method> <method name="light_set_projector"> @@ -2055,6 +2206,7 @@ <argument index="1" name="texture" type="RID"> </argument> <description> + Not implemented in Godot 3.x. </description> </method> <method name="light_set_reverse_cull_face_mode"> @@ -2065,6 +2217,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light.shadow_reverse_cull_face]. </description> </method> <method name="light_set_shadow"> @@ -2075,6 +2228,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + If [code]true[/code], light will cast shadows. Equivalent to [member Light.shadow_enabled]. </description> </method> <method name="light_set_shadow_color"> @@ -2085,6 +2239,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color of the shadow cast by the light. Equivalent to [member Light.shadow_color]. </description> </method> <method name="light_set_use_gi"> @@ -2102,6 +2257,9 @@ <return type="RID"> </return> <description> + Creates a lightmap capture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]lightmap_capture_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this lightmap capture to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="lightmap_capture_get_bounds" qualifiers="const"> @@ -2110,6 +2268,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the size of the lightmap capture area. </description> </method> <method name="lightmap_capture_get_energy" qualifiers="const"> @@ -2118,6 +2277,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the energy multiplier used by the lightmap capture. </description> </method> <method name="lightmap_capture_get_octree" qualifiers="const"> @@ -2126,6 +2286,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the octree used by the lightmap capture. </description> </method> <method name="lightmap_capture_get_octree_cell_subdiv" qualifiers="const"> @@ -2134,6 +2295,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the cell subdivision amount used by this lightmap capture's octree. </description> </method> <method name="lightmap_capture_get_octree_cell_transform" qualifiers="const"> @@ -2142,6 +2304,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the cell transform for this lightmap capture's octree. </description> </method> <method name="lightmap_capture_set_bounds"> @@ -2152,6 +2315,7 @@ <argument index="1" name="bounds" type="AABB"> </argument> <description> + Sets the size of the area covered by the lightmap capture. Equivalent to [member BakedLightmapData.bounds]. </description> </method> <method name="lightmap_capture_set_energy"> @@ -2162,6 +2326,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the energy multiplier for this lightmap capture. Equivalent to [member BakedLightmapData.energy]. </description> </method> <method name="lightmap_capture_set_octree"> @@ -2172,6 +2337,7 @@ <argument index="1" name="octree" type="PoolByteArray"> </argument> <description> + Sets the octree to be used by this lightmap capture. This function is normally used by the [BakedLightmap] node. Equivalent to [member BakedLightmapData.octree]. </description> </method> <method name="lightmap_capture_set_octree_cell_subdiv"> @@ -2182,6 +2348,7 @@ <argument index="1" name="subdiv" type="int"> </argument> <description> + Sets the subdivision level of this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_subdiv]. </description> </method> <method name="lightmap_capture_set_octree_cell_transform"> @@ -2192,6 +2359,7 @@ <argument index="1" name="xform" type="Transform"> </argument> <description> + Sets the octree cell transform for this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_space_transform]. </description> </method> <method name="make_sphere_mesh"> @@ -2211,7 +2379,8 @@ <return type="RID"> </return> <description> - Returns an empty material. + Creates an empty material and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]material_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="material_get_param" qualifiers="const"> @@ -2233,6 +2402,7 @@ <argument index="1" name="parameter" type="String"> </argument> <description> + Returns the default value for the param if available. Otherwise returns an empty [Variant]. </description> </method> <method name="material_get_shader" qualifiers="const"> @@ -2306,7 +2476,7 @@ </return> <argument index="0" name="mesh" type="RID"> </argument> - <argument index="1" name="primtive" type="int" enum="VisualServer.PrimitiveType"> + <argument index="1" name="primitive" type="int" enum="VisualServer.PrimitiveType"> </argument> <argument index="2" name="arrays" type="Array"> </argument> @@ -2315,7 +2485,7 @@ <argument index="4" name="compress_format" type="int" default="97280"> </argument> <description> - Adds a surface generated from the Arrays to a mesh. See [code]PRIMITIVE_TYPE_*[/code] constants for types. + Adds a surface generated from the Arrays to a mesh. See [enum PrimitiveType] constants for types. </description> </method> <method name="mesh_clear"> @@ -2331,7 +2501,9 @@ <return type="RID"> </return> <description> - Creates a new mesh. + Creates a new mesh and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]mesh_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="mesh_get_blend_shape_count" qualifiers="const"> @@ -2503,6 +2675,7 @@ <argument index="3" 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"> @@ -2515,6 +2688,7 @@ <argument index="2" name="index_len" type="int"> </argument> <description> + Function is unused in Godot 3.x. </description> </method> <method name="mesh_surface_get_index_array" qualifiers="const"> @@ -2586,6 +2760,7 @@ <argument index="3" name="data" type="PoolByteArray"> </argument> <description> + Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh. </description> </method> <method name="multimesh_allocate"> @@ -2602,6 +2777,16 @@ <argument index="4" name="custom_data_format" type="int" enum="VisualServer.MultimeshCustomDataFormat" default="0"> </argument> <description> + Allocates space for the multimesh data. Format parameters determine how the data will be stored by OpenGL. See [enum MultimeshTransformFormat], [enum MultimeshColorFormat], and [enum MultimeshCustomDataFormat] for usage. Equivalent to [member MultiMesh.instance_count]. + </description> + </method> + <method name="multimesh_create"> + <return type="RID"> + </return> + <description> + Creates a new multimesh on the VisualServer and returns an [RID] handle. This RID will be used in all [code]multimesh_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="multimesh_get_aabb" qualifiers="const"> @@ -2610,6 +2795,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. </description> </method> <method name="multimesh_get_instance_count" qualifiers="const"> @@ -2618,6 +2804,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Returns the number of instances allocated for this multimesh. </description> </method> <method name="multimesh_get_mesh" qualifiers="const"> @@ -2626,6 +2813,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Returns the RID of the mesh that will be used in drawing this multimesh. </description> </method> <method name="multimesh_get_visible_instances" qualifiers="const"> @@ -2634,6 +2822,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Returns the number of visible instances for this multimesh. </description> </method> <method name="multimesh_instance_get_color" qualifiers="const"> @@ -2644,6 +2833,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the color by which the specified instance will be modulated. </description> </method> <method name="multimesh_instance_get_custom_data" qualifiers="const"> @@ -2654,6 +2844,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the custom data associated with the specified instance. </description> </method> <method name="multimesh_instance_get_transform" qualifiers="const"> @@ -2664,6 +2855,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the [Transform] of the specified instance. </description> </method> <method name="multimesh_instance_get_transform_2d" qualifiers="const"> @@ -2674,6 +2866,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms. </description> </method> <method name="multimesh_instance_set_color"> @@ -2686,6 +2879,7 @@ <argument index="2" name="color" type="Color"> </argument> <description> + Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color]. </description> </method> <method name="multimesh_instance_set_custom_data"> @@ -2698,6 +2892,7 @@ <argument index="2" name="custom_data" type="Color"> </argument> <description> + Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a [code]vec4[/code] in the shader. Equivalent to [method MultiMesh.set_instance_custom_data]. </description> </method> <method name="multimesh_instance_set_transform"> @@ -2710,6 +2905,7 @@ <argument index="2" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. </description> </method> <method name="multimesh_instance_set_transform_2d"> @@ -2722,6 +2918,7 @@ <argument index="2" name="transform" type="Transform2D"> </argument> <description> + Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d]. </description> </method> <method name="multimesh_set_as_bulk_array"> @@ -2732,6 +2929,11 @@ <argument index="1" name="array" type="PoolRealArray"> </argument> <description> + Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative. + + All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc. + + [Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, [code]COLOR_8BIT[/code] / [code]CUSTOM_DATA_8BIT[/code] is stored as 1 float (4 bytes as is) and [code]COLOR_FLOAT[/code] / [code]CUSTOM_DATA_FLOAT[/code] is stored as 4 floats. </description> </method> <method name="multimesh_set_mesh"> @@ -2742,6 +2944,7 @@ <argument index="1" name="mesh" type="RID"> </argument> <description> + Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh]. </description> </method> <method name="multimesh_set_visible_instances"> @@ -2752,18 +2955,25 @@ <argument index="1" name="visible" type="int"> </argument> <description> + Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count]. </description> </method> <method name="omni_light_create"> <return type="RID"> </return> <description> + Creates a new omni light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this omni light to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="particles_create"> <return type="RID"> </return> <description> + Creates a particle system and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]particles_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach these particles to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="particles_get_current_aabb"> @@ -2772,6 +2982,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method Particles.capture_aabb]. </description> </method> <method name="particles_get_emitting"> @@ -2780,6 +2991,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Returns [code]true[/code] if particles are currently set to emitting. </description> </method> <method name="particles_is_inactive"> @@ -2788,6 +3000,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Returns [code]true[/code] if particles are not emitting and particles are set to inactive. </description> </method> <method name="particles_request_process"> @@ -2796,6 +3009,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray]. </description> </method> <method name="particles_restart"> @@ -2804,6 +3018,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Reset the particles on the next update. Equivalent to [method Particles.restart] </description> </method> <method name="particles_set_amount"> @@ -2814,6 +3029,7 @@ <argument index="1" name="amount" type="int"> </argument> <description> + Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member Particles.amount]. </description> </method> <method name="particles_set_custom_aabb"> @@ -2824,6 +3040,7 @@ <argument index="1" name="aabb" type="AABB"> </argument> <description> + Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member Particles.visibility_aabb]. </description> </method> <method name="particles_set_draw_order"> @@ -2834,6 +3051,7 @@ <argument index="1" name="order" type="int" enum="VisualServer.ParticlesDrawOrder"> </argument> <description> + Sets the draw order of the particles to one of the named enums from [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member Particles.draw_order]. </description> </method> <method name="particles_set_draw_pass_mesh"> @@ -2846,6 +3064,7 @@ <argument index="2" name="mesh" type="RID"> </argument> <description> + Sets the mesh to be used for the specified draw pass. Equivalent to [member Particles.draw_pass_1], [member Particles.draw_pass_2], [member Particles.draw_pass_3], and [member Particles.draw_pass_4]. </description> </method> <method name="particles_set_draw_passes"> @@ -2856,6 +3075,7 @@ <argument index="1" name="count" type="int"> </argument> <description> + Sets the number of draw passes to use. Equivalent to [member Particles.draw_passes]. </description> </method> <method name="particles_set_emission_transform"> @@ -2866,6 +3086,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] that will be used by the particles when they first emit. </description> </method> <method name="particles_set_emitting"> @@ -2876,6 +3097,7 @@ <argument index="1" name="emitting" type="bool"> </argument> <description> + If [code]true[/code], particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member Particles.emitting]. </description> </method> <method name="particles_set_explosiveness_ratio"> @@ -2886,6 +3108,7 @@ <argument index="1" name="ratio" type="float"> </argument> <description> + Sets the explosiveness ratio. Equivalent to [member Particles.explosiveness]. </description> </method> <method name="particles_set_fixed_fps"> @@ -2896,6 +3119,7 @@ <argument index="1" name="fps" type="int"> </argument> <description> + Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member Particles.fixed_fps]. </description> </method> <method name="particles_set_fractional_delta"> @@ -2906,6 +3130,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member Particles.fract_delta]. </description> </method> <method name="particles_set_lifetime"> @@ -2916,6 +3141,7 @@ <argument index="1" name="lifetime" type="float"> </argument> <description> + Sets the lifetime of each particle in the system. Equivalent to [member Particles.lifetime]. </description> </method> <method name="particles_set_one_shot"> @@ -2926,6 +3152,7 @@ <argument index="1" name="one_shot" type="bool"> </argument> <description> + If [code]true[/code], particles will emit once and then stop. Equivalent to [member Particles.one_shot]. </description> </method> <method name="particles_set_pre_process_time"> @@ -2936,6 +3163,7 @@ <argument index="1" name="time" type="float"> </argument> <description> + Sets the preprocess time for the particles animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member Particles.preprocess]. </description> </method> <method name="particles_set_process_material"> @@ -2946,6 +3174,7 @@ <argument index="1" name="material" type="RID"> </argument> <description> + Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to [member Particles.process_material]. </description> </method> <method name="particles_set_randomness_ratio"> @@ -2956,6 +3185,7 @@ <argument index="1" name="ratio" type="float"> </argument> <description> + Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member Particles.randomness]. </description> </method> <method name="particles_set_speed_scale"> @@ -2966,6 +3196,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> + Sets the speed scale of the particle system. Equivalent to [member Particles.speed_scale]. </description> </method> <method name="particles_set_use_local_coordinates"> @@ -2976,12 +3207,16 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member Particles.local_coords]. </description> </method> <method name="reflection_probe_create"> <return type="RID"> </return> <description> + Creates a reflection probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]reflection_probe_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="reflection_probe_set_as_interior"> @@ -2992,6 +3227,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable]. </description> </method> <method name="reflection_probe_set_cull_mask"> @@ -3002,6 +3238,7 @@ <argument index="1" name="layers" type="int"> </argument> <description> + Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask]. </description> </method> <method name="reflection_probe_set_enable_box_projection"> @@ -3012,6 +3249,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]. </description> </method> <method name="reflection_probe_set_enable_shadows"> @@ -3022,6 +3260,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]. </description> </method> <method name="reflection_probe_set_extents"> @@ -3032,6 +3271,7 @@ <argument index="1" name="extents" type="Vector3"> </argument> <description> + Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]. </description> </method> <method name="reflection_probe_set_intensity"> @@ -3042,6 +3282,7 @@ <argument index="1" name="intensity" type="float"> </argument> <description> + Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. </description> </method> <method name="reflection_probe_set_interior_ambient"> @@ -3052,6 +3293,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color]. </description> </method> <method name="reflection_probe_set_interior_ambient_energy"> @@ -3062,6 +3304,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_energy]. </description> </method> <method name="reflection_probe_set_interior_ambient_probe_contribution"> @@ -3072,6 +3315,7 @@ <argument index="1" name="contrib" type="float"> </argument> <description> + Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [member ReflectionProbe.interior_ambient_contrib]. </description> </method> <method name="reflection_probe_set_max_distance"> @@ -3082,6 +3326,7 @@ <argument index="1" name="distance" type="float"> </argument> <description> + Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance]. </description> </method> <method name="reflection_probe_set_origin_offset"> @@ -3092,6 +3337,7 @@ <argument index="1" name="offset" type="Vector3"> </argument> <description> + Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset]. </description> </method> <method name="reflection_probe_set_update_mode"> @@ -3102,6 +3348,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.ReflectionProbeUpdateMode"> </argument> <description> + Sets how often the reflection probe updates. Can either be once or every frame. See [enum ReflectionProbeUpdateMode] for options. </description> </method> <method name="request_frame_drawn_callback"> @@ -3122,6 +3369,9 @@ <return type="RID"> </return> <description> + Creates a scenario and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]scenario_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + The scenario is the 3D world that all the visual instances exist in. </description> </method> <method name="scenario_set_debug"> @@ -3132,6 +3382,7 @@ <argument index="1" name="debug_mode" type="int" enum="VisualServer.ScenarioDebugMode"> </argument> <description> + Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options. </description> </method> <method name="scenario_set_environment"> @@ -3142,6 +3393,7 @@ <argument index="1" name="environment" type="RID"> </argument> <description> + Sets the environment that will be used with this scenario. </description> </method> <method name="scenario_set_fallback_environment"> @@ -3152,6 +3404,7 @@ <argument index="1" name="environment" type="RID"> </argument> <description> + Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment. </description> </method> <method name="scenario_set_reflection_atlas_size"> @@ -3164,6 +3417,7 @@ <argument index="2" name="subdiv" type="int"> </argument> <description> + Sets the size of the reflection atlas shared by all reflection probes in this scenario. </description> </method> <method name="set_boot_image"> @@ -3187,6 +3441,7 @@ <argument index="0" name="generate" type="bool"> </argument> <description> + If [code]true[/code], the engine will generate wireframes for use with the wireframe debug mode. </description> </method> <method name="set_default_clear_color"> @@ -3195,13 +3450,15 @@ <argument index="0" name="color" type="Color"> </argument> <description> + Sets the default clear color which is used when a specific clear color has not been selected. </description> </method> <method name="shader_create"> <return type="RID"> </return> <description> - Creates an empty shader. + Creates an empty shader and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]shader_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="shader_get_code" qualifiers="const"> @@ -3267,6 +3524,7 @@ <argument index="2" name="is_2d_skeleton" type="bool" default="false"> </argument> <description> + Allocates the GPU buffers for this skeleton. </description> </method> <method name="skeleton_bone_get_transform" qualifiers="const"> @@ -3277,6 +3535,7 @@ <argument index="1" name="bone" type="int"> </argument> <description> + Returns the [Transform] set for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_get_transform_2d" qualifiers="const"> @@ -3287,6 +3546,7 @@ <argument index="1" name="bone" type="int"> </argument> <description> + Returns the [Transform2D] set for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_set_transform"> @@ -3299,6 +3559,7 @@ <argument index="2" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_set_transform_2d"> @@ -3311,12 +3572,15 @@ <argument index="2" name="transform" type="Transform2D"> </argument> <description> + Sets the [Transform2D] for a specific bone of this skeleton. </description> </method> <method name="skeleton_create"> <return type="RID"> </return> <description> + Creates a skeleton and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]skeleton_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="skeleton_get_bone_count" qualifiers="const"> @@ -3325,13 +3589,15 @@ <argument index="0" name="skeleton" type="RID"> </argument> <description> + Returns the number of bones allocated for this skeleton. </description> </method> <method name="sky_create"> <return type="RID"> </return> <description> - Creates an empty sky. + Creates an empty sky and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]sky_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="sky_set_texture"> @@ -3351,12 +3617,16 @@ <return type="RID"> </return> <description> + Creates a spot light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="sync"> <return type="void"> </return> <description> + Not implemented in Godot 3.x. </description> </method> <method name="texture_allocate"> @@ -3377,6 +3647,7 @@ <argument index="6" name="flags" type="int" default="7"> </argument> <description> + Allocates the GPU memory for the texture. </description> </method> <method name="texture_bind"> @@ -3394,7 +3665,8 @@ <return type="RID"> </return> <description> - Creates an empty texture. + Creates an empty texture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]texture_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="texture_create_from_image"> @@ -3432,6 +3704,7 @@ <argument index="0" name="texture" type="RID"> </argument> <description> + Returns the depth of the texture. </description> </method> <method name="texture_get_flags" qualifiers="const"> @@ -3485,6 +3758,7 @@ <argument index="0" name="texture" type="RID"> </argument> <description> + Returns the type of the texture, can be any of the [enum TextureType]. </description> </method> <method name="texture_get_width" qualifiers="const"> @@ -3533,6 +3807,7 @@ <argument index="9" name="layer" type="int" default="0"> </argument> <description> + Sets a part of the data for a texture. Warning: this function calls the underlying graphics API directly and may corrupt your texture if used improperly. </description> </method> <method name="texture_set_flags"> @@ -3578,6 +3853,7 @@ <argument index="3" name="depth" type="int"> </argument> <description> + Resizes the texture to the specified dimensions. </description> </method> <method name="textures_keep_original"> @@ -3635,7 +3911,8 @@ <return type="RID"> </return> <description> - Creates an empty viewport. + Creates an empty viewport and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]viewport_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="viewport_detach"> @@ -3655,7 +3932,7 @@ <argument index="1" name="info" type="int" enum="VisualServer.ViewportRenderInfo"> </argument> <description> - Returns a viewport's render information. For options, see the [code]VIEWPORT_RENDER_INFO*[/code] constants. + Returns a viewport's render information. For options, see the [enum ViewportRenderInfo] constants. </description> </method> <method name="viewport_get_texture" qualifiers="const"> @@ -3803,6 +4080,7 @@ <argument index="1" name="hidden" type="bool"> </argument> <description> + Currently unimplemented in Godot 3.x. </description> </method> <method name="viewport_set_msaa"> @@ -3946,10 +4224,12 @@ <signals> <signal name="frame_post_draw"> <description> + Emitted at the end of the frame, after the VisualServer has finished updating all the Viewports. </description> </signal> <signal name="frame_pre_draw"> <description> + Emitted at the beginning of the frame, before the VisualServer updates all the Viewports. </description> </signal> </signals> @@ -3958,6 +4238,7 @@ Marks an error that shows that the index array is empty. </constant> <constant name="ARRAY_WEIGHTS_SIZE" value="4"> + Number of weights/bones per vertex. </constant> <constant name="CANVAS_ITEM_Z_MIN" value="-4096"> The minimum Z-layer for canvas items. @@ -3966,8 +4247,10 @@ The maximum Z-layer for canvas items. </constant> <constant name="MAX_GLOW_LEVELS" value="7"> + Max number of glow levels that can be used with glow post-process effect. </constant> <constant name="MAX_CURSORS" value="8"> + Unused enum in Godot 3.x. </constant> <constant name="MATERIAL_RENDER_PRIORITY_MIN" value="-128"> The minimum renderpriority of all materials. @@ -3994,12 +4277,16 @@ Marks the back side of a cubemap. </constant> <constant name="TEXTURE_TYPE_2D" value="0" enum="TextureType"> + Normal texture with 2 dimensions, width and height. </constant> <constant name="TEXTURE_TYPE_CUBEMAP" value="1" enum="TextureType"> + Texture made up of six faces, can be looked up with a [code]vec3[/code] in shader. </constant> <constant name="TEXTURE_TYPE_2D_ARRAY" value="2" enum="TextureType"> + An array of 2-dimensional textures. </constant> <constant name="TEXTURE_TYPE_3D" value="3" enum="TextureType"> + A 3-dimensional texture with width, height, and depth. </constant> <constant name="TEXTURE_FLAG_MIPMAPS" value="1" enum="TextureFlags"> Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. @@ -4114,11 +4401,13 @@ Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. </constant> <constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat"> + Flag used to mark a compressed bone array. </constant> <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat"> Flag used to mark a compressed (half float) weight array. </constant> <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat"> + Flag used to mark a compressed index array. </constant> <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat"> Flag used to mark that the array contains 2D vertices. @@ -4154,8 +4443,10 @@ Represents the size of the [enum PrimitiveType] enum. </constant> <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> + Blend shapes are normalized. </constant> <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode"> + Blend shapes are relative to base weight. </constant> <constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType"> Is a directional (sun) light. @@ -4188,47 +4479,67 @@ Scales the shadow color. </constant> <constant name="LIGHT_PARAM_SHADOW_MAX_DISTANCE" value="8" enum="LightParam"> + Max distance that shadows will be rendered. </constant> <constant name="LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="LightParam"> + Proportion of shadow atlas occupied by the first split. </constant> <constant name="LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="LightParam"> + Proportion of shadow atlas occupied by the second split. </constant> <constant name="LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="LightParam"> + Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. </constant> <constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="12" enum="LightParam"> + Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. </constant> <constant name="LIGHT_PARAM_SHADOW_BIAS" value="13" enum="LightParam"> + Bias the shadow lookup to fix self-shadowing artifacts. </constant> <constant name="LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE" value="14" enum="LightParam"> + Increases bias on further splits to fix self-shadowing that only occurs far away from the camera. </constant> <constant name="LIGHT_PARAM_MAX" value="15" enum="LightParam"> Represents the size of the [enum LightParam] enum. </constant> <constant name="LIGHT_OMNI_SHADOW_DUAL_PARABOLOID" value="0" enum="LightOmniShadowMode"> + Use a dual paraboloid shadow map for omni lights. </constant> <constant name="LIGHT_OMNI_SHADOW_CUBE" value="1" enum="LightOmniShadowMode"> + Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. </constant> <constant name="LIGHT_OMNI_SHADOW_DETAIL_VERTICAL" value="0" enum="LightOmniShadowDetail"> + Use more detail vertically when computing shadow map. </constant> <constant name="LIGHT_OMNI_SHADOW_DETAIL_HORIZONTAL" value="1" enum="LightOmniShadowDetail"> + Use more detail horizontally when computing shadow map. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL" value="0" enum="LightDirectionalShadowMode"> + Use orthogonal shadow projection for directional light. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS" value="1" enum="LightDirectionalShadowMode"> + Use 2 splits for shadow projection when using directional light. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS" value="2" enum="LightDirectionalShadowMode"> + Use 4 splits for shadow projection when using directional light. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE" value="0" enum="LightDirectionalShadowDepthRangeMode"> + Keeps shadows stable as camera moves but has lower effective resolution. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED" value="1" enum="LightDirectionalShadowDepthRangeMode"> + Optimize use of shadow maps, increasing the effective resolution. But may result in shadows moving or flickering slightly. </constant> <constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode"> + Do not update the viewport. </constant> <constant name="VIEWPORT_UPDATE_ONCE" value="1" enum="ViewportUpdateMode"> + Update the viewport once then set to disabled. </constant> <constant name="VIEWPORT_UPDATE_WHEN_VISIBLE" value="2" enum="ViewportUpdateMode"> + Update the viewport whenever it is visible. </constant> <constant name="VIEWPORT_UPDATE_ALWAYS" value="3" enum="ViewportUpdateMode"> + Always update the viewport. </constant> <constant name="VIEWPORT_CLEAR_ALWAYS" value="0" enum="ViewportClearMode"> The viewport is always cleared before drawing. @@ -4273,16 +4584,22 @@ The Viewport renders 3D but without effects. </constant> <constant name="VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME" value="0" enum="ViewportRenderInfo"> + Number of objects drawn in a single frame. </constant> <constant name="VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME" value="1" enum="ViewportRenderInfo"> + Number of vertices drawn in a single frame. </constant> <constant name="VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME" value="2" enum="ViewportRenderInfo"> + Number of material changes during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME" value="3" enum="ViewportRenderInfo"> + Number of shader changes during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME" value="4" enum="ViewportRenderInfo"> + Number of surface changes during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME" value="5" enum="ViewportRenderInfo"> + Number of draw calls during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_MAX" value="6" enum="ViewportRenderInfo"> Represents the size of the [enum ViewportRenderInfo] enum. @@ -4300,12 +4617,16 @@ Debug draw draws objects in wireframe. </constant> <constant name="SCENARIO_DEBUG_DISABLED" value="0" enum="ScenarioDebugMode"> + Do not use a debug mode. </constant> <constant name="SCENARIO_DEBUG_WIREFRAME" value="1" enum="ScenarioDebugMode"> + Draw all objects as wireframe models. </constant> <constant name="SCENARIO_DEBUG_OVERDRAW" value="2" enum="ScenarioDebugMode"> + Draw all objects in a way that displays how much overdraw is occurring. Overdraw occurs when a section of pixels is drawn and shaded and then another object covers it up. To optimize a scene, you should reduce overdraw. </constant> <constant name="SCENARIO_DEBUG_SHADELESS" value="3" enum="ScenarioDebugMode"> + Draw all objects without shading. Equivalent to setting all objects shaders to [code]unshaded[/code]. </constant> <constant name="INSTANCE_NONE" value="0" enum="InstanceType"> The instance does not have a type. @@ -4326,10 +4647,13 @@ The instance is a light. </constant> <constant name="INSTANCE_REFLECTION_PROBE" value="6" enum="InstanceType"> + The instance is a reflection probe. </constant> <constant name="INSTANCE_GI_PROBE" value="7" enum="InstanceType"> + The instance is a GI probe. </constant> <constant name="INSTANCE_LIGHTMAP_CAPTURE" value="8" enum="InstanceType"> + The instance is a lightmap capture. </constant> <constant name="INSTANCE_MAX" value="9" enum="InstanceType"> Represents the size of the [enum InstanceType] enum. @@ -4338,19 +4662,25 @@ A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). </constant> <constant name="INSTANCE_FLAG_USE_BAKED_LIGHT" value="0" enum="InstanceFlags"> + Allows the instance to be used in baked lighting. </constant> <constant name="INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="1" enum="InstanceFlags"> + When set, manually requests to draw geometry on next frame. </constant> <constant name="INSTANCE_FLAG_MAX" value="2" enum="InstanceFlags"> Represents the size of the [enum InstanceFlags] enum. </constant> <constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting"> + Disable shadows from this instance. </constant> <constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="ShadowCastingSetting"> + Cast shadows from this instance. </constant> <constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="ShadowCastingSetting"> + Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows. </constant> <constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="ShadowCastingSetting"> + Only render the shadows from the object. The object itself will not be drawn. </constant> <constant name="NINE_PATCH_STRETCH" value="0" enum="NinePatchAxisMode"> The nine patch gets stretched where needed. @@ -4374,16 +4704,22 @@ 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> <constant name="CANVAS_LIGHT_FILTER_PCF3" value="1" enum="CanvasLightShadowFilter"> + Use PCF3 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF5" value="2" enum="CanvasLightShadowFilter"> + Use PCF5 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF7" value="3" enum="CanvasLightShadowFilter"> + Use PCF7 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF9" value="4" enum="CanvasLightShadowFilter"> + Use PCF9 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF13" value="5" enum="CanvasLightShadowFilter"> + Use PCF13 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_OCCLUDER_POLYGON_CULL_DISABLED" value="0" enum="CanvasOccluderPolygonCullMode"> Culling of the canvas occluder is disabled. @@ -4425,85 +4761,124 @@ The amount of vertex memory used. </constant> <constant name="FEATURE_SHADERS" value="0" enum="Features"> + Hardware supports shaders. This enum is currently unused in Godot 3.x. </constant> <constant name="FEATURE_MULTITHREADED" value="1" enum="Features"> + Hardware supports multithreading. This enum is currently unused in Godot 3.x. </constant> <constant name="MULTIMESH_TRANSFORM_2D" value="0" enum="MultimeshTransformFormat"> + Use [Transform2D] to store MultiMesh transform. </constant> <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat"> + Use [Transform] to store MultiMesh transform. </constant> <constant name="MULTIMESH_COLOR_NONE" value="0" enum="MultimeshColorFormat"> + MultiMesh does not use per-instance color. </constant> <constant name="MULTIMESH_COLOR_8BIT" value="1" enum="MultimeshColorFormat"> + MultiMesh color uses 8 bits per component. This packs the color into a single float. </constant> <constant name="MULTIMESH_COLOR_FLOAT" value="2" enum="MultimeshColorFormat"> + MultiMesh color uses a float per channel. </constant> <constant name="MULTIMESH_CUSTOM_DATA_NONE" value="0" enum="MultimeshCustomDataFormat"> + MultiMesh does not use custom data. </constant> <constant name="MULTIMESH_CUSTOM_DATA_8BIT" value="1" enum="MultimeshCustomDataFormat"> + MultiMesh custom data uses 8 bits per component. This packs the 4-component custom data into a single float. </constant> <constant name="MULTIMESH_CUSTOM_DATA_FLOAT" value="2" enum="MultimeshCustomDataFormat"> + MultiMesh custom data uses a float per component. </constant> <constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode"> + Reflection probe will update reflections once and then stop. </constant> <constant name="REFLECTION_PROBE_UPDATE_ALWAYS" value="1" enum="ReflectionProbeUpdateMode"> + Reflection probe will update each frame. This mode is necessary to capture moving objects. </constant> <constant name="PARTICLES_DRAW_ORDER_INDEX" value="0" enum="ParticlesDrawOrder"> + Draw particles in the order that they appear in the particles array. </constant> <constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder"> + Sort particles based on their lifetime. </constant> <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder"> + Sort particles based on their distance to the camera. </constant> <constant name="ENV_BG_CLEAR_COLOR" value="0" enum="EnvironmentBG"> + Use the clear color as background. </constant> <constant name="ENV_BG_COLOR" value="1" enum="EnvironmentBG"> + Use a specified color as the background. </constant> <constant name="ENV_BG_SKY" value="2" enum="EnvironmentBG"> + Use a sky resource for the background. </constant> <constant name="ENV_BG_COLOR_SKY" value="3" enum="EnvironmentBG"> + Use a custom color for background, but use a sky for shading and reflections. </constant> <constant name="ENV_BG_CANVAS" value="4" enum="EnvironmentBG"> + Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. </constant> <constant name="ENV_BG_KEEP" value="5" enum="EnvironmentBG"> + Do not clear the background, use whatever was rendered last frame as the background. </constant> <constant name="ENV_BG_MAX" value="7" enum="EnvironmentBG"> Represents the size of the [enum EnvironmentBG] enum. </constant> <constant name="ENV_DOF_BLUR_QUALITY_LOW" value="0" enum="EnvironmentDOFBlurQuality"> + Use lowest blur quality. Fastest, but may look bad. </constant> <constant name="ENV_DOF_BLUR_QUALITY_MEDIUM" value="1" enum="EnvironmentDOFBlurQuality"> + Use medium blur quality. </constant> <constant name="ENV_DOF_BLUR_QUALITY_HIGH" value="2" enum="EnvironmentDOFBlurQuality"> + Used highest blur quality. Looks the best, but is the slowest. </constant> <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="EnvironmentGlowBlendMode"> + Add the effect of the glow on top of the scene. </constant> <constant name="GLOW_BLEND_MODE_SCREEN" value="1" enum="EnvironmentGlowBlendMode"> + Blends the glow effect with the screen. Does not get as bright as additive. </constant> <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="EnvironmentGlowBlendMode"> + Produces a subtle color disturbance around objects. </constant> <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="EnvironmentGlowBlendMode"> + Shows the glow effect by itself without the underlying scene. </constant> <constant name="ENV_TONE_MAPPER_LINEAR" value="0" enum="EnvironmentToneMapper"> + Output color as they came in. </constant> <constant name="ENV_TONE_MAPPER_REINHARD" value="1" enum="EnvironmentToneMapper"> + Use the Reinhard tonemapper. </constant> <constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper"> + Use the filmic tonemapper. </constant> <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper"> + Use the ACES tonemapper. </constant> <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality"> + Lowest quality of screen space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality"> + Medium quality screen space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality"> + Highest quality screen space ambient occlusion. </constant> <constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur"> + Disables the blur set for SSAO. Will make SSAO look noisier. </constant> <constant name="ENV_SSAO_BLUR_1x1" value="1" enum="EnvironmentSSAOBlur"> + Perform a 1x1 blur on the SSAO output. </constant> <constant name="ENV_SSAO_BLUR_2x2" value="2" enum="EnvironmentSSAOBlur"> + Performs a 2x2 blur on the SSAO output. </constant> <constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur"> + Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO. </constant> </constants> </class> |