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.xml136
1 files changed, 111 insertions, 25 deletions
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index ddb25788c8..009e9d3df4 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -15,7 +15,7 @@
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 title="Optimization using Servers">https://docs.godotengine.org/en/latest/tutorials/performance/using_servers.html</link>
+ <link title="Optimization using Servers">$DOCS_URL/tutorials/performance/using_servers.html</link>
</tutorials>
<methods>
<method name="bake_render_uv2">
@@ -1068,7 +1068,7 @@
<argument index="8" name="light_affect" type="float" />
<argument index="9" name="ao_channel_affect" type="float" />
<description>
- Sets the variables to be used with the "screen space ambient occlusion" post-process effect. See [Environment] for more details.
+ 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_ssao_quality">
@@ -1080,6 +1080,19 @@
<argument index="4" name="fadeout_from" type="float" />
<argument index="5" name="fadeout_to" type="float" />
<description>
+ Sets the quality level of the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details.
+ </description>
+ </method>
+ <method name="environment_set_ssil_quality">
+ <return type="void" />
+ <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSILQuality" />
+ <argument index="1" name="half_size" type="bool" />
+ <argument index="2" name="adaptive_target" type="float" />
+ <argument index="3" name="blur_passes" type="int" />
+ <argument index="4" name="fadeout_from" type="float" />
+ <argument index="5" name="fadeout_to" type="float" />
+ <description>
+ Sets the quality level of the screen-space indirect lighting (SSIL) post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ssr">
@@ -1232,6 +1245,13 @@
[b]Note:[/b] When running a headless or server binary, this function returns an empty string.
</description>
</method>
+ <method name="get_video_adapter_type" qualifiers="const">
+ <return type="int" enum="RenderingDevice.DeviceType" />
+ <description>
+ Returns the type of the video adapter. Since dedicated graphics cards from a given generation will [i]usually[/i] be significantly faster than integrated graphics made in the same generation, the device type can be used as a basis for automatic graphics settings adjustment. However, this is not always true, so make sure to provide users with a way to manually override graphics settings.
+ [b]Note:[/b] When using the OpenGL backend or when running in headless mode, this function always returns [constant RenderingDevice.DEVICE_TYPE_OTHER].
+ </description>
+ </method>
<method name="get_video_adapter_vendor" qualifiers="const">
<return type="String" />
<description>
@@ -1245,6 +1265,13 @@
Returns the id of a white texture. Creates one if none exists.
</description>
</method>
+ <method name="gi_set_use_half_resolution">
+ <return type="void" />
+ <argument index="0" name="half_resolution" type="bool" />
+ <description>
+ If [code]half_resolution[/code] is [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. See also [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution].
+ </description>
+ </method>
<method name="global_variable_add">
<return type="void" />
<argument index="0" name="name" type="StringName" />
@@ -1396,6 +1423,14 @@
<description>
</description>
</method>
+ <method name="instance_geometry_set_material_overlay">
+ <return type="void" />
+ <argument index="0" name="instance" type="RID" />
+ <argument index="1" name="material" type="RID" />
+ <description>
+ Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_overlay].
+ </description>
+ </method>
<method name="instance_geometry_set_material_override">
<return type="void" />
<argument index="0" name="instance" type="RID" />
@@ -2535,19 +2570,19 @@
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_lod_threshold">
+ <method name="reflection_probe_set_max_distance">
<return type="void" />
<argument index="0" name="probe" type="RID" />
- <argument index="1" name="pixels" type="float" />
+ <argument index="1" name="distance" type="float" />
<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_max_distance">
+ <method name="reflection_probe_set_mesh_lod_threshold">
<return type="void" />
<argument index="0" name="probe" type="RID" />
- <argument index="1" name="distance" type="float" />
+ <argument index="1" name="pixels" type="float" />
<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">
@@ -3100,6 +3135,22 @@
If [code]true[/code], rendering of a viewport's environment is disabled.
</description>
</method>
+ <method name="viewport_set_fsr_mipmap_bias">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="mipmap_bias" type="float" />
+ <description>
+ Affects the final texture sharpness by reading from a lower or higher mipmap. Negative values make textures sharper, while positive values make textures blurrier. When using FSR, this value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]
+ </description>
+ </method>
+ <method name="viewport_set_fsr_sharpness">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="sharpness" type="float" />
+ <description>
+ Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
+ </description>
+ </method>
<method name="viewport_set_global_canvas_transform">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
@@ -3151,12 +3202,21 @@
If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the [code]SCREEN_TEXTURE[/code]. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size.
</description>
</method>
- <method name="viewport_set_scale_3d">
+ <method name="viewport_set_scaling_3d_mode">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="scaling_3d_mode" type="int" enum="RenderingServer.ViewportScaling3DMode" />
+ <description>
+ Sets scaling 3d mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
+ </description>
+ </method>
+ <method name="viewport_set_scaling_3d_scale">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="scale" type="float" />
<description>
- Sets the scale at which we render 3D contents.
+ Scales the 3D render buffer based on the viewport size uses an image filter specified in [enum ViewportScaling3DMode] to scale the output image to the full viewport size. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [enum ViewportMSAA] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
+ When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale.
</description>
</method>
<method name="viewport_set_scenario">
@@ -3844,6 +3904,14 @@
<constant name="FOG_VOLUME_SHAPE_WORLD" value="2" enum="FogVolumeShape">
[FogVolume] will have no shape, will cover the whole world and will not be culled.
</constant>
+ <constant name="VIEWPORT_SCALING_3D_MODE_BILINEAR" value="0" enum="ViewportScaling3DMode">
+ Enables bilinear scaling on 3D viewports. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling.
+ </constant>
+ <constant name="VIEWPORT_SCALING_3D_MODE_FSR" value="1" enum="ViewportScaling3DMode">
+ Enables FSR upscaling on 3D viewports. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less then [code]1.0[/code] will be result in the viewport being upscaled using FSR. Values greater than [code]1.0[/code] are not supported and bilinear supersampling will be used instead. A value of [code]1.0[/code] disables scaling.
+ </constant>
+ <constant name="VIEWPORT_SCALING_3D_MODE_MAX" value="2" enum="ViewportScaling3DMode">
+ </constant>
<constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode">
Do not update the viewport.
</constant>
@@ -3968,28 +4036,31 @@
<constant name="VIEWPORT_DEBUG_DRAW_SSAO" value="12" enum="ViewportDebugDraw">
Draws the screen space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment].
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_PSSM_SPLITS" value="13" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_SSIL" value="13" enum="ViewportDebugDraw">
+ Draws the screen space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssil_enabled] set in your [WorldEnvironment].
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_PSSM_SPLITS" value="14" enum="ViewportDebugDraw">
Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order they will be colored red, green, blue, yellow.
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_DECAL_ATLAS" value="14" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_DECAL_ATLAS" value="15" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_SDFGI" value="15" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_SDFGI" value="16" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_SDFGI_PROBES" value="16" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_SDFGI_PROBES" value="17" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="17" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="18" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_DISABLE_LOD" value="18" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_DISABLE_LOD" value="19" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="19" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="20" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="20" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="21" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS" value="21" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS" value="22" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="22" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="23" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="23" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="24" enum="ViewportDebugDraw">
</constant>
<constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode">
</constant>
@@ -4080,19 +4151,34 @@
<constant name="ENV_SSR_ROUGNESS_QUALITY_HIGH" value="3" enum="EnvironmentSSRRoughnessQuality">
</constant>
<constant name="ENV_SSAO_QUALITY_VERY_LOW" value="0" enum="EnvironmentSSAOQuality">
- Lowest quality of screen space ambient occlusion.
+ Lowest quality of screen-space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_LOW" value="1" enum="EnvironmentSSAOQuality">
- Low quality screen space ambient occlusion.
+ Low quality screen-space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_MEDIUM" value="2" enum="EnvironmentSSAOQuality">
- Medium quality screen space ambient occlusion.
+ Medium quality screen-space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_HIGH" value="3" enum="EnvironmentSSAOQuality">
- High quality screen space ambient occlusion.
+ High quality screen-space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_ULTRA" value="4" enum="EnvironmentSSAOQuality">
- Highest quality screen space ambient occlusion. Uses the adaptive setting which can be dynamically adjusted to smoothly balance performance and visual quality.
+ Highest quality screen-space ambient occlusion. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
+ </constant>
+ <constant name="ENV_SSIL_QUALITY_VERY_LOW" value="0" enum="EnvironmentSSILQuality">
+ Lowest quality of screen-space indirect lighting.
+ </constant>
+ <constant name="ENV_SSIL_QUALITY_LOW" value="1" enum="EnvironmentSSILQuality">
+ Low quality screen-space indirect lighting.
+ </constant>
+ <constant name="ENV_SSIL_QUALITY_MEDIUM" value="2" enum="EnvironmentSSILQuality">
+ High quality screen-space indirect lighting.
+ </constant>
+ <constant name="ENV_SSIL_QUALITY_HIGH" value="3" enum="EnvironmentSSILQuality">
+ High quality screen-space indirect lighting.
+ </constant>
+ <constant name="ENV_SSIL_QUALITY_ULTRA" value="4" enum="EnvironmentSSILQuality">
+ Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
</constant>
<constant name="ENV_SDFGI_CASCADES_4" value="0" enum="EnvironmentSDFGICascades">
</constant>