reckfellENGINE

RenderingServer

A low-level API for rendering resources and instances.

On this page
class RenderingServerReckfellSharp

An ordinary MeshInstance3D already manages mesh placement and tree integration. Direct RenderingServer use lets you create an instance through a RID but requires managing its world scenario, transform, visibility and lifetime.

InstanceCreate creates an owned RID. Assign its Mesh RID and World3D.Scenario, retain strong resource references, and release the owned instance with FreeRid. A borrowed world RID does not belong to this code. The guide verifies a rendering instance; it does not implement ECS, physics or streaming.

Practical guide.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Properties2

RenderLoopEnabledProperty
# RenderLoopEnabled
C#
public static bool RenderLoopEnabled { get; set; }

If false, disables rendering completely, but the engine logic is still being processed. You can call RenderingServer.ForceDraw to draw a frame even with rendering disabled.

SingletonProperty
# Singleton
C#
public static RenderingServerInstance Singleton { get; }

Methods568

AreaLightCreateRid
# AreaLightCreate
C#
public static Rid AreaLightCreate();

Creates a new area light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most light_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. To place in a scene, attach this area light to an instance using RenderingServer.InstanceSetBase using the returned RID. Note: The equivalent node is AreaLight3D.

Returns Rid
BakeRenderUV2Reckfell.Collections.Array<Image>
# BakeRenderUV2
C#
public static Reckfell.Collections.Array<Image> BakeRenderUV2(Rid @base, Reckfell.Collections.Array<Rid> materialOverrides, Vector2I imageSize);

Bakes the material data of the Mesh passed in the base parameter with optional material_overrides to a set of Images of size image_size. Returns an array of Images containing material properties as specified in RenderingServer.BakeChannels.

Parameters
NameTypeDefault
baseRid—
materialOverridesReckfell.Collections.Array<Rid>—
imageSizeVector2I—
Returns Reckfell.Collections.Array<Image>
CallOnRenderThreadvoid
# CallOnRenderThread
C#
public static void CallOnRenderThread(Callable callable);

As the RenderingServer actual logic may run on a separate thread, accessing its internals from the main (or any other) thread will result in errors. To make it easier to run code that can safely access the rendering internals (such as RenderingDevice and similar RD classes), push a callable via this function so it will be executed on the render thread.

Parameters
NameTypeDefault
callableCallable—
CameraAttributesCreateRid
# CameraAttributesCreate
C#
public static Rid CameraAttributesCreate();

Creates a camera attributes object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all camera_attributes_ RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent resource is CameraAttributes.

Returns Rid
CameraAttributesSetAutoExposurevoid
# CameraAttributesSetAutoExposure
C#
public static void CameraAttributesSetAutoExposure(Rid cameraAttributes, bool enable, float minSensitivity, float maxSensitivity, float speed, float scale);

Sets the parameters to use with the auto-exposure effect. These parameters take on the same meaning as their counterparts in CameraAttributes and CameraAttributesPractical.

Parameters
NameTypeDefault
cameraAttributesRid—
enablebool—
minSensitivityfloat—
maxSensitivityfloat—
speedfloat—
scalefloat—
CameraAttributesSetDofBlurvoid
# CameraAttributesSetDofBlur
C#
public static void CameraAttributesSetDofBlur(Rid cameraAttributes, bool farEnable, float farDistance, float farTransition, bool nearEnable, float nearDistance, float nearTransition, float amount);

Sets the parameters to use with the DOF blur effect. These parameters take on the same meaning as their counterparts in CameraAttributesPractical.

Parameters
NameTypeDefault
cameraAttributesRid—
farEnablebool—
farDistancefloat—
farTransitionfloat—
nearEnablebool—
nearDistancefloat—
nearTransitionfloat—
amountfloat—
CameraAttributesSetDofBlurBokehShapevoid
# CameraAttributesSetDofBlurBokehShape
C#
public static void CameraAttributesSetDofBlurBokehShape(RenderingServer.DofBokehShape shape);

Sets the shape of the DOF bokeh pattern to shape. Different shapes may be used to achieve artistic effect, or to meet performance targets.

Parameters
NameTypeDefault
shapeRenderingServer.DofBokehShape—
CameraAttributesSetDofBlurQualityvoid
# CameraAttributesSetDofBlurQuality
C#
public static void CameraAttributesSetDofBlurQuality(RenderingServer.DofBlurQuality quality, bool useJitter);

Sets the quality level of the DOF blur effect to quality. use_jitter can be used to jitter samples taken during the blur pass to hide artifacts at the cost of looking more fuzzy.

Parameters
NameTypeDefault
qualityRenderingServer.DofBlurQuality—
useJitterbool—
CameraAttributesSetExposurevoid
# CameraAttributesSetExposure
C#
public static void CameraAttributesSetExposure(Rid cameraAttributes, float multiplier, float normalization);

Sets the exposure values that will be used by the renderers. The normalization amount is used to bake a given Exposure Value (EV) into rendering calculations to reduce the dynamic range of the scene. The normalization factor can be calculated from exposure value (EV100) as follows:

The exposure value can be calculated from aperture (in f-stops), shutter speed (in seconds), and sensitivity (in ISO) as follows:

Parameters
NameTypeDefault
cameraAttributesRid—
multiplierfloat—
normalizationfloat—
CameraCreateRid
# CameraCreate
C#
public static Rid CameraCreate();

Creates a 3D camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all camera_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent node is Camera3D.

Returns Rid
CameraSetCameraAttributesvoid
# CameraSetCameraAttributes
C#
public static void CameraSetCameraAttributes(Rid camera, Rid effects);

Sets the camera_attributes created with RenderingServer.CameraAttributesCreate to the given camera.

Parameters
NameTypeDefault
cameraRid—
effectsRid—
CameraSetCompositorvoid
# CameraSetCompositor
C#
public static void CameraSetCompositor(Rid camera, Rid compositor);

Sets the compositor used by this camera. Equivalent to Camera3D.Compositor.

Parameters
NameTypeDefault
cameraRid—
compositorRid—
CameraSetCullMaskvoid
# CameraSetCullMask
C#
public static void CameraSetCullMask(Rid camera, uint layers);

Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to Camera3D.CullMask.

Parameters
NameTypeDefault
cameraRid—
layersuint—
CameraSetEnvironmentvoid
# CameraSetEnvironment
C#
public static void CameraSetEnvironment(Rid camera, Rid env);

Sets the environment used by this camera. Equivalent to Camera3D.Environment.

Parameters
NameTypeDefault
cameraRid—
envRid—
CameraSetFrustumvoid
# CameraSetFrustum
C#
public static void CameraSetFrustum(Rid camera, float size, Vector2 offset, float zNear, float zFar);

Sets camera to use frustum projection. This mode allows adjusting the offset argument to create "tilted frustum" effects.

Parameters
NameTypeDefault
cameraRid—
sizefloat—
offsetVector2—
zNearfloat—
zFarfloat—
CameraSetOrthogonalvoid
# CameraSetOrthogonal
C#
public static void CameraSetOrthogonal(Rid camera, float size, float zNear, float zFar);

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.

Parameters
NameTypeDefault
cameraRid—
sizefloat—
zNearfloat—
zFarfloat—
CameraSetPerspectivevoid
# CameraSetPerspective
C#
public static void CameraSetPerspective(Rid camera, float fovyDegrees, float zNear, float zFar);

Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away.

Parameters
NameTypeDefault
cameraRid—
fovyDegreesfloat—
zNearfloat—
zFarfloat—
CameraSetTransformvoid
# CameraSetTransform
C#
public static void CameraSetTransform(Rid camera, Transform3D transform);

Sets Transform3D of camera.

Parameters
NameTypeDefault
cameraRid—
transformTransform3D—
CameraSetUseVerticalAspectvoid
# CameraSetUseVerticalAspect
C#
public static void CameraSetUseVerticalAspect(Rid camera, bool enable);

If true, preserves the horizontal aspect ratio which is equivalent to Camera3D.KeepAspectEnum.Width. If false, preserves the vertical aspect ratio which is equivalent to Camera3D.KeepAspectEnum.Height.

Parameters
NameTypeDefault
cameraRid—
enablebool—
CameraSetXRProjectionsvoid
# CameraSetXRProjections
C#
public static void CameraSetXRProjections(Rid camera, Reckfell.Collections.Array<Projection> projections, Reckfell.Collections.Array<Transform3D> offsets = null);

Sets camera to use any set of projections. You can specify one projection for each view set on the viewport. If the views are offset (e.g. ocular distance) and/or skewed, this data can be provided through offsets.

Parameters
NameTypeDefault
cameraRid—
projectionsReckfell.Collections.Array<Projection>—
offsetsReckfell.Collections.Array<Transform3D>null
CanvasCreateRid
# CanvasCreate
C#
public static Rid CanvasCreate();

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 canvas_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Canvas has no Resource or Entity equivalent.

Returns Rid
CanvasItemAddAnimationSlicevoid
# CanvasItemAddAnimationSlice
C#
public static void CanvasItemAddAnimationSlice(Rid item, double animationLength, double sliceBegin, double sliceEnd, double offset = 0d);

Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly.

Parameters
NameTypeDefault
itemRid—
animationLengthdouble—
sliceBegindouble—
sliceEnddouble—
offsetdouble0d
CanvasItemAddCircle2 overloads
# CanvasItemAddCircle · 1/2
C#
public static void CanvasItemAddCircle(Rid item, Vector2 pos, float radius, Color color);

Draws a circle on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawCircle.

Parameters
NameTypeDefault
itemRid—
posVector2—
radiusfloat—
colorColor—
# CanvasItemAddCircle · 2/2
C#
public static void CanvasItemAddCircle(Rid item, Vector2 pos, float radius, Color color, bool antialiased = false);

Draws a circle on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawCircle.

Parameters
NameTypeDefault
itemRid—
posVector2—
radiusfloat—
colorColor—
antialiasedboolfalse
CanvasItemAddClipIgnorevoid
# CanvasItemAddClipIgnore
C#
public static void CanvasItemAddClipIgnore(Rid item, bool ignore);

If ignore is true, ignore clipping on items drawn with this canvas item until this is called again with ignore set to false.

Parameters
NameTypeDefault
itemRid—
ignorebool—
CanvasItemAddEllipsevoid
# CanvasItemAddEllipse
C#
public static void CanvasItemAddEllipse(Rid item, Vector2 pos, float major, float minor, Color color, bool antialiased = false);

Draws an ellipse with semi-major axis major and semi-minor axis minor on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawEllipse.

Parameters
NameTypeDefault
itemRid—
posVector2—
majorfloat—
minorfloat—
colorColor—
antialiasedboolfalse
CanvasItemAddLcdTextureRectRegionvoid
# CanvasItemAddLcdTextureRectRegion
C#
public static void CanvasItemAddLcdTextureRectRegion(Rid item, Rect2 rect, Rid texture, Rect2 srcRect, Color modulate);

See also CanvasItem.DrawLcdTextureRectRegion.

Parameters
NameTypeDefault
itemRid—
rectRect2—
textureRid—
srcRectRect2—
modulateColor—
CanvasItemAddLinevoid
# CanvasItemAddLine
C#
public static void CanvasItemAddLine(Rid item, Vector2 from, Vector2 to, Color color, float width = -1f, bool antialiased = false);

Draws a line on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawLine.

Parameters
NameTypeDefault
itemRid—
fromVector2—
toVector2—
colorColor—
widthfloat-1f
antialiasedboolfalse
CanvasItemAddMeshvoid
# CanvasItemAddMesh
C#
public static void CanvasItemAddMesh(Rid item, Rid mesh, Transform2D? transform = default, Color? modulate = default, Rid texture = default);

Draws a mesh created with RenderingServer.MeshCreate with given transform, modulate color, and texture. This is used internally by MeshInstance2D.

Parameters
NameTypeDefault
itemRid—
meshRid—
transformTransform2D?default
modulateColor?default
textureRiddefault
transform

If the parameter is null, then the default value is Transform2D.Identity.

modulate

If the parameter is null, then the default value is new Color(1.0f, 1.0f, 1.0f, 1.0f).

CanvasItemAddMsdfTextureRectRegionvoid
# CanvasItemAddMsdfTextureRectRegion
C#
public static void CanvasItemAddMsdfTextureRectRegion(Rid item, Rect2 rect, Rid texture, Rect2 srcRect, Color? modulate = default, int outlineSize = 0, float pxRange = 1f, float scale = 1f);

See also CanvasItem.DrawMsdfTextureRectRegion.

Parameters
NameTypeDefault
itemRid—
rectRect2—
textureRid—
srcRectRect2—
modulateColor?default
outlineSizeint0
pxRangefloat1f
scalefloat1f
modulate

If the parameter is null, then the default value is new Color(1.0f, 1.0f, 1.0f, 1.0f).

CanvasItemAddMultiline4 overloads
# CanvasItemAddMultiline · 1/4
C#
public static void CanvasItemAddMultiline(Rid item, Vector2[] points, Color[] colors, float width);

Draws a 2D multiline on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawMultiline and CanvasItem.DrawMultilineColors.

Parameters
NameTypeDefault
itemRid—
pointsVector2[]—
colorsColor[]—
widthfloat—
# CanvasItemAddMultiline · 2/4
C#
public static void CanvasItemAddMultiline(Rid item, Vector2[] points, Color[] colors, float width = -1f, bool antialiased = false);

Draws a 2D multiline on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawMultiline and CanvasItem.DrawMultilineColors.

Parameters
NameTypeDefault
itemRid—
pointsVector2[]—
colorsColor[]—
widthfloat-1f
antialiasedboolfalse
# CanvasItemAddMultiline · 3/4
C#
public static void CanvasItemAddMultiline(Rid item, ReadOnlySpan<Vector2> points, ReadOnlySpan<Color> colors, float width);

Draws a 2D multiline on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawMultiline and CanvasItem.DrawMultilineColors.

Parameters
NameTypeDefault
itemRid—
pointsReadOnlySpan<Vector2>—
colorsReadOnlySpan<Color>—
widthfloat—
# CanvasItemAddMultiline · 4/4
C#
public static void CanvasItemAddMultiline(Rid item, ReadOnlySpan<Vector2> points, ReadOnlySpan<Color> colors, float width, bool antialiased);

Draws a 2D multiline on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawMultiline and CanvasItem.DrawMultilineColors.

Parameters
NameTypeDefault
itemRid—
pointsReadOnlySpan<Vector2>—
colorsReadOnlySpan<Color>—
widthfloat—
antialiasedbool—
CanvasItemAddMultimeshvoid
# CanvasItemAddMultimesh
C#
public static void CanvasItemAddMultimesh(Rid item, Rid mesh, Rid texture = default);

Draws a 2D MultiMesh on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawMultimesh.

Parameters
NameTypeDefault
itemRid—
meshRid—
textureRiddefault
CanvasItemAddNinePatchvoid
# CanvasItemAddNinePatch
C#
public static void CanvasItemAddNinePatch(Rid item, Rect2 rect, Rect2 source, Rid texture, Vector2 topleft, Vector2 bottomright, RenderingServer.NinePatchAxisMode xAxisMode = RenderingServer.NinePatchAxisMode.Stretch, RenderingServer.NinePatchAxisMode yAxisMode = RenderingServer.NinePatchAxisMode.Stretch, bool drawCenter = true, Color? modulate = default);

Draws a nine-patch rectangle on the CanvasItem pointed to by the item Rid.

Parameters
NameTypeDefault
itemRid—
rectRect2—
sourceRect2—
textureRid—
topleftVector2—
bottomrightVector2—
xAxisModeRenderingServer.NinePatchAxisModeRenderingServer.NinePatchAxisMode.Stretch
yAxisModeRenderingServer.NinePatchAxisModeRenderingServer.NinePatchAxisMode.Stretch
drawCenterbooltrue
modulateColor?default
modulate

If the parameter is null, then the default value is new Color(1.0f, 1.0f, 1.0f, 1.0f).

CanvasItemAddParticlesvoid
# CanvasItemAddParticles
C#
public static void CanvasItemAddParticles(Rid item, Rid particles, Rid texture);

Draws particles on the CanvasItem pointed to by the item Rid.

Parameters
NameTypeDefault
itemRid—
particlesRid—
textureRid—
CanvasItemAddPolygon2 overloads
# CanvasItemAddPolygon · 1/2
C#
public static void CanvasItemAddPolygon(Rid item, Vector2[] points, Color[] colors, Vector2[] uvs = null, Rid texture = default);

Draws a 2D polygon on the CanvasItem pointed to by the item Rid. If you need more flexibility (such as being able to use bones), use RenderingServer.CanvasItemAddTriangleArray instead. See also CanvasItem.DrawPolygon. Note: If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with Geometry2D.TriangulatePolygon and using CanvasItem.DrawMesh, CanvasItem.DrawMultimesh, or RenderingServer.CanvasItemAddTriangleArray.

Parameters
NameTypeDefault
itemRid—
pointsVector2[]—
colorsColor[]—
uvsVector2[]null
textureRiddefault
uvs

If the parameter is null, then the default value is Array.Empty<Vector2>().

# CanvasItemAddPolygon · 2/2
C#
public static void CanvasItemAddPolygon(Rid item, ReadOnlySpan<Vector2> points, ReadOnlySpan<Color> colors, ReadOnlySpan<Vector2> uvs, Rid texture);

Draws a 2D polygon on the CanvasItem pointed to by the item Rid. If you need more flexibility (such as being able to use bones), use RenderingServer.CanvasItemAddTriangleArray instead. See also CanvasItem.DrawPolygon. Note: If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with Geometry2D.TriangulatePolygon and using CanvasItem.DrawMesh, CanvasItem.DrawMultimesh, or RenderingServer.CanvasItemAddTriangleArray.

Parameters
NameTypeDefault
itemRid—
pointsReadOnlySpan<Vector2>—
colorsReadOnlySpan<Color>—
uvsReadOnlySpan<Vector2>—
textureRid—
CanvasItemAddPolyline2 overloads
# CanvasItemAddPolyline · 1/2
C#
public static void CanvasItemAddPolyline(Rid item, Vector2[] points, Color[] colors, float width = -1f, bool antialiased = false);

Draws a 2D polyline on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawPolyline and CanvasItem.DrawPolylineColors.

Parameters
NameTypeDefault
itemRid—
pointsVector2[]—
colorsColor[]—
widthfloat-1f
antialiasedboolfalse
# CanvasItemAddPolyline · 2/2
C#
public static void CanvasItemAddPolyline(Rid item, ReadOnlySpan<Vector2> points, ReadOnlySpan<Color> colors, float width, bool antialiased);

Draws a 2D polyline on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawPolyline and CanvasItem.DrawPolylineColors.

Parameters
NameTypeDefault
itemRid—
pointsReadOnlySpan<Vector2>—
colorsReadOnlySpan<Color>—
widthfloat—
antialiasedbool—
CanvasItemAddPrimitive2 overloads
# CanvasItemAddPrimitive · 1/2
C#
public static void CanvasItemAddPrimitive(Rid item, Vector2[] points, Color[] colors, Vector2[] uvs, Rid texture);

Draws a 2D primitive on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawPrimitive.

Parameters
NameTypeDefault
itemRid—
pointsVector2[]—
colorsColor[]—
uvsVector2[]—
textureRid—
# CanvasItemAddPrimitive · 2/2
C#
public static void CanvasItemAddPrimitive(Rid item, ReadOnlySpan<Vector2> points, ReadOnlySpan<Color> colors, ReadOnlySpan<Vector2> uvs, Rid texture);

Draws a 2D primitive on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawPrimitive.

Parameters
NameTypeDefault
itemRid—
pointsReadOnlySpan<Vector2>—
colorsReadOnlySpan<Color>—
uvsReadOnlySpan<Vector2>—
textureRid—
CanvasItemAddRect2 overloads
# CanvasItemAddRect · 1/2
C#
public static void CanvasItemAddRect(Rid item, Rect2 rect, Color color);

Draws a rectangle on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawRect.

Parameters
NameTypeDefault
itemRid—
rectRect2—
colorColor—
# CanvasItemAddRect · 2/2
C#
public static void CanvasItemAddRect(Rid item, Rect2 rect, Color color, bool antialiased = false);

Draws a rectangle on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawRect.

Parameters
NameTypeDefault
itemRid—
rectRect2—
colorColor—
antialiasedboolfalse
CanvasItemAddSetTransformvoid
# CanvasItemAddSetTransform
C#
public static void CanvasItemAddSetTransform(Rid item, Transform2D transform);

Sets a Transform2D that will be used to transform subsequent canvas item commands.

Parameters
NameTypeDefault
itemRid—
transformTransform2D—
CanvasItemAddTextureRectvoid
# CanvasItemAddTextureRect
C#
public static void CanvasItemAddTextureRect(Rid item, Rect2 rect, Rid texture, bool tile = false, Color? modulate = default, bool transpose = false);

Draws a 2D textured rectangle on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawTextureRect and Texture2D.DrawRect.

Parameters
NameTypeDefault
itemRid—
rectRect2—
textureRid—
tileboolfalse
modulateColor?default
transposeboolfalse
modulate

If the parameter is null, then the default value is new Color(1.0f, 1.0f, 1.0f, 1.0f).

CanvasItemAddTextureRectRegionvoid
# CanvasItemAddTextureRectRegion
C#
public static void CanvasItemAddTextureRectRegion(Rid item, Rect2 rect, Rid texture, Rect2 srcRect, Color? modulate = default, bool transpose = false, bool clipUV = true);

Draws the specified region of a 2D textured rectangle on the CanvasItem pointed to by the item Rid. See also CanvasItem.DrawTextureRectRegion and Texture2D.DrawRectRegion.

Parameters
NameTypeDefault
itemRid—
rectRect2—
textureRid—
srcRectRect2—
modulateColor?default
transposeboolfalse
clipUVbooltrue
modulate

If the parameter is null, then the default value is new Color(1.0f, 1.0f, 1.0f, 1.0f).

CanvasItemAddTriangleArray2 overloads
# CanvasItemAddTriangleArray · 1/2
C#
public static void CanvasItemAddTriangleArray(Rid item, int[] indices, Vector2[] points, Color[] colors, Vector2[] uvs = null, int[] bones = null, float[] weights = null, Rid texture = default, int count = -1);

Draws a triangle array on the CanvasItem pointed to by the item Rid. This is internally used by Line2D and StyleBoxFlat for rendering. RenderingServer.CanvasItemAddTriangleArray is highly flexible, but more complex to use than RenderingServer.CanvasItemAddPolygon. Note: If count is set to a non-negative value, only the first count * 3 indices (corresponding to [code skip-lint]count` triangles) will be drawn. Otherwise, all indices are drawn.

Parameters
NameTypeDefault
itemRid—
indicesint[]—
pointsVector2[]—
colorsColor[]—
uvsVector2[]null
bonesint[]null
weightsfloat[]null
textureRiddefault
countint-1
uvs

If the parameter is null, then the default value is Array.Empty<Vector2>().

bones

If the parameter is null, then the default value is Array.Empty<int>().

weights

If the parameter is null, then the default value is Array.Empty<float>().

# CanvasItemAddTriangleArray · 2/2
C#
public static void CanvasItemAddTriangleArray(Rid item, ReadOnlySpan<int> indices, ReadOnlySpan<Vector2> points, ReadOnlySpan<Color> colors, ReadOnlySpan<Vector2> uvs, ReadOnlySpan<int> bones, ReadOnlySpan<float> weights, Rid texture, int count);

Draws a triangle array on the CanvasItem pointed to by the item Rid. This is internally used by Line2D and StyleBoxFlat for rendering. RenderingServer.CanvasItemAddTriangleArray is highly flexible, but more complex to use than RenderingServer.CanvasItemAddPolygon. Note: If count is set to a non-negative value, only the first count * 3 indices (corresponding to [code skip-lint]count` triangles) will be drawn. Otherwise, all indices are drawn.

Parameters
NameTypeDefault
itemRid—
indicesReadOnlySpan<int>—
pointsReadOnlySpan<Vector2>—
colorsReadOnlySpan<Color>—
uvsReadOnlySpan<Vector2>—
bonesReadOnlySpan<int>—
weightsReadOnlySpan<float>—
textureRid—
countint—
CanvasItemAttachSkeletonvoid
# CanvasItemAttachSkeleton
C#
public static void CanvasItemAttachSkeleton(Rid item, Rid skeleton);

Attaches a skeleton to the CanvasItem. Removes the previous skeleton.

Parameters
NameTypeDefault
itemRid—
skeletonRid—
CanvasItemClearvoid
# CanvasItemClear
C#
public static void CanvasItemClear(Rid item);

Clears the CanvasItem and removes all commands in it.

Parameters
NameTypeDefault
itemRid—
CanvasItemCreateRid
# CanvasItemCreate
C#
public static Rid CanvasItemCreate();

Creates a new CanvasItem instance and returns its Rid. It can be accessed with the RID that is returned. This RID will be used in all canvas_item_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent node is CanvasItem.

Returns Rid
CanvasItemGetInstanceShaderParameterVariant
# CanvasItemGetInstanceShaderParameter
C#
public static Variant CanvasItemGetInstanceShaderParameter(Rid instance, StringName parameter);

Reads a parameter value from the canvas-item instance registry. An absent entry yields Nil; a returned value alone does not prove the name is declared by the current shader.

Parameters
NameTypeDefault
instanceRid—
parameterStringName—
instance

Canvas-item RID, such as CanvasItem.GetCanvasItem().

parameter

Exact case-sensitive instance uniform name.

Returns Variant

Instance entry value, or Nil.

CanvasItemGetInstanceShaderParameterDefaultValueVariant
# CanvasItemGetInstanceShaderParameterDefaultValue
C#
public static Variant CanvasItemGetInstanceShaderParameterDefaultValue(Rid instance, StringName parameter);

Returns the declared default known to the instance registry. Can return Nil before material preparation or for an absent name; this is not the current override.

Parameters
NameTypeDefault
instanceRid—
parameterStringName—
instance

Canvas-item RID, such as CanvasItem.GetCanvasItem().

parameter

Exact case-sensitive instance uniform name.

Returns Variant

Declared default known to the registry, or Nil.

CanvasItemGetInstanceShaderParameterListReckfell.Collections.Array<Reckfell.Collections.Dictionary>
# CanvasItemGetInstanceShaderParameterList
C#
public static Reckfell.Collections.Array<Reckfell.Collections.Dictionary> CanvasItemGetInstanceShaderParameterList(Rid instance);

Updates dirty canvas items and returns available instance-parameter descriptions. This is metadata, not a global-parameter list or ShaderMaterial values.

Parameters
NameTypeDefault
instanceRid—
instance

Canvas-item RID, such as CanvasItem.GetCanvasItem().

Returns Reckfell.Collections.Array<Reckfell.Collections.Dictionary>

Collection of instance-parameter metadata dictionaries.

CanvasItemResetPhysicsInterpolationvoid
# CanvasItemResetPhysicsInterpolation
C#
public static void CanvasItemResetPhysicsInterpolation(Rid item);

Prevents physics interpolation for the current physics tick. This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location.

Parameters
NameTypeDefault
itemRid—
CanvasItemSetCanvasGroupModevoid
# CanvasItemSetCanvasGroupMode
C#
public static void CanvasItemSetCanvasGroupMode(Rid item, RenderingServer.CanvasGroupMode mode, float clearMargin = 5f, bool fitEmpty = false, float fitMargin = 0f, bool blurMipmaps = false);

Sets the canvas group mode used during 2D rendering for the canvas item specified by the item RID. For faster but more limited clipping, use RenderingServer.CanvasItemSetClip instead. Note: The equivalent node functionality is found in CanvasGroup and CanvasItem.ClipChildren.

Parameters
NameTypeDefault
itemRid—
modeRenderingServer.CanvasGroupMode—
clearMarginfloat5f
fitEmptyboolfalse
fitMarginfloat0f
blurMipmapsboolfalse
CanvasItemSetClipvoid
# CanvasItemSetClip
C#
public static void CanvasItemSetClip(Rid item, bool clip);

If clip is true, makes the canvas item specified by the item RID not draw anything outside of its rect's coordinates. This clipping is fast, but works only with axis-aligned rectangles. This means that rotation is ignored by the clipping rectangle. For more advanced clipping shapes, use RenderingServer.CanvasItemSetCanvasGroupMode instead. Note: The equivalent node functionality is found in Label.ClipText, RichTextLabel (always enabled) and more.

Parameters
NameTypeDefault
itemRid—
clipbool—
CanvasItemSetCopyToBackbuffervoid
# CanvasItemSetCopyToBackbuffer
C#
public static void CanvasItemSetCopyToBackbuffer(Rid item, bool enabled, Rect2 rect);

Sets the CanvasItem to copy a rect to the backbuffer.

Parameters
NameTypeDefault
itemRid—
enabledbool—
rectRect2—
CanvasItemSetCustomRectvoid
# CanvasItemSetCustomRect
C#
public static void CanvasItemSetCustomRect(Rid item, bool useCustomRect, Rect2? rect = default);

If use_custom_rect is true, sets the custom visibility rectangle (used for culling) to rect for the canvas item specified by item. Setting a custom visibility rect can reduce CPU load when drawing lots of 2D instances. If use_custom_rect is false, automatically computes a visibility rectangle based on the canvas item's draw commands.

Parameters
NameTypeDefault
itemRid—
useCustomRectbool—
rectRect2?default
rect

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

CanvasItemSetDefaultTextureFiltervoid
# CanvasItemSetDefaultTextureFilter
C#
public static void CanvasItemSetDefaultTextureFilter(Rid item, RenderingServer.CanvasItemTextureFilter filter);

Sets the default texture filter mode for the canvas item specified by the item RID. Equivalent to CanvasItem.TextureFilter.

Parameters
NameTypeDefault
itemRid—
filterRenderingServer.CanvasItemTextureFilter—
CanvasItemSetDefaultTextureRepeatvoid
# CanvasItemSetDefaultTextureRepeat
C#
public static void CanvasItemSetDefaultTextureRepeat(Rid item, RenderingServer.CanvasItemTextureRepeat repeat);

Sets the default texture repeat mode for the canvas item specified by the item RID. Equivalent to CanvasItem.TextureRepeat.

Parameters
NameTypeDefault
itemRid—
repeatRenderingServer.CanvasItemTextureRepeat—
CanvasItemSetDistanceFieldModevoid
# CanvasItemSetDistanceFieldMode
C#
public static void CanvasItemSetDistanceFieldMode(Rid item, bool enabled);

If enabled is true, enables multichannel signed distance field rendering mode for the canvas item specified by the item RID. This is meant to be used for font rendering, or with specially generated images using msdfgen.

Parameters
NameTypeDefault
itemRid—
enabledbool—
CanvasItemSetDrawBehindParentvoid
# CanvasItemSetDrawBehindParent
C#
public static void CanvasItemSetDrawBehindParent(Rid item, bool enabled);

If enabled is true, draws the canvas item specified by the item RID behind its parent. Equivalent to CanvasItem.ShowBehindParent.

Parameters
NameTypeDefault
itemRid—
enabledbool—
CanvasItemSetDrawIndexvoid
# CanvasItemSetDrawIndex
C#
public static void CanvasItemSetDrawIndex(Rid item, int index);

Sets the index for the CanvasItem.

Parameters
NameTypeDefault
itemRid—
indexint—
CanvasItemSetInstanceShaderParametervoid
# CanvasItemSetInstanceShaderParameter
C#
public static void CanvasItemSetInstanceShaderParameter(Rid instance, StringName parameter, Variant value);

Writes a low-level canvas-item instance parameter value. For normal reset to the declared default use scene-level CanvasItem.SetInstanceShaderParameter with Nil: that method resolves the default first. The registry does not support Object values.

Parameters
NameTypeDefault
instanceRid—
parameterStringName—
valueVariant—
instance

Canvas-item RID, such as CanvasItem.GetCanvasItem().

parameter

Exact case-sensitive instance uniform name.

value

Compatible value. Nil clears a global override; the low-level instance setter does not replace scene-level CanvasItem reset.

CanvasItemSetInterpolatedvoid
# CanvasItemSetInterpolated
C#
public static void CanvasItemSetInterpolated(Rid item, bool interpolated);

If interpolated is true, turns on physics interpolation for the canvas item.

Parameters
NameTypeDefault
itemRid—
interpolatedbool—
CanvasItemSetLightMaskvoid
# CanvasItemSetLightMask
C#
public static void CanvasItemSetLightMask(Rid item, int mask);

Sets the light mask for the canvas item specified by the item RID. Equivalent to CanvasItem.LightMask.

Parameters
NameTypeDefault
itemRid—
maskint—
CanvasItemSetMaterialvoid
# CanvasItemSetMaterial
C#
public static void CanvasItemSetMaterial(Rid item, Rid material);

Sets a new material to the canvas item specified by the item RID. Equivalent to CanvasItem.Material.

Parameters
NameTypeDefault
itemRid—
materialRid—
CanvasItemSetModulatevoid
# CanvasItemSetModulate
C#
public static void CanvasItemSetModulate(Rid item, Color color);

Multiplies the color of the canvas item specified by the item RID, while affecting its children. See also RenderingServer.CanvasItemSetSelfModulate. Equivalent to CanvasItem.Modulate.

Parameters
NameTypeDefault
itemRid—
colorColor—
CanvasItemSetParentvoid
# CanvasItemSetParent
C#
public static void CanvasItemSetParent(Rid item, Rid parent);

Sets a parent CanvasItem to the CanvasItem. The item will inherit transform, modulation and visibility from its parent, like CanvasItem nodes in the scene tree.

Parameters
NameTypeDefault
itemRid—
parentRid—
CanvasItemSetSelfModulatevoid
# CanvasItemSetSelfModulate
C#
public static void CanvasItemSetSelfModulate(Rid item, Color color);

Multiplies the color of the canvas item specified by the item RID, without affecting its children. See also RenderingServer.CanvasItemSetModulate. Equivalent to CanvasItem.SelfModulate.

Parameters
NameTypeDefault
itemRid—
colorColor—
CanvasItemSetSortChildrenByYvoid
# CanvasItemSetSortChildrenByY
C#
public static void CanvasItemSetSortChildrenByY(Rid item, bool enabled);

If enabled is true, child nodes with the lowest Y position are drawn before those with a higher Y position. Y-sorting only affects children that inherit from the canvas item specified by the item RID, not the canvas item itself. Equivalent to CanvasItem.YSortEnabled.

Parameters
NameTypeDefault
itemRid—
enabledbool—
CanvasItemSetTransformvoid
# CanvasItemSetTransform
C#
public static void CanvasItemSetTransform(Rid item, Transform2D transform);

Sets the transform of the canvas item specified by the item RID. This affects where and how the item will be drawn. Child canvas items' transforms are multiplied by their parent's transform. Equivalent to Entity2D.Transform.

Parameters
NameTypeDefault
itemRid—
transformTransform2D—
CanvasItemSetUseParentMaterialvoid
# CanvasItemSetUseParentMaterial
C#
public static void CanvasItemSetUseParentMaterial(Rid item, bool enabled);

Sets if the CanvasItem uses its parent's material.

Parameters
NameTypeDefault
itemRid—
enabledbool—
CanvasItemSetVisibilityLayervoid
# CanvasItemSetVisibilityLayer
C#
public static void CanvasItemSetVisibilityLayer(Rid item, uint visibilityLayer);

Sets the rendering visibility layer associated with this CanvasItem. Only Viewport nodes with a matching rendering mask will render this CanvasItem.

Parameters
NameTypeDefault
itemRid—
visibilityLayeruint—
CanvasItemSetVisibilityNotifiervoid
# CanvasItemSetVisibilityNotifier
C#
public static void CanvasItemSetVisibilityNotifier(Rid item, bool enable, Rect2 area, Callable enterCallable, Callable exitCallable);

Sets the given CanvasItem as visibility notifier. area defines the area of detecting visibility. enter_callable is called when the CanvasItem enters the screen, exit_callable is called when the CanvasItem exits the screen. If enable is false, the item will no longer function as notifier. This method can be used to manually mimic VisibleOnScreenNotifier2D.

Parameters
NameTypeDefault
itemRid—
enablebool—
areaRect2—
enterCallableCallable—
exitCallableCallable—
CanvasItemSetVisiblevoid
# CanvasItemSetVisible
C#
public static void CanvasItemSetVisible(Rid item, bool visible);

Sets the visibility of the CanvasItem.

Parameters
NameTypeDefault
itemRid—
visiblebool—
CanvasItemSetZAsRelativeToParentvoid
# CanvasItemSetZAsRelativeToParent
C#
public static void CanvasItemSetZAsRelativeToParent(Rid item, bool enabled);

If this is enabled, the Z index of the parent will be added to the children's Z index.

Parameters
NameTypeDefault
itemRid—
enabledbool—
CanvasItemSetZIndexvoid
# CanvasItemSetZIndex
C#
public static void CanvasItemSetZIndex(Rid item, int zIndex);

Sets the CanvasItem's Z index, i.e. its draw order (lower indexes are drawn first).

Parameters
NameTypeDefault
itemRid—
zIndexint—
CanvasItemTransformPhysicsInterpolationvoid
# CanvasItemTransformPhysicsInterpolation
C#
public static void CanvasItemTransformPhysicsInterpolation(Rid item, Transform2D transform);

Transforms both the current and previous stored transform for a canvas item. This allows transforming a canvas item without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin.

Parameters
NameTypeDefault
itemRid—
transformTransform2D—
CanvasLightAttachToCanvasvoid
# CanvasLightAttachToCanvas
C#
public static void CanvasLightAttachToCanvas(Rid light, Rid canvas);

Attaches the canvas light to the canvas. Removes it from its previous canvas.

Parameters
NameTypeDefault
lightRid—
canvasRid—
CanvasLightCreateRid
# CanvasLightCreate
C#
public static Rid CanvasLightCreate();

Creates a canvas light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all canvas_light_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent node is Light2D.

Returns Rid
CanvasLightOccluderAttachToCanvasvoid
# CanvasLightOccluderAttachToCanvas
C#
public static void CanvasLightOccluderAttachToCanvas(Rid occluder, Rid canvas);

Attaches a light occluder to the canvas. Removes it from its previous canvas.

Parameters
NameTypeDefault
occluderRid—
canvasRid—
CanvasLightOccluderCreateRid
# CanvasLightOccluderCreate
C#
public static Rid CanvasLightOccluderCreate();

Creates a light occluder and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all canvas_light_occluder_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent node is LightOccluder2D.

Returns Rid
CanvasLightOccluderResetPhysicsInterpolationvoid
# CanvasLightOccluderResetPhysicsInterpolation
C#
public static void CanvasLightOccluderResetPhysicsInterpolation(Rid occluder);

Prevents physics interpolation for the current physics tick. This is useful when moving an occluder to a new location, to give an instantaneous change rather than interpolation from the previous location.

Parameters
NameTypeDefault
occluderRid—
CanvasLightOccluderSetAsSdfCollisionvoid
# CanvasLightOccluderSetAsSdfCollision
C#
public static void CanvasLightOccluderSetAsSdfCollision(Rid occluder, bool enable);

Enables or disables using the light occluder as a signed distance field for 2D particle collision.

Parameters
NameTypeDefault
occluderRid—
enablebool—
CanvasLightOccluderSetEnabledvoid
# CanvasLightOccluderSetEnabled
C#
public static void CanvasLightOccluderSetEnabled(Rid occluder, bool enabled);

Enables or disables light occluder.

Parameters
NameTypeDefault
occluderRid—
enabledbool—
CanvasLightOccluderSetInterpolatedvoid
# CanvasLightOccluderSetInterpolated
C#
public static void CanvasLightOccluderSetInterpolated(Rid occluder, bool interpolated);

If interpolated is true, turns on physics interpolation for the light occluder.

Parameters
NameTypeDefault
occluderRid—
interpolatedbool—
CanvasLightOccluderSetLightMaskvoid
# CanvasLightOccluderSetLightMask
C#
public static void CanvasLightOccluderSetLightMask(Rid occluder, int mask);

The light mask. See LightOccluder2D for more information on light masks.

Parameters
NameTypeDefault
occluderRid—
maskint—
CanvasLightOccluderSetPolygonvoid
# CanvasLightOccluderSetPolygon
C#
public static void CanvasLightOccluderSetPolygon(Rid occluder, Rid polygon);

Sets a light occluder's polygon.

Parameters
NameTypeDefault
occluderRid—
polygonRid—
CanvasLightOccluderSetTransformvoid
# CanvasLightOccluderSetTransform
C#
public static void CanvasLightOccluderSetTransform(Rid occluder, Transform2D transform);

Sets a light occluder's Transform2D.

Parameters
NameTypeDefault
occluderRid—
transformTransform2D—
CanvasLightOccluderTransformPhysicsInterpolationvoid
# CanvasLightOccluderTransformPhysicsInterpolation
C#
public static void CanvasLightOccluderTransformPhysicsInterpolation(Rid occluder, Transform2D transform);

Transforms both the current and previous stored transform for a light occluder. This allows transforming an occluder without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin.

Parameters
NameTypeDefault
occluderRid—
transformTransform2D—
CanvasLightResetPhysicsInterpolationvoid
# CanvasLightResetPhysicsInterpolation
C#
public static void CanvasLightResetPhysicsInterpolation(Rid light);

Prevents physics interpolation for the current physics tick. This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location.

Parameters
NameTypeDefault
lightRid—
CanvasLightSetBlendModevoid
# CanvasLightSetBlendMode
C#
public static void CanvasLightSetBlendMode(Rid light, RenderingServer.CanvasLightBlendMode mode);

Sets the blend mode for the given canvas light to mode. Equivalent to Light2D.BlendMode.

Parameters
NameTypeDefault
lightRid—
modeRenderingServer.CanvasLightBlendMode—
CanvasLightSetColorvoid
# CanvasLightSetColor
C#
public static void CanvasLightSetColor(Rid light, Color color);

Sets the color for a light.

Parameters
NameTypeDefault
lightRid—
colorColor—
CanvasLightSetEnabledvoid
# CanvasLightSetEnabled
C#
public static void CanvasLightSetEnabled(Rid light, bool enabled);

Enables or disables a canvas light.

Parameters
NameTypeDefault
lightRid—
enabledbool—
CanvasLightSetEnergyvoid
# CanvasLightSetEnergy
C#
public static void CanvasLightSetEnergy(Rid light, float energy);

Sets a canvas light's energy.

Parameters
NameTypeDefault
lightRid—
energyfloat—
CanvasLightSetHeightvoid
# CanvasLightSetHeight
C#
public static void CanvasLightSetHeight(Rid light, float height);

Sets a canvas light's height.

Parameters
NameTypeDefault
lightRid—
heightfloat—
CanvasLightSetInterpolatedvoid
# CanvasLightSetInterpolated
C#
public static void CanvasLightSetInterpolated(Rid light, bool interpolated);

If interpolated is true, turns on physics interpolation for the canvas light.

Parameters
NameTypeDefault
lightRid—
interpolatedbool—
CanvasLightSetItemCullMaskvoid
# CanvasLightSetItemCullMask
C#
public static void CanvasLightSetItemCullMask(Rid light, int mask);

The light mask. See LightOccluder2D for more information on light masks.

Parameters
NameTypeDefault
lightRid—
maskint—
CanvasLightSetItemShadowCullMaskvoid
# CanvasLightSetItemShadowCullMask
C#
public static void CanvasLightSetItemShadowCullMask(Rid light, int mask);

The binary mask used to determine which layers this canvas light's shadows affects. See LightOccluder2D for more information on light masks.

Parameters
NameTypeDefault
lightRid—
maskint—
CanvasLightSetLayerRangevoid
# CanvasLightSetLayerRange
C#
public static void CanvasLightSetLayerRange(Rid light, int minLayer, int maxLayer);

The layer range that gets rendered with this light.

Parameters
NameTypeDefault
lightRid—
minLayerint—
maxLayerint—
CanvasLightSetModevoid
# CanvasLightSetMode
C#
public static void CanvasLightSetMode(Rid light, RenderingServer.CanvasLightMode mode);

Sets the mode of the canvas light.

Parameters
NameTypeDefault
lightRid—
modeRenderingServer.CanvasLightMode—
CanvasLightSetShadowColorvoid
# CanvasLightSetShadowColor
C#
public static void CanvasLightSetShadowColor(Rid light, Color color);

Sets the color of the canvas light's shadow.

Parameters
NameTypeDefault
lightRid—
colorColor—
CanvasLightSetShadowEnabledvoid
# CanvasLightSetShadowEnabled
C#
public static void CanvasLightSetShadowEnabled(Rid light, bool enabled);

Enables or disables the canvas light's shadow.

Parameters
NameTypeDefault
lightRid—
enabledbool—
CanvasLightSetShadowFiltervoid
# CanvasLightSetShadowFilter
C#
public static void CanvasLightSetShadowFilter(Rid light, RenderingServer.CanvasLightShadowFilter filter);

Sets the canvas light's shadow's filter.

Parameters
NameTypeDefault
lightRid—
filterRenderingServer.CanvasLightShadowFilter—
CanvasLightSetShadowSmoothvoid
# CanvasLightSetShadowSmooth
C#
public static void CanvasLightSetShadowSmooth(Rid light, float smooth);

Smoothens the shadow. The lower, the smoother.

Parameters
NameTypeDefault
lightRid—
smoothfloat—
CanvasLightSetTexturevoid
# CanvasLightSetTexture
C#
public static void CanvasLightSetTexture(Rid light, Rid texture);

Sets the texture to be used by a PointLight2D. Equivalent to PointLight2D.Texture.

Parameters
NameTypeDefault
lightRid—
textureRid—
CanvasLightSetTextureOffsetvoid
# CanvasLightSetTextureOffset
C#
public static void CanvasLightSetTextureOffset(Rid light, Vector2 offset);

Sets the offset of a PointLight2D's texture. Equivalent to PointLight2D.Offset.

Parameters
NameTypeDefault
lightRid—
offsetVector2—
CanvasLightSetTextureScalevoid
# CanvasLightSetTextureScale
C#
public static void CanvasLightSetTextureScale(Rid light, float scale);

Sets the scale factor of a PointLight2D's texture. Equivalent to PointLight2D.TextureScale.

Parameters
NameTypeDefault
lightRid—
scalefloat—
CanvasLightSetTransformvoid
# CanvasLightSetTransform
C#
public static void CanvasLightSetTransform(Rid light, Transform2D transform);

Sets the canvas light's Transform2D.

Parameters
NameTypeDefault
lightRid—
transformTransform2D—
CanvasLightSetZRangevoid
# CanvasLightSetZRange
C#
public static void CanvasLightSetZRange(Rid light, int minZ, int maxZ);

Sets the Z range of objects that will be affected by this light. Equivalent to Light2D.RangeZMin and Light2D.RangeZMax.

Parameters
NameTypeDefault
lightRid—
minZint—
maxZint—
CanvasLightTransformPhysicsInterpolationvoid
# CanvasLightTransformPhysicsInterpolation
C#
public static void CanvasLightTransformPhysicsInterpolation(Rid light, Transform2D transform);

Transforms both the current and previous stored transform for a canvas light. This allows transforming a light without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin.

Parameters
NameTypeDefault
lightRid—
transformTransform2D—
CanvasOccluderPolygonCreateRid
# CanvasOccluderPolygonCreate
C#
public static Rid CanvasOccluderPolygonCreate();

Creates a new light occluder polygon and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all canvas_occluder_polygon_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent resource is OccluderPolygon2D.

Returns Rid
CanvasOccluderPolygonSetCullModevoid
# CanvasOccluderPolygonSetCullMode
C#
public static void CanvasOccluderPolygonSetCullMode(Rid occluderPolygon, RenderingServer.CanvasOccluderPolygonCullMode mode);

Sets an occluder polygon's cull mode.

Parameters
NameTypeDefault
occluderPolygonRid—
modeRenderingServer.CanvasOccluderPolygonCullMode—
CanvasOccluderPolygonSetShape2 overloads
# CanvasOccluderPolygonSetShape · 1/2
C#
public static void CanvasOccluderPolygonSetShape(Rid occluderPolygon, Vector2[] shape, bool closed);

Sets the shape of the occluder polygon.

Parameters
NameTypeDefault
occluderPolygonRid—
shapeVector2[]—
closedbool—
# CanvasOccluderPolygonSetShape · 2/2
C#
public static void CanvasOccluderPolygonSetShape(Rid occluderPolygon, ReadOnlySpan<Vector2> shape, bool closed);

Sets the shape of the occluder polygon.

Parameters
NameTypeDefault
occluderPolygonRid—
shapeReadOnlySpan<Vector2>—
closedbool—
CanvasSetDisableScalevoid
# CanvasSetDisableScale
C#
public static void CanvasSetDisableScale(bool disable);

If disable is true, makes 2D rendering ignore the canvas scale defined for each canvas layer. This affects CanvasLayers with the CanvasLayer.FollowViewportEnabled property set to true. In the editor, this is set to true by default, and set to false when View > Preview Canvas Scale is enabled at the top of the 2D editor viewport. Note: Setting this to true does not impact the behavior of CanvasLayer.Scale, Entity2D.Scale, or Control.Scale.

Parameters
NameTypeDefault
disablebool—
CanvasSetItemMirroringvoid
# CanvasSetItemMirroring
C#
public static void CanvasSetItemMirroring(Rid canvas, Rid item, Vector2 mirroring);

A copy of the canvas item will be drawn with a local offset of the mirroring. Note: This is equivalent to calling RenderingServer.CanvasSetItemRepeat like canvas_set_item_repeat(item, mirroring, 1), with an additional check ensuring canvas is a parent of item.

Parameters
NameTypeDefault
canvasRid—
itemRid—
mirroringVector2—
CanvasSetItemRepeatvoid
# CanvasSetItemRepeat
C#
public static void CanvasSetItemRepeat(Rid item, Vector2 repeatSize, int repeatTimes);

A copy of the canvas item will be drawn with a local offset of the repeat_size by the number of times of the repeat_times. As the repeat_times increases, the copies will spread away from the origin texture.

Parameters
NameTypeDefault
itemRid—
repeatSizeVector2—
repeatTimesint—
CanvasSetModulatevoid
# CanvasSetModulate
C#
public static void CanvasSetModulate(Rid canvas, Color color);

Modulates all colors in the given canvas.

Parameters
NameTypeDefault
canvasRid—
colorColor—
CanvasSetShadowTextureSizevoid
# CanvasSetShadowTextureSize
C#
public static void CanvasSetShadowTextureSize(int size);

Sets the ProjectSettings.rendering/2d/shadow_atlas/size to use for Light2D shadow rendering (in pixels). The value is rounded up to the nearest power of 2.

Parameters
NameTypeDefault
sizeint—
CanvasTextureCreateRid
# CanvasTextureCreate
C#
public static Rid CanvasTextureCreate();

Creates a canvas texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all canvas_texture_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. See also RenderingServer.Texture2DCreate. Note: The equivalent resource is CanvasTexture and is only meant to be used in 2D rendering, not 3D.

Returns Rid
CanvasTextureSetChannelvoid
# CanvasTextureSetChannel
C#
public static void CanvasTextureSetChannel(Rid canvasTexture, RenderingServer.CanvasTextureChannel channel, Rid texture);

Sets the channel's texture for the canvas texture specified by the canvas_texture RID. Equivalent to CanvasTexture.DiffuseTexture, CanvasTexture.NormalTexture and CanvasTexture.SpecularTexture.

Parameters
NameTypeDefault
canvasTextureRid—
channelRenderingServer.CanvasTextureChannel—
textureRid—
CanvasTextureSetShadingParametersvoid
# CanvasTextureSetShadingParameters
C#
public static void CanvasTextureSetShadingParameters(Rid canvasTexture, Color baseColor, float shininess);

Sets the base_color and shininess to use for the canvas texture specified by the canvas_texture RID. Equivalent to CanvasTexture.SpecularColor and CanvasTexture.SpecularShininess.

Parameters
NameTypeDefault
canvasTextureRid—
baseColorColor—
shininessfloat—
CanvasTextureSetTextureFiltervoid
# CanvasTextureSetTextureFilter
C#
public static void CanvasTextureSetTextureFilter(Rid canvasTexture, RenderingServer.CanvasItemTextureFilter filter);

Sets the texture filter mode to use for the canvas texture specified by the canvas_texture RID.

Parameters
NameTypeDefault
canvasTextureRid—
filterRenderingServer.CanvasItemTextureFilter—
CanvasTextureSetTextureRepeatvoid
# CanvasTextureSetTextureRepeat
C#
public static void CanvasTextureSetTextureRepeat(Rid canvasTexture, RenderingServer.CanvasItemTextureRepeat repeat);

Sets the texture repeat mode to use for the canvas texture specified by the canvas_texture RID.

Parameters
NameTypeDefault
canvasTextureRid—
repeatRenderingServer.CanvasItemTextureRepeat—
CompositorCreateRid
# CompositorCreate
C#
public static Rid CompositorCreate();

Creates a new compositor and adds it to the RenderingServer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method.

Returns Rid
CompositorEffectCreateRid
# CompositorEffectCreate
C#
public static Rid CompositorEffectCreate();

Creates a new rendering effect and adds it to the RenderingServer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method.

Returns Rid
CompositorEffectSetCallbackvoid
# CompositorEffectSetCallback
C#
public static void CompositorEffectSetCallback(Rid effect, RenderingServer.CompositorEffectCallbackType callbackType, Callable callback);

Sets the callback type (callback_type) and callback method(callback) for this rendering effect.

Parameters
NameTypeDefault
effectRid—
callbackTypeRenderingServer.CompositorEffectCallbackType—
callbackCallable—
CompositorEffectSetEnabledvoid
# CompositorEffectSetEnabled
C#
public static void CompositorEffectSetEnabled(Rid effect, bool enabled);

Enables/disables this rendering effect.

Parameters
NameTypeDefault
effectRid—
enabledbool—
CompositorEffectSetFlagvoid
# CompositorEffectSetFlag
C#
public static void CompositorEffectSetFlag(Rid effect, RenderingServer.CompositorEffectFlags flag, bool set);

Sets the flag (flag) for this rendering effect to true or false (set).

Parameters
NameTypeDefault
effectRid—
flagRenderingServer.CompositorEffectFlags—
setbool—
CompositorSetCompositorEffectsvoid
# CompositorSetCompositorEffects
C#
public static void CompositorSetCompositorEffects(Rid compositor, Reckfell.Collections.Array<Rid> effects);

Sets the compositor effects for the specified compositor RID. effects should be an array containing RIDs created with RenderingServer.CompositorEffectCreate.

Parameters
NameTypeDefault
compositorRid—
effectsReckfell.Collections.Array<Rid>—
CreateLocalRenderingDeviceRenderingDevice
# CreateLocalRenderingDevice
C#
public static RenderingDevice CreateLocalRenderingDevice();

Creates a RenderingDevice that can be used to do draw and compute operations on a separate thread. Cannot draw to the screen nor share data with the global RenderingDevice. Note: When using the OpenGL rendering driver or when running in headless mode, this function always returns null.

Returns RenderingDevice
DebugCanvasItemGetRectRect2
# DebugCanvasItemGetRect
C#
public static Rect2 DebugCanvasItemGetRect(Rid item);

Returns the bounding rectangle for a canvas item in local space, as calculated by the renderer. This bound is used internally for culling. Warning: This function is intended for debugging in the editor, and will pass through and return a zero Rect2 in exported projects.

Parameters
NameTypeDefault
itemRid—
Returns Rect2
DecalCreateRid
# DecalCreate
C#
public static Rid DecalCreate();

Creates a decal and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all decal_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. To place in a scene, attach this decal to an instance using RenderingServer.InstanceSetBase using the returned RID. Note: The equivalent node is Decal.

Returns Rid
DecalSetAlbedoMixvoid
# DecalSetAlbedoMix
C#
public static void DecalSetAlbedoMix(Rid decal, float albedoMix);

Sets the albedo_mix in the decal specified by the decal RID. Equivalent to Decal.AlbedoMix.

Parameters
NameTypeDefault
decalRid—
albedoMixfloat—
DecalSetCullMaskvoid
# DecalSetCullMask
C#
public static void DecalSetCullMask(Rid decal, uint mask);

Sets the cull mask in the decal specified by the decal RID. Equivalent to Decal.CullMask.

Parameters
NameTypeDefault
decalRid—
maskuint—
DecalSetDistanceFadevoid
# DecalSetDistanceFade
C#
public static void DecalSetDistanceFade(Rid decal, bool enabled, float begin, float length);

Sets the distance fade parameters in the decal specified by the decal RID. Equivalent to Decal.DistanceFadeEnabled, Decal.DistanceFadeBegin and Decal.DistanceFadeLength.

Parameters
NameTypeDefault
decalRid—
enabledbool—
beginfloat—
lengthfloat—
DecalSetEmissionEnergyvoid
# DecalSetEmissionEnergy
C#
public static void DecalSetEmissionEnergy(Rid decal, float energy);

Sets the emission energy in the decal specified by the decal RID. Equivalent to Decal.EmissionEnergy.

Parameters
NameTypeDefault
decalRid—
energyfloat—
DecalSetFadevoid
# DecalSetFade
C#
public static void DecalSetFade(Rid decal, float above, float below);

Sets the upper fade (above) and lower fade (below) in the decal specified by the decal RID. Equivalent to Decal.UpperFade and Decal.LowerFade.

Parameters
NameTypeDefault
decalRid—
abovefloat—
belowfloat—
DecalSetModulatevoid
# DecalSetModulate
C#
public static void DecalSetModulate(Rid decal, Color color);

Sets the color multiplier in the decal specified by the decal RID to color. Equivalent to Decal.Modulate.

Parameters
NameTypeDefault
decalRid—
colorColor—
DecalSetNormalFadevoid
# DecalSetNormalFade
C#
public static void DecalSetNormalFade(Rid decal, float fade);

Sets the normal fade in the decal specified by the decal RID. Equivalent to Decal.NormalFade.

Parameters
NameTypeDefault
decalRid—
fadefloat—
DecalSetSizevoid
# DecalSetSize
C#
public static void DecalSetSize(Rid decal, Vector3 size);

Sets the size of the decal specified by the decal RID. Equivalent to Decal.Size.

Parameters
NameTypeDefault
decalRid—
sizeVector3—
DecalSetTexturevoid
# DecalSetTexture
C#
public static void DecalSetTexture(Rid decal, RenderingServer.DecalTexture type, Rid texture);

Sets the texture in the given texture type slot for the specified decal. Equivalent to Decal.SetTexture.

Parameters
NameTypeDefault
decalRid—
typeRenderingServer.DecalTexture—
textureRid—
DecalsSetFiltervoid
# DecalsSetFilter
C#
public static void DecalsSetFilter(RenderingServer.DecalFilter filter);

Sets the texture filter mode to use when rendering decals. This parameter is global and cannot be set on a per-decal basis.

Parameters
NameTypeDefault
filterRenderingServer.DecalFilter—
DirectionalLightCreateRid
# DirectionalLightCreate
C#
public static Rid DirectionalLightCreate();

Creates a directional light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most light_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. To place in a scene, attach this directional light to an instance using RenderingServer.InstanceSetBase using the returned RID. Note: The equivalent node is DirectionalLight3D.

Returns Rid
DirectionalShadowAtlasSetSizevoid
# DirectionalShadowAtlasSetSize
C#
public static void DirectionalShadowAtlasSetSize(int size, bool is16Bits);

Sets the size of the directional light shadows in 3D. See also ProjectSettings.rendering/lights_and_shadows/directional_shadow/size. This parameter is global and cannot be set on a per-viewport basis.

Parameters
NameTypeDefault
sizeint—
is16Bitsbool—
DirectionalSoftShadowFilterSetQualityvoid
# DirectionalSoftShadowFilterSetQuality
C#
public static void DirectionalSoftShadowFilterSetQuality(RenderingServer.ShadowQuality quality);

Sets the filter quality for directional light shadows in 3D. See also ProjectSettings.rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality. This parameter is global and cannot be set on a per-viewport basis.

Parameters
NameTypeDefault
qualityRenderingServer.ShadowQuality—
EnvironmentBakePanoramaImage
# EnvironmentBakePanorama
C#
public static Image EnvironmentBakePanorama(Rid environment, bool bakeIrradiance, Vector2I size);

Generates and returns an Image containing the radiance map for the specified environment RID's sky. This supports built-in sky material and custom sky shaders. If bake_irradiance is true, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also RenderingServer.SkyBakePanorama. Note: The image is saved using linear encoding without any tonemapping performed, which means it will look too dark if viewed directly in an image editor. Note: size should be a 2:1 aspect ratio for the generated panorama to have square pixels. For radiance maps, there is no point in using a height greater than Sky.RadianceSize, as it won't increase detail. Irradiance maps only contain low-frequency data, so there is usually no point in going past a size of 128×64 pixels when saving an irradiance map.

Parameters
NameTypeDefault
environmentRid—
bakeIrradiancebool—
sizeVector2I—
Returns Image
EnvironmentCreateRid
# EnvironmentCreate
C#
public static Rid EnvironmentCreate();

Creates an environment and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all environment_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent resource is Environment.

Returns Rid
EnvironmentGlowSetUseBicubicUpscalevoid
# EnvironmentGlowSetUseBicubicUpscale
C#
public static void EnvironmentGlowSetUseBicubicUpscale(bool enable);

If enable is true, enables bicubic upscaling for glow which improves quality at the cost of performance. Equivalent to ProjectSettings.rendering/environment/glow/upscale_mode. Note: This setting is only effective when using the Forward+ or Mobile rendering methods, as Compatibility uses a different glow implementation.

Parameters
NameTypeDefault
enablebool—
EnvironmentSetAdjustmentvoid
# EnvironmentSetAdjustment
C#
public static void EnvironmentSetAdjustment(Rid env, bool enable, float brightness, float contrast, float saturation, bool use1DColorCorrection, Rid colorCorrection);

Sets the values to be used with the "adjustments" post-process effect. See Environment for more details.

Parameters
NameTypeDefault
envRid—
enablebool—
brightnessfloat—
contrastfloat—
saturationfloat—
use1DColorCorrectionbool—
colorCorrectionRid—
EnvironmentSetAmbientLightvoid
# EnvironmentSetAmbientLight
C#
public static void EnvironmentSetAmbientLight(Rid env, Color color, RenderingServer.EnvironmentAmbientSource ambient = RenderingServer.EnvironmentAmbientSource.Bg, float energy = 1f, float skyContribution = 0f, RenderingServer.EnvironmentReflectionSource reflectionSource = RenderingServer.EnvironmentReflectionSource.Bg);

Sets the values to be used for ambient light rendering. See Environment for more details.

Parameters
NameTypeDefault
envRid—
colorColor—
ambientRenderingServer.EnvironmentAmbientSourceRenderingServer.EnvironmentAmbientSource.Bg
energyfloat1f
skyContributionfloat0f
reflectionSourceRenderingServer.EnvironmentReflectionSourceRenderingServer.EnvironmentReflectionSource.Bg
EnvironmentSetBackgroundvoid
# EnvironmentSetBackground
C#
public static void EnvironmentSetBackground(Rid env, RenderingServer.EnvironmentBG bg);

Sets the environment's background mode. Equivalent to Environment.BackgroundMode.

Parameters
NameTypeDefault
envRid—
bgRenderingServer.EnvironmentBG—
EnvironmentSetBgColorvoid
# EnvironmentSetBgColor
C#
public static void EnvironmentSetBgColor(Rid env, Color color);

Color displayed for clear areas of the scene. Only effective if using the RenderingServer.EnvironmentBG.Color background mode.

Parameters
NameTypeDefault
envRid—
colorColor—
EnvironmentSetBgEnergyvoid
# EnvironmentSetBgEnergy
C#
public static void EnvironmentSetBgEnergy(Rid env, float multiplier, float exposureValue);

Sets the intensity of the background color.

Parameters
NameTypeDefault
envRid—
multiplierfloat—
exposureValuefloat—
EnvironmentSetCameraIdvoid
# EnvironmentSetCameraId
C#
public static void EnvironmentSetCameraId(Rid env, int id);

Sets the camera ID to be used as environment background.

Parameters
NameTypeDefault
envRid—
idint—
EnvironmentSetCanvasMaxLayervoid
# EnvironmentSetCanvasMaxLayer
C#
public static void EnvironmentSetCanvasMaxLayer(Rid env, int maxLayer);

Sets the maximum layer to use if using Canvas background mode.

Parameters
NameTypeDefault
envRid—
maxLayerint—
EnvironmentSetFog2 overloads
# EnvironmentSetFog · 1/2
C#
public static void EnvironmentSetFog(Rid env, bool enable, Color lightColor, float lightEnergy, float sunScatter, float density, float height, float heightDensity, float aerialPerspective, float skyAffect);

Configures fog for the specified environment RID. See fog_* properties in Environment for more information.

Parameters
NameTypeDefault
envRid—
enablebool—
lightColorColor—
lightEnergyfloat—
sunScatterfloat—
densityfloat—
heightfloat—
heightDensityfloat—
aerialPerspectivefloat—
skyAffectfloat—
# EnvironmentSetFog · 2/2
C#
public static void EnvironmentSetFog(Rid env, bool enable, Color lightColor, float lightEnergy, float sunScatter, float density, float height, float heightDensity, float aerialPerspective, float skyAffect, RenderingServer.EnvironmentFogMode fogMode = RenderingServer.EnvironmentFogMode.Exponential);

Configures fog for the specified environment RID. See fog_* properties in Environment for more information.

Parameters
NameTypeDefault
envRid—
enablebool—
lightColorColor—
lightEnergyfloat—
sunScatterfloat—
densityfloat—
heightfloat—
heightDensityfloat—
aerialPerspectivefloat—
skyAffectfloat—
fogModeRenderingServer.EnvironmentFogModeRenderingServer.EnvironmentFogMode.Exponential
EnvironmentSetFogDepthvoid
# EnvironmentSetFogDepth
C#
public static void EnvironmentSetFogDepth(Rid env, float curve, float begin, float end);

Configures fog depth for the specified environment RID. Only has an effect when the fog mode of the environment is RenderingServer.EnvironmentFogMode.Depth. See fog_depth_* properties in Environment for more information.

Parameters
NameTypeDefault
envRid—
curvefloat—
beginfloat—
endfloat—
EnvironmentSetGlow2 overloads
# EnvironmentSetGlow · 1/2
C#
public static void EnvironmentSetGlow(Rid env, bool enable, ReadOnlySpan<float> levels, float intensity, float strength, float mix, float bloomThreshold, RenderingServer.EnvironmentGlowBlendMode blendMode, float hdrBleedThreshold, float hdrBleedScale, float hdrLuminanceCap, float glowMapStrength, Rid glowMap);

Configures glow for the specified environment RID. See glow_* properties in Environment for more information.

Parameters
NameTypeDefault
envRid—
enablebool—
levelsReadOnlySpan<float>—
intensityfloat—
strengthfloat—
mixfloat—
bloomThresholdfloat—
blendModeRenderingServer.EnvironmentGlowBlendMode—
hdrBleedThresholdfloat—
hdrBleedScalefloat—
hdrLuminanceCapfloat—
glowMapStrengthfloat—
glowMapRid—
# EnvironmentSetGlow · 2/2
C#
public static void EnvironmentSetGlow(Rid env, bool enable, float[] levels, float intensity, float strength, float mix, float bloomThreshold, RenderingServer.EnvironmentGlowBlendMode blendMode, float hdrBleedThreshold, float hdrBleedScale, float hdrLuminanceCap, float glowMapStrength, Rid glowMap);

Configures glow for the specified environment RID. See glow_* properties in Environment for more information.

Parameters
NameTypeDefault
envRid—
enablebool—
levelsfloat[]—
intensityfloat—
strengthfloat—
mixfloat—
bloomThresholdfloat—
blendModeRenderingServer.EnvironmentGlowBlendMode—
hdrBleedThresholdfloat—
hdrBleedScalefloat—
hdrLuminanceCapfloat—
glowMapStrengthfloat—
glowMapRid—
EnvironmentSetSdfgivoid
# EnvironmentSetSdfgi
C#
public static void EnvironmentSetSdfgi(Rid env, bool enable, int cascades, float minCellSize, RenderingServer.EnvironmentSdfgiyScale yScale, bool useOcclusion, float bounceFeedback, bool readSky, float energy, float normalBias, float probeBias);

Configures signed distance field global illumination for the specified environment RID. See sdfgi_* properties in Environment for more information.

Parameters
NameTypeDefault
envRid—
enablebool—
cascadesint—
minCellSizefloat—
yScaleRenderingServer.EnvironmentSdfgiyScale—
useOcclusionbool—
bounceFeedbackfloat—
readSkybool—
energyfloat—
normalBiasfloat—
probeBiasfloat—
EnvironmentSetSdfgiFramesToConvergevoid
# EnvironmentSetSdfgiFramesToConverge
C#
public static void EnvironmentSetSdfgiFramesToConverge(RenderingServer.EnvironmentSdfgiFramesToConverge frames);

Sets the number of frames to use for converging signed distance field global illumination. Equivalent to ProjectSettings.rendering/global_illumination/sdfgi/frames_to_converge.

Parameters
NameTypeDefault
framesRenderingServer.EnvironmentSdfgiFramesToConverge—
EnvironmentSetSdfgiFramesToUpdateLightvoid
# EnvironmentSetSdfgiFramesToUpdateLight
C#
public static void EnvironmentSetSdfgiFramesToUpdateLight(RenderingServer.EnvironmentSdfgiFramesToUpdateLight frames);

Sets the update speed for dynamic lights' indirect lighting when computing signed distance field global illumination. Equivalent to ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights.

Parameters
NameTypeDefault
framesRenderingServer.EnvironmentSdfgiFramesToUpdateLight—
EnvironmentSetSdfgiRayCountvoid
# EnvironmentSetSdfgiRayCount
C#
public static void EnvironmentSetSdfgiRayCount(RenderingServer.EnvironmentSdfgiRayCount rayCount);

Sets the number of rays to throw per frame when computing signed distance field global illumination. Equivalent to ProjectSettings.rendering/global_illumination/sdfgi/probe_ray_count.

Parameters
NameTypeDefault
rayCountRenderingServer.EnvironmentSdfgiRayCount—
EnvironmentSetSkyvoid
# EnvironmentSetSky
C#
public static void EnvironmentSetSky(Rid env, Rid sky);

Sets the Sky to be used as the environment's background when using BGMode sky. Equivalent to Environment.Sky.

Parameters
NameTypeDefault
envRid—
skyRid—
EnvironmentSetSkyCustomFovvoid
# EnvironmentSetSkyCustomFov
C#
public static void EnvironmentSetSkyCustomFov(Rid env, float scale);

Sets a custom field of view for the background Sky. Equivalent to Environment.SkyCustomFov.

Parameters
NameTypeDefault
envRid—
scalefloat—
EnvironmentSetSkyOrientationvoid
# EnvironmentSetSkyOrientation
C#
public static void EnvironmentSetSkyOrientation(Rid env, Basis orientation);

Sets the rotation of the background Sky expressed as a Basis. Equivalent to Environment.SkyRotation, where the rotation vector is used to construct the Basis.

Parameters
NameTypeDefault
envRid—
orientationBasis—
EnvironmentSetSsaovoid
# EnvironmentSetSsao
C#
public static void EnvironmentSetSsao(Rid env, bool enable, float radius, float intensity, float power, float detail, float horizon, float sharpness, float lightAffect, float aOChannelAffect);

Sets the variables to be used with the screen-space ambient occlusion (SSAO) post-process effect. See Environment for more details.

Parameters
NameTypeDefault
envRid—
enablebool—
radiusfloat—
intensityfloat—
powerfloat—
detailfloat—
horizonfloat—
sharpnessfloat—
lightAffectfloat—
aOChannelAffectfloat—
EnvironmentSetSsaoQualityvoid
# EnvironmentSetSsaoQuality
C#
public static void EnvironmentSetSsaoQuality(RenderingServer.EnvironmentSsaoQuality quality, bool halfSize, float adaptiveTarget, int blurPasses, float fadeOutFrom, float fadeOutTo);

Sets the quality level of the screen-space ambient occlusion (SSAO) post-process effect. See Environment for more details.

Parameters
NameTypeDefault
qualityRenderingServer.EnvironmentSsaoQuality—
halfSizebool—
adaptiveTargetfloat—
blurPassesint—
fadeOutFromfloat—
fadeOutTofloat—
EnvironmentSetSsilQualityvoid
# EnvironmentSetSsilQuality
C#
public static void EnvironmentSetSsilQuality(RenderingServer.EnvironmentSsilQuality quality, bool halfSize, float adaptiveTarget, int blurPasses, float fadeOutFrom, float fadeOutTo);

Sets the quality level of the screen-space indirect lighting (SSIL) post-process effect. See Environment for more details.

Parameters
NameTypeDefault
qualityRenderingServer.EnvironmentSsilQuality—
halfSizebool—
adaptiveTargetfloat—
blurPassesint—
fadeOutFromfloat—
fadeOutTofloat—
EnvironmentSetSsrvoid
# EnvironmentSetSsr
C#
public static void EnvironmentSetSsr(Rid env, bool enable, int maxSteps, float fadeIn, float fadeOut, float depthTolerance);

Sets the variables to be used with the screen-space reflections (SSR) post-process effect. See Environment for more details.

Parameters
NameTypeDefault
envRid—
enablebool—
maxStepsint—
fadeInfloat—
fadeOutfloat—
depthTolerancefloat—
EnvironmentSetSsrHalfSizevoid
# EnvironmentSetSsrHalfSize
C#
public static void EnvironmentSetSsrHalfSize(bool halfSize);

Sets whether screen-space reflections will be rendered at full or half size. Half size is faster, but may look pixelated or cause flickering.

Parameters
NameTypeDefault
halfSizebool—
EnvironmentSetSsrRoughnessQualityvoid · Deprecated
# EnvironmentSetSsrRoughnessQuality
C#
public static void EnvironmentSetSsrRoughnessQuality(RenderingServer.EnvironmentSsrRoughnessQuality quality);
Parameters
NameTypeDefault
qualityRenderingServer.EnvironmentSsrRoughnessQuality—
EnvironmentSetTonemapvoid
# EnvironmentSetTonemap
C#
public static void EnvironmentSetTonemap(Rid env, RenderingServer.EnvironmentToneMapper toneMapper, float exposure, float white);

Sets the variables to be used with the "tonemap" post-process effect. See Environment for more details.

Parameters
NameTypeDefault
envRid—
toneMapperRenderingServer.EnvironmentToneMapper—
exposurefloat—
whitefloat—
EnvironmentSetTonemapAgxContrastvoid
# EnvironmentSetTonemapAgxContrast
C#
public static void EnvironmentSetTonemapAgxContrast(Rid env, float agxContrast);

See Environment.TonemapAgxContrast for more details.

Parameters
NameTypeDefault
envRid—
agxContrastfloat—
EnvironmentSetVolumetricFogvoid
# EnvironmentSetVolumetricFog
C#
public static void EnvironmentSetVolumetricFog(Rid env, bool enable, float density, Color albedo, Color emission, float emissionEnergy, float anisotropy, float length, float detailSpread, float gIInject, bool temporalReprojection, float temporalReprojectionAmount, float ambientInject, float skyAffect);

Sets the variables to be used with the volumetric fog post-process effect. See Environment for more details.

Parameters
NameTypeDefault
envRid—
enablebool—
densityfloat—
albedoColor—
emissionColor—
emissionEnergyfloat—
anisotropyfloat—
lengthfloat—
detailSpreadfloat—
gIInjectfloat—
temporalReprojectionbool—
temporalReprojectionAmountfloat—
ambientInjectfloat—
skyAffectfloat—
EnvironmentSetVolumetricFogFilterActivevoid
# EnvironmentSetVolumetricFogFilterActive
C#
public static void EnvironmentSetVolumetricFogFilterActive(bool active);

Enables filtering of the volumetric fog scattering buffer. This results in much smoother volumes with very few under-sampling artifacts.

Parameters
NameTypeDefault
activebool—
EnvironmentSetVolumetricFogVolumeSizevoid
# EnvironmentSetVolumetricFogVolumeSize
C#
public static void EnvironmentSetVolumetricFogVolumeSize(int size, int depth);

Sets the resolution of the volumetric fog's froxel buffer. size is modified by the screen's aspect ratio and then used to set the width and height of the buffer. While depth is directly used to set the depth of the buffer.

Parameters
NameTypeDefault
sizeint—
depthint—
FogVolumeCreateRid
# FogVolumeCreate
C#
public static Rid FogVolumeCreate();

Creates a new fog volume and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all fog_volume_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent node is FogVolume.

Returns Rid
FogVolumeSetMaterialvoid
# FogVolumeSetMaterial
C#
public static void FogVolumeSetMaterial(Rid fogVolume, Rid material);

Sets the Material of the fog volume. Can be either a FogMaterial or a custom ShaderMaterial.

Parameters
NameTypeDefault
fogVolumeRid—
materialRid—
FogVolumeSetShapevoid
# FogVolumeSetShape
C#
public static void FogVolumeSetShape(Rid fogVolume, RenderingServer.FogVolumeShape shape);

Sets the shape of the fog volume to either RenderingServer.FogVolumeShape.Ellipsoid, RenderingServer.FogVolumeShape.Cone, RenderingServer.FogVolumeShape.Cylinder, RenderingServer.FogVolumeShape.Box or RenderingServer.FogVolumeShape.World.

Parameters
NameTypeDefault
fogVolumeRid—
shapeRenderingServer.FogVolumeShape—
FogVolumeSetSizevoid
# FogVolumeSetSize
C#
public static void FogVolumeSetSize(Rid fogVolume, Vector3 size);

Sets the size of the fog volume when shape is RenderingServer.FogVolumeShape.Ellipsoid, RenderingServer.FogVolumeShape.Cone, RenderingServer.FogVolumeShape.Cylinder or RenderingServer.FogVolumeShape.Box.

Parameters
NameTypeDefault
fogVolumeRid—
sizeVector3—
ForceDrawvoid
# ForceDraw
C#
public static void ForceDraw(bool swapBuffers = true, double frameStep = 0d);

Forces redrawing of all viewports at once. Must be called from the main thread.

Parameters
NameTypeDefault
swapBuffersbooltrue
frameStepdouble0d
ForceSyncvoid
# ForceSync
C#
public static void ForceSync();

Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost.

FreeRidvoid
# FreeRid
C#
public static void FreeRid(Rid rid);

Releases a server object owned by the caller. RID copies are not reset automatically; do not call again with a stale value.

Parameters
NameTypeDefault
ridRid—
GISetUseHalfResolutionvoid
# GISetUseHalfResolution
C#
public static void GISetUseHalfResolution(bool halfResolution);

If half_resolution is true, renders VoxelGI and SDFGI (Environment.SdfgiEnabled) buffers at halved resolution on each axis (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. Equivalent to ProjectSettings.rendering/global_illumination/gi/use_half_resolution.

Parameters
NameTypeDefault
halfResolutionbool—
GetCurrentRenderingDriverNamestring
# GetCurrentRenderingDriverName
C#
public static string GetCurrentRenderingDriverName();

Returns the actually active graphics driver name, not the rendering method. For diagnosis, record it together with GetCurrentRenderingMethod: a method name alone does not identify the API. This Windows runtime was tested with opengl3 and vulkan; other platform drivers were not tested.

Returns string

Active driver name, such as opengl3 or vulkan. Not a performance rating or a list of all available drivers.

GetCurrentRenderingMethodstring
# GetCurrentRenderingMethod
C#
public static string GetCurrentRenderingMethod();

Returns the current rendering method for selecting valid settings. Does not replace device capability or rendered-output checks.

Returns string

Name such as gl_compatibility, forward_plus or mobile. The example verifies the first two on this PC, not Mobile/MetalFX/XR.

GetDefaultClearColorColor
# GetDefaultClearColor
C#
public static Color GetDefaultClearColor();

Returns the default clear color which is used when a specific clear color has not been selected. See also RenderingServer.SetDefaultClearColor.

Returns Color
GetFrameSetupTimeCpudouble
# GetFrameSetupTimeCpu
C#
public static double GetFrameSetupTimeCpu();

Returns the time taken to setup rendering on the CPU in milliseconds. This value is shared across all viewports and does not require RenderingServer.ViewportSetMeasureRenderTime to be enabled on a viewport to be queried. See also RenderingServer.ViewportGetMeasuredRenderTimeCpu.

Returns double
GetRenderingDeviceRenderingDevice
# GetRenderingDevice
C#
public static RenderingDevice GetRenderingDevice();

Returns the shared RenderingDevice used by the engine. Available in the tested Mobile/Vulkan and Forward+/Vulkan runs; absent in Compatibility/OpenGL. The headless path likewise does not provide a global graphics device. Do not free or dispose this borrowed object; it is not a local device you created.

Returns RenderingDevice

Shared device, or null when the rendering path does not provide one. Check for null before querying it; no RenderingDevice does not mean no graphics capabilities.

GetRenderingInfoulong
# GetRenderingInfo
C#
public static ulong GetRenderingInfo(RenderingServer.RenderingInfo info);

Returns a statistic about the rendering engine which can be used for performance profiling. See also RenderingServer.ViewportGetRenderInfo, which returns information specific to a viewport. Note: Only 3D rendering is currently taken into account by some of these values, such as the number of draw calls. Note: Rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, RenderingServer.GetRenderingInfo returns 0. To print rendering information in _ready() successfully, use the following:

Parameters
NameTypeDefault
infoRenderingServer.RenderingInfo—
Returns ulong
GetShaderParameterListReckfell.Collections.Array<Reckfell.Collections.Dictionary>
# GetShaderParameterList
C#
public static Reckfell.Collections.Array<Reckfell.Collections.Dictionary> GetShaderParameterList(Rid shader);

Returns the parameters of a shader.

Parameters
NameTypeDefault
shaderRid—
Returns Reckfell.Collections.Array<Reckfell.Collections.Dictionary>
GetTestCubeRid
# GetTestCube
C#
public static Rid GetTestCube();

Returns the RID of the test cube. This mesh will be created and returned on the first call to RenderingServer.GetTestCube, then it will be cached for subsequent calls. See also RenderingServer.MakeSphereMesh.

Returns Rid
GetTestTextureRid
# GetTestTexture
C#
public static Rid GetTestTexture();

Returns the RID of a 256×256 texture with a testing pattern on it (in Image.Format.Rgb8 format). This texture will be created and returned on the first call to RenderingServer.GetTestTexture, then it will be cached for subsequent calls. See also RenderingServer.GetWhiteTexture. Example: Get the test texture and apply it to a Sprite2D node:

Returns Rid
GetVideoAdapterApiVersionstring
# GetVideoAdapterApiVersion
C#
public static string GetVideoAdapterApiVersion();

Returns the version of the graphics video adapter currently in use (e.g. "1.2.189" for Vulkan, "3.3.0 NVIDIA 510.60.02" for OpenGL). This version may be different from the actual latest version supported by the hardware, as Reckfell may not always request the latest version. See also OS.GetVideoAdapterDriverInfo. Note: When running a headless or server binary, this function returns an empty string.

Returns string
GetVideoAdapterNamestring
# GetVideoAdapterName
C#
public static string GetVideoAdapterName();

Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). Note: When running a headless or server binary, this function returns an empty string. Note: On the web platform, some browsers such as Firefox may report a different, fixed GPU name such as "GeForce GTX 980" (regardless of the user's actual GPU model). This is done to make fingerprinting more difficult.

Returns string
GetVideoAdapterTypeRenderingDevice.DeviceType
# GetVideoAdapterType
C#
public static RenderingDevice.DeviceType GetVideoAdapterType();

Returns the type of the video adapter. Since dedicated graphics cards from a given generation will usually 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. Note: When using the OpenGL rendering driver or when running in headless mode, this function always returns RenderingDevice.DeviceType.Other.

Returns RenderingDevice.DeviceType
GetVideoAdapterVendorstring
# GetVideoAdapterVendor
C#
public static string GetVideoAdapterVendor();

Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). Note: When running a headless or server binary, this function returns an empty string.

Returns string
GetWhiteTextureRid
# GetWhiteTexture
C#
public static Rid GetWhiteTexture();

Returns the ID of a 4×4 white texture (in Image.Format.Rgb8 format). This texture will be created and returned on the first call to RenderingServer.GetWhiteTexture, then it will be cached for subsequent calls. See also RenderingServer.GetTestTexture. Example: Get the white texture and apply it to a Sprite2D node:

Returns Rid
GlobalShaderParameterAddvoid
# GlobalShaderParameterAdd
C#
public static void GlobalShaderParameterAdd(StringName name, RenderingServer.GlobalShaderParameterType type, Variant defaultValue);

Registers a global shader parameter with a name, type and base value. The name must not already exist; a project shader_globals definition also registers it. Create the parameter before loading a shader that uses it.

Parameters
NameTypeDefault
nameStringName—
typeRenderingServer.GlobalShaderParameterType—
defaultValueVariant—
name

Exact case-sensitive parameter name.

type

Global parameter type matching the shader declaration.

defaultValue

Base value for the registered type.

GlobalShaderParameterGetVariant
# GlobalShaderParameterGet
C#
public static Variant GlobalShaderParameterGet(StringName name);

Reads the base value, not the effective override, in the editor context. During gameplay this version reports an error and returns Nil; it is not a supported runtime getter. Keep current values in C#.

Parameters
NameTypeDefault
nameStringName—
name

Exact case-sensitive parameter name.

Returns Variant

Base value in the editor; Nil when missing or when a gameplay call is rejected.

GlobalShaderParameterGetListReckfell.Collections.Array<StringName>
# GlobalShaderParameterGetList
C#
public static Reckfell.Collections.Array<StringName> GlobalShaderParameterGetList();

Returns sorted global parameter names in the editor context; gameplay calls are rejected with an error and an empty result. GLES3 also permits the Project Manager context. Do not use it for a runtime pre-Add existence check.

Returns Reckfell.Collections.Array<StringName>

Sorted StringName collection for the editor context.

GlobalShaderParameterGetTypeRenderingServer.GlobalShaderParameterType
# GlobalShaderParameterGetType
C#
public static RenderingServer.GlobalShaderParameterType GlobalShaderParameterGetType(StringName name);

Reads a registered global parameter type in the editor context. A missing name returns Max; gameplay calls are rejected with an error and also return Max.

Parameters
NameTypeDefault
nameStringName—
name

Exact case-sensitive parameter name.

Returns RenderingServer.GlobalShaderParameterType

Registered type, or Max when missing/the call is rejected.

GlobalShaderParameterRemovevoid
# GlobalShaderParameterRemove
C#
public static void GlobalShaderParameterRemove(StringName name);

Removes a global registration; a missing name is ignored. Stop dependent material/shader use first: removing a parameter that is still used can invalidate their output.

Parameters
NameTypeDefault
nameStringName—
name

Exact case-sensitive parameter name.

GlobalShaderParameterSetvoid
# GlobalShaderParameterSet
C#
public static void GlobalShaderParameterSet(StringName name, Variant value);

Changes a registered global parameter base value. With an active override, updates the base while the visible override remains until cleared. Keep needed values in application state instead of runtime Get.

Parameters
NameTypeDefault
nameStringName—
valueVariant—
name

Exact case-sensitive parameter name.

value

New base value of the declared type; does not disable an active override.

GlobalShaderParameterSetOverridevoid
# GlobalShaderParameterSetOverride
C#
public static void GlobalShaderParameterSetOverride(StringName name, Variant value);

Sets a priority override for a registered parameter. Nil clears it and restores the current base value; Object values are rejected. This call does not create a missing parameter.

Parameters
NameTypeDefault
nameStringName—
valueVariant—
name

Exact case-sensitive parameter name.

value

Compatible value. Nil clears a global override; the low-level instance setter does not replace scene-level CanvasItem reset.

HasChangedbool
# HasChanged
C#
public static bool HasChanged();

Returns true if changes have been made to the RenderingServer's data. RenderingServer.ForceDraw is usually called if this happens.

Returns bool
HasFeaturebool · Deprecated
# HasFeature
C#
public static bool HasFeature(RenderingServer.Features feature);

This method does nothing and always returns false.

Parameters
NameTypeDefault
featureRenderingServer.Features—
Returns bool
HasOsFeaturebool
# HasOsFeature
C#
public static bool HasOsFeature(string feature);

Returns true if the OS supports a certain feature. Features might be s3tc, rgtc, bptc, etc, etc2, astc, and astc_hdr.

Parameters
NameTypeDefault
featurestring—
Returns bool
InstanceAttachObjectInstanceIdvoid
# InstanceAttachObjectInstanceId
C#
public static void InstanceAttachObjectInstanceId(Rid instance, ulong id);

Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with RenderingServer.InstancesCullAabb, RenderingServer.InstancesCullConvex, and RenderingServer.InstancesCullRay.

Parameters
NameTypeDefault
instanceRid—
idulong—
InstanceAttachSkeletonvoid
# InstanceAttachSkeleton
C#
public static void InstanceAttachSkeleton(Rid instance, Rid skeleton);

Attaches a skeleton to an instance. Removes the previous skeleton from the instance.

Parameters
NameTypeDefault
instanceRid—
skeletonRid—
InstanceCreateRid
# InstanceCreate
C#
public static Rid InstanceCreate();

Creates an owned rendering-instance RID. Assign base, scenario and transform for display; call FreeRid when finished.

Returns Rid
InstanceCreate2Rid
# InstanceCreate2
C#
public static Rid InstanceCreate2(Rid @base, Rid scenario);

Creates a visual instance, adds it to the RenderingServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all instance_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. This is a shorthand for using RenderingServer.InstanceCreate and setting the base and scenario manually.

Parameters
NameTypeDefault
baseRid—
scenarioRid—
Returns Rid
InstanceGeometryGetShaderParameterVariant
# InstanceGeometryGetShaderParameter
C#
public static Variant InstanceGeometryGetShaderParameter(Rid instance, StringName parameter);

Returns the value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to GeometryInstance3D.GetInstanceShaderParameter. Note: Per-instance shader parameter names are case-sensitive.

Parameters
NameTypeDefault
instanceRid—
parameterStringName—
Returns Variant
InstanceGeometryGetShaderParameterDefaultValueVariant
# InstanceGeometryGetShaderParameterDefaultValue
C#
public static Variant InstanceGeometryGetShaderParameterDefaultValue(Rid instance, StringName parameter);

Returns the default value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to GeometryInstance3D.GetInstanceShaderParameter.

Parameters
NameTypeDefault
instanceRid—
parameterStringName—
Returns Variant
InstanceGeometryGetShaderParameterListReckfell.Collections.Array<Reckfell.Collections.Dictionary>
# InstanceGeometryGetShaderParameterList
C#
public static Reckfell.Collections.Array<Reckfell.Collections.Dictionary> InstanceGeometryGetShaderParameterList(Rid instance);

Returns a dictionary of per-instance shader uniform names of the per-instance shader uniform from the specified 3D geometry instance. The returned dictionary is in PropertyInfo format, with the keys name, class_name, type, hint, hint_string and usage. Equivalent to GeometryInstance3D.GetInstanceShaderParameter.

Parameters
NameTypeDefault
instanceRid—
Returns Reckfell.Collections.Array<Reckfell.Collections.Dictionary>
InstanceGeometrySetCastShadowsSettingvoid
# InstanceGeometrySetCastShadowsSetting
C#
public static void InstanceGeometrySetCastShadowsSetting(Rid instance, RenderingServer.ShadowCastingSetting shadowCastingSetting);

Sets the shadow casting setting. Equivalent to GeometryInstance3D.CastShadow.

Parameters
NameTypeDefault
instanceRid—
shadowCastingSettingRenderingServer.ShadowCastingSetting—
InstanceGeometrySetFlagvoid
# InstanceGeometrySetFlag
C#
public static void InstanceGeometrySetFlag(Rid instance, RenderingServer.InstanceFlags flag, bool enabled);

Sets the flag for a given instance to enabled.

Parameters
NameTypeDefault
instanceRid—
flagRenderingServer.InstanceFlags—
enabledbool—
InstanceGeometrySetLightmapvoid
# InstanceGeometrySetLightmap
C#
public static void InstanceGeometrySetLightmap(Rid instance, Rid lightmap, Rect2 lightmapUVScale, int lightmapSlice);

Sets the lightmap GI instance to use for the specified 3D geometry instance. The lightmap UV scale for the specified instance (equivalent to GeometryInstance3D.GILightmapScale) and lightmap atlas slice must also be specified.

Parameters
NameTypeDefault
instanceRid—
lightmapRid—
lightmapUVScaleRect2—
lightmapSliceint—
InstanceGeometrySetLodBiasvoid
# InstanceGeometrySetLodBias
C#
public static void InstanceGeometrySetLodBias(Rid instance, float lodBias);

Sets the level of detail bias to use when rendering the specified 3D geometry instance. Higher values result in higher detail from further away. Equivalent to GeometryInstance3D.LodBias.

Parameters
NameTypeDefault
instanceRid—
lodBiasfloat—
InstanceGeometrySetMaterialOverlayvoid
# InstanceGeometrySetMaterialOverlay
C#
public static void InstanceGeometrySetMaterialOverlay(Rid instance, Rid material);

Low-level additional material overlay for a RenderingServer instance. It is another pass with its own depth/blending, not an unconditional top layer. Pass a Material RID, not a Shader or local RenderingDevice RID. An empty RID clears the assignment. This call does not replace resource ownership.

Parameters
NameTypeDefault
instanceRid—
materialRid—
instance

RID of an existing RenderingServer geometry instance.

material

Live Material RID, or an empty RID to clear.

InstanceGeometrySetMaterialOverridevoid
# InstanceGeometrySetMaterialOverride
C#
public static void InstanceGeometrySetMaterialOverride(Rid instance, Rid material);

Low-level base material override for a RenderingServer instance, replacing surface-material selection. Pass a Material RID, not a Shader or local RenderingDevice RID. An empty RID clears the assignment. This call does not replace resource ownership.

Parameters
NameTypeDefault
instanceRid—
materialRid—
instance

RID of an existing RenderingServer geometry instance.

material

Live Material RID, or an empty RID to clear.

InstanceGeometrySetShaderParametervoid
# InstanceGeometrySetShaderParameter
C#
public static void InstanceGeometrySetShaderParameter(Rid instance, StringName parameter, Variant value);

Sets the per-instance shader uniform on the specified 3D geometry instance. Equivalent to GeometryInstance3D.SetInstanceShaderParameter.

Parameters
NameTypeDefault
instanceRid—
parameterStringName—
valueVariant—
InstanceGeometrySetTransparencyvoid
# InstanceGeometrySetTransparency
C#
public static void InstanceGeometrySetTransparency(Rid instance, float transparency);

Sets the transparency for the given geometry instance. Equivalent to GeometryInstance3D.Transparency. A transparency of 0.0 is fully opaque, while 1.0 is fully transparent. Values greater than 0.0 (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting transparency to a value greater than 0.0 (exclusive) will not disable shadow rendering. In spatial shaders, 1.0 - transparency is set as the default value of the ALPHA built-in. Note: transparency is clamped between 0.0 and 1.0, so this property cannot be used to make transparent materials more opaque than they originally are.

Parameters
NameTypeDefault
instanceRid—
transparencyfloat—
InstanceGeometrySetVisibilityRangevoid
# InstanceGeometrySetVisibilityRange
C#
public static void InstanceGeometrySetVisibilityRange(Rid instance, float min, float max, float minMargin, float maxMargin, RenderingServer.VisibilityRangeFadeMode fadeMode);

Sets the visibility range values for the given geometry instance. Equivalent to GeometryInstance3D.VisibilityRangeBegin and related properties.

Parameters
NameTypeDefault
instanceRid—
minfloat—
maxfloat—
minMarginfloat—
maxMarginfloat—
fadeModeRenderingServer.VisibilityRangeFadeMode—
InstanceResetPhysicsInterpolationvoid
# InstanceResetPhysicsInterpolation
C#
public static void InstanceResetPhysicsInterpolation(Rid instance);
Parameters
NameTypeDefault
instanceRid—
InstanceSetBasevoid
# InstanceSetBase
C#
public static void InstanceSetBase(Rid instance, Rid @base);

Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, particle system, reflection probe, decal, lightmap, voxel GI and visibility notifiers are all types that can be set as the base of an instance in order to be displayed in the scenario.

Parameters
NameTypeDefault
instanceRid—
baseRid—
InstanceSetBlendShapeWeightvoid
# InstanceSetBlendShapeWeight
C#
public static void InstanceSetBlendShapeWeight(Rid instance, int shape, float weight);

Sets the weight for a given blend shape associated with this instance.

Parameters
NameTypeDefault
instanceRid—
shapeint—
weightfloat—
InstanceSetCustomAabbvoid
# InstanceSetCustomAabb
C#
public static void InstanceSetCustomAabb(Rid instance, Aabb aabb);

Sets custom local bounds on a rendering instance; default(Aabb) removes the override. The extra visibility margin is applied after selecting these bounds and before the world transform. A direct call does not update stored GeometryInstance3D.CustomAabb or change Mesh.GetAabb(). For an ordinary Entity, prefer the wrapper property to keep its state consistent.

Parameters
NameTypeDefault
instanceRid—
aabbAabb—
instance

A RenderingServer instance RID, not a Mesh resource RID. Passing a borrowed RID does not transfer ownership.

aabb

Replacement local Aabb; default(Aabb) restores bounds selected from the geometry source.

InstanceSetExtraVisibilityMarginvoid
# InstanceSetExtraVisibilityMargin
C#
public static void InstanceSetExtraVisibilityMargin(Rid instance, float margin);

Sets padding used by the server to grow selected local bounds before the instance transform. Applies to CustomAabb too, but does not change geometry or collision. A direct call does not update stored GeometryInstance3D.ExtraCullMargin. Use a nonnegative value; negative-argument validation in the GeometryInstance3D wrapper is not a contract of this low-level call.

Parameters
NameTypeDefault
instanceRid—
marginfloat—
instance

The rendering instance RID. Do not pass a mesh or other resource RID, and do not free a borrowed RID after configuring it.

margin

Additional growth on every side in local units; 0 removes the padding. The world-space result depends on the instance transform.

InstanceSetIgnoreCullingvoid
# InstanceSetIgnoreCulling
C#
public static void InstanceSetIgnoreCulling(Rid instance, bool enabled);

If true, ignores all culling on the specified 3D geometry instance, including frustum culling, occlusion culling, and layer culling. This is not the same as GeometryInstance3D.IgnoreOcclusionCulling, which only ignores occlusion culling but leaves frustum and layer culling intact.

Parameters
NameTypeDefault
instanceRid—
enabledbool—
InstanceSetInterpolatedvoid
# InstanceSetInterpolated
C#
public static void InstanceSetInterpolated(Rid instance, bool interpolated);
Parameters
NameTypeDefault
instanceRid—
interpolatedbool—
InstanceSetLayerMaskvoid
# InstanceSetLayerMask
C#
public static void InstanceSetLayerMask(Rid instance, uint mask);

Sets the render layers that this instance will be drawn to. Equivalent to VisualInstance3D.Layers.

Parameters
NameTypeDefault
instanceRid—
maskuint—
InstanceSetPivotDatavoid
# InstanceSetPivotData
C#
public static void InstanceSetPivotData(Rid instance, float sortingOffset, bool useAabbCenter);

Sets the sorting offset and switches between using the bounding box or instance origin for depth sorting.

Parameters
NameTypeDefault
instanceRid—
sortingOffsetfloat—
useAabbCenterbool—
InstanceSetScenariovoid
# InstanceSetScenario
C#
public static void InstanceSetScenario(Rid instance, Rid scenario);

Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in.

Parameters
NameTypeDefault
instanceRid—
scenarioRid—
InstanceSetSurfaceOverrideMaterialvoid
# InstanceSetSurfaceOverrideMaterial
C#
public static void InstanceSetSurfaceOverrideMaterial(Rid instance, int surface, Rid material);

Sets the override material of a specific surface. Equivalent to MeshInstance3D.SetSurfaceOverrideMaterial.

Parameters
NameTypeDefault
instanceRid—
surfaceint—
materialRid—
InstanceSetTransformvoid
# InstanceSetTransform
C#
public static void InstanceSetTransform(Rid instance, Transform3D transform);

Sets the world space transform of the instance. Equivalent to Entity3D.GlobalTransform.

Parameters
NameTypeDefault
instanceRid—
transformTransform3D—
InstanceSetVisibilityParentvoid
# InstanceSetVisibilityParent
C#
public static void InstanceSetVisibilityParent(Rid instance, Rid parent);

Sets the visibility parent for the given instance. Equivalent to Entity3D.VisibilityParent.

Parameters
NameTypeDefault
instanceRid—
parentRid—
InstanceSetVisiblevoid
# InstanceSetVisible
C#
public static void InstanceSetVisible(Rid instance, bool visible);

Sets whether an instance is drawn or not. Equivalent to Entity3D.Visible.

Parameters
NameTypeDefault
instanceRid—
visiblebool—
InstanceTeleportvoid
# InstanceTeleport
C#
public static void InstanceTeleport(Rid instance);

Resets motion vectors and other interpolated values. Use this after teleporting a mesh from one position to another to avoid ghosting artifacts.

Parameters
NameTypeDefault
instanceRid—
InstancesCullAabblong[]
# InstancesCullAabb
C#
public static long[] InstancesCullAabb(Aabb aabb, Rid scenario = default);

Returns an array of object IDs intersecting with the provided AABB. Only 3D nodes that inherit from VisualInstance3D are considered, such as MeshInstance3D or DirectionalLight3D. Use @GlobalScope.instance_from_id to obtain the actual nodes. A scenario RID must be provided, which is available in the World3D you want to query. This forces an update for all resources queued to update. Warning: This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.

Parameters
NameTypeDefault
aabbAabb—
scenarioRiddefault
Returns long[]
InstancesCullConvexlong[]
# InstancesCullConvex
C#
public static long[] InstancesCullConvex(Reckfell.Collections.Array<Plane> convex, Rid scenario = default);

Returns an array of object IDs intersecting with the provided convex shape. Only 3D nodes that inherit from VisualInstance3D are considered, such as MeshInstance3D or DirectionalLight3D. Use @GlobalScope.instance_from_id to obtain the actual nodes. A scenario RID must be provided, which is available in the World3D you want to query. This forces an update for all resources queued to update. Warning: This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.

Parameters
NameTypeDefault
convexReckfell.Collections.Array<Plane>—
scenarioRiddefault
Returns long[]
InstancesCullRaylong[]
# InstancesCullRay
C#
public static long[] InstancesCullRay(Vector3 from, Vector3 to, Rid scenario = default);

Returns an array of object IDs intersecting with the provided 3D ray. Only 3D nodes that inherit from VisualInstance3D are considered, such as MeshInstance3D or DirectionalLight3D. Use @GlobalScope.instance_from_id to obtain the actual nodes. A scenario RID must be provided, which is available in the World3D you want to query. This forces an update for all resources queued to update. Warning: This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.

Parameters
NameTypeDefault
fromVector3—
toVector3—
scenarioRiddefault
Returns long[]
IsOnRenderThreadbool
# IsOnRenderThread
C#
public static bool IsOnRenderThread();

Returns true if our code is currently executing on the rendering thread.

Returns bool
IsRenderLoopEnabledbool
# IsRenderLoopEnabled
C#
public static bool IsRenderLoopEnabled();
Returns bool
LightAreaSetNormalizeEnergyvoid
# LightAreaSetNormalizeEnergy
C#
public static void LightAreaSetNormalizeEnergy(Rid light, bool enable);

Defines whether the energy of an AreaLight3D is normalized (divided) by its area. If set to true, changing the size does not affect the total energy output. Equivalent to AreaLight3D.AreaNormalizeEnergy.

Parameters
NameTypeDefault
lightRid—
enablebool—
LightAreaSetSizevoid
# LightAreaSetSize
C#
public static void LightAreaSetSize(Rid light, Vector2 size);

Sets the extents (width and height) in meters for this area light. Equivalent to AreaLight3D.AreaSize.

Parameters
NameTypeDefault
lightRid—
sizeVector2—
LightDirectionalSetBlendSplitsvoid
# LightDirectionalSetBlendSplits
C#
public static void LightDirectionalSetBlendSplits(Rid light, bool enable);

If true, this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to DirectionalLight3D.DirectionalShadowBlendSplits.

Parameters
NameTypeDefault
lightRid—
enablebool—
LightDirectionalSetShadowModevoid
# LightDirectionalSetShadowMode
C#
public static void LightDirectionalSetShadowMode(Rid light, RenderingServer.LightDirectionalShadowMode mode);

Sets the shadow mode for this directional light. Equivalent to DirectionalLight3D.DirectionalShadowMode.

Parameters
NameTypeDefault
lightRid—
modeRenderingServer.LightDirectionalShadowMode—
LightDirectionalSetSkyModevoid
# LightDirectionalSetSkyMode
C#
public static void LightDirectionalSetSkyMode(Rid light, RenderingServer.LightDirectionalSkyMode mode);

If true, this light will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon.

Parameters
NameTypeDefault
lightRid—
modeRenderingServer.LightDirectionalSkyMode—
LightOmniSetShadowModevoid
# LightOmniSetShadowMode
C#
public static void LightOmniSetShadowMode(Rid light, RenderingServer.LightOmniShadowMode mode);

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 OmniLight3D.OmniShadowMode.

Parameters
NameTypeDefault
lightRid—
modeRenderingServer.LightOmniShadowMode—
LightProjectorsSetFiltervoid
# LightProjectorsSetFilter
C#
public static void LightProjectorsSetFilter(RenderingServer.LightProjectorFilter filter);

Sets the texture filter mode to use when rendering light projectors. This parameter is global and cannot be set on a per-light basis.

Parameters
NameTypeDefault
filterRenderingServer.LightProjectorFilter—
LightSetAllowContactShadowsvoid
# LightSetAllowContactShadows
C#
public static void LightSetAllowContactShadows(Rid light, bool enable);

If true, allows screen-space contact shadows for this light. Only used when ProjectSettings.rendering/lights_and_shadows/contact_shadow/enabled is enabled. Equivalent to Light3D.ShadowContactShadowsAllow.

Parameters
NameTypeDefault
lightRid—
enablebool—
LightSetBakeModevoid
# LightSetBakeMode
C#
public static void LightSetBakeMode(Rid light, RenderingServer.LightBakeMode bakeMode);

Sets the bake mode to use for the specified 3D light. Equivalent to Light3D.LightBakeMode.

Parameters
NameTypeDefault
lightRid—
bakeModeRenderingServer.LightBakeMode—
LightSetColorvoid
# LightSetColor
C#
public static void LightSetColor(Rid light, Color color);

Sets the color of the light. Equivalent to Light3D.LightColor.

Parameters
NameTypeDefault
lightRid—
colorColor—
LightSetCullMaskvoid
# LightSetCullMask
C#
public static void LightSetCullMask(Rid light, uint mask);

Sets the cull mask for this 3D light. Lights only affect objects in the selected layers. Equivalent to Light3D.LightCullMask.

Parameters
NameTypeDefault
lightRid—
maskuint—
LightSetDistanceFadevoid
# LightSetDistanceFade
C#
public static void LightSetDistanceFade(Rid decal, bool enabled, float begin, float shadow, float length);

Sets the distance fade for this 3D light. This acts as a form of level of detail (LOD) and can be used to improve performance. Equivalent to Light3D.DistanceFadeEnabled, Light3D.DistanceFadeBegin, Light3D.DistanceFadeShadow, and Light3D.DistanceFadeLength.

Parameters
NameTypeDefault
decalRid—
enabledbool—
beginfloat—
shadowfloat—
lengthfloat—
LightSetMaxSdfgiCascadevoid
# LightSetMaxSdfgiCascade
C#
public static void LightSetMaxSdfgiCascade(Rid light, uint cascade);

Sets the maximum SDFGI cascade in which the 3D light's indirect lighting is rendered. Higher values allow the light to be rendered in SDFGI further away from the camera.

Parameters
NameTypeDefault
lightRid—
cascadeuint—
LightSetNegativevoid
# LightSetNegative
C#
public static void LightSetNegative(Rid light, bool enable);

If true, the 3D light will subtract light instead of adding light. Equivalent to Light3D.LightNegative.

Parameters
NameTypeDefault
lightRid—
enablebool—
LightSetParamvoid
# LightSetParam
C#
public static void LightSetParam(Rid light, RenderingServer.LightParam param, float value);

Sets the specified 3D light parameter. Equivalent to Light3D.SetParam.

Parameters
NameTypeDefault
lightRid—
paramRenderingServer.LightParam—
valuefloat—
LightSetProjectorvoid
# LightSetProjector
C#
public static void LightSetProjector(Rid light, Rid texture);

Sets the projector texture to use for the specified 3D light. Equivalent to Light3D.LightProjector.

Parameters
NameTypeDefault
lightRid—
textureRid—
LightSetReverseCullFaceModevoid
# LightSetReverseCullFaceMode
C#
public static void LightSetReverseCullFaceMode(Rid light, bool enabled);

If true, 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 RenderingServer.InstanceGeometrySetCastShadowsSetting. Equivalent to Light3D.ShadowReverseCullFace.

Parameters
NameTypeDefault
lightRid—
enabledbool—
LightSetShadowvoid
# LightSetShadow
C#
public static void LightSetShadow(Rid light, bool enabled);

If true, light will cast shadows. Equivalent to Light3D.ShadowEnabled.

Parameters
NameTypeDefault
lightRid—
enabledbool—
LightSetShadowCasterMaskvoid
# LightSetShadowCasterMask
C#
public static void LightSetShadowCasterMask(Rid light, uint mask);

Sets the shadow caster mask for this 3D light. Shadows will only be cast using objects in the selected layers. Equivalent to Light3D.ShadowCasterMask.

Parameters
NameTypeDefault
lightRid—
maskuint—
LightmapCreateRid
# LightmapCreate
C#
public static Rid LightmapCreate();

Creates a new lightmap global illumination instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all lightmap_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent node is LightmapGI.

Returns Rid
LightmapGetProbeCaptureBspTreeint[]
# LightmapGetProbeCaptureBspTree
C#
public static int[] LightmapGetProbeCaptureBspTree(Rid lightmap);

Returns the BSP tree data used for accelerating probe lookups. The BSP data is structured as a series of six signed 32-bit values per BSP node in this order: float plane_x, float plane_y, float plane_z, float plane_distance, int32_t over, int32_t under. An empty leaf is denoted by the value -2147483648 (the minimum 32-bit signed integer). See also RenderingServer.LightmapSetProbeCaptureData.

Parameters
NameTypeDefault
lightmapRid—
Returns int[]
LightmapGetProbeCapturePointsVector3[]
# LightmapGetProbeCapturePoints
C#
public static Vector3[] LightmapGetProbeCapturePoints(Rid lightmap);

Returns the local space positions of each lightmap probe capture point. Keep in mind the lightmap instance may have a non-zero transform, which will affect the position of the probe capture points. See also RenderingServer.LightmapSetProbeCaptureData.

Parameters
NameTypeDefault
lightmapRid—
Returns Vector3[]
LightmapGetProbeCaptureShColor[]
# LightmapGetProbeCaptureSh
C#
public static Color[] LightmapGetProbeCaptureSh(Rid lightmap);

Returns the L0, L1, and L2 spherical harmonics data for each lightmap probe capture point. This is specified as 9 Color values per probe, which means the size of the returned data is always 9 times the number of probe points. See also RenderingServer.LightmapSetProbeCaptureData.

Parameters
NameTypeDefault
lightmapRid—
Returns Color[]
LightmapGetProbeCaptureTetrahedraint[]
# LightmapGetProbeCaptureTetrahedra
C#
public static int[] LightmapGetProbeCaptureTetrahedra(Rid lightmap);

Returns the tetrahedralization data used for interpolating between lightmap probe capture points. Each tetrahedron is specified as a series of 4 numbers, each being an index into the probe capture points array returned by RenderingServer.LightmapGetProbeCapturePoints. See also RenderingServer.LightmapSetProbeCaptureData.

Parameters
NameTypeDefault
lightmapRid—
Returns int[]
LightmapSetBakedExposureNormalizationvoid
# LightmapSetBakedExposureNormalization
C#
public static void LightmapSetBakedExposureNormalization(Rid lightmap, float bakedExposure);

Used to inform the renderer what exposure normalization value was used while baking the lightmap. This value will be used and modulated at run time to ensure that the lightmap maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see RenderingServer.CameraAttributesSetExposure.

Parameters
NameTypeDefault
lightmapRid—
bakedExposurefloat—
LightmapSetProbeBoundsvoid
# LightmapSetProbeBounds
C#
public static void LightmapSetProbeBounds(Rid lightmap, Aabb bounds);

Sets the bounds that this lightmap instance should visually affect, both in terms of static lightmap baking and probe-based global illumination.

Parameters
NameTypeDefault
lightmapRid—
boundsAabb—
LightmapSetProbeCaptureData2 overloads
# LightmapSetProbeCaptureData · 1/2
C#
public static void LightmapSetProbeCaptureData(Rid lightmap, Vector3[] points, Color[] pointSh, int[] tetrahedra, int[] bspTree);

Sets the probe capture data for the given lightmap instance. See RenderingServer.LightmapGetProbeCapturePoints, RenderingServer.LightmapGetProbeCaptureSh, RenderingServer.LightmapGetProbeCaptureTetrahedra, and RenderingServer.LightmapGetProbeCaptureBspTree for the expected data formats.

Parameters
NameTypeDefault
lightmapRid—
pointsVector3[]—
pointShColor[]—
tetrahedraint[]—
bspTreeint[]—
# LightmapSetProbeCaptureData · 2/2
C#
public static void LightmapSetProbeCaptureData(Rid lightmap, ReadOnlySpan<Vector3> points, ReadOnlySpan<Color> pointSh, ReadOnlySpan<int> tetrahedra, ReadOnlySpan<int> bspTree);

Sets the probe capture data for the given lightmap instance. See RenderingServer.LightmapGetProbeCapturePoints, RenderingServer.LightmapGetProbeCaptureSh, RenderingServer.LightmapGetProbeCaptureTetrahedra, and RenderingServer.LightmapGetProbeCaptureBspTree for the expected data formats.

Parameters
NameTypeDefault
lightmapRid—
pointsReadOnlySpan<Vector3>—
pointShReadOnlySpan<Color>—
tetrahedraReadOnlySpan<int>—
bspTreeReadOnlySpan<int>—
LightmapSetProbeCaptureUpdateSpeedvoid
# LightmapSetProbeCaptureUpdateSpeed
C#
public static void LightmapSetProbeCaptureUpdateSpeed(float speed);

The framerate-independent update speed when representing dynamic object lighting from LightmapProbes. Higher values make dynamic object lighting update faster. Higher values can prevent fast-moving objects from having "outdated" indirect lighting displayed on them, at the cost of possible flickering when an object moves from a bright area to a shaded area. See also ProjectSettings.rendering/lightmapping/probe_capture/update_speed.

Parameters
NameTypeDefault
speedfloat—
LightmapSetProbeInteriorvoid
# LightmapSetProbeInterior
C#
public static void LightmapSetProbeInterior(Rid lightmap, bool interior);

Sets whether the lightmap instance should be considered as interior (when interior is true). If the lightmap is marked as interior, environment lighting is ignored when baking lightmaps.

Parameters
NameTypeDefault
lightmapRid—
interiorbool—
LightmapSetTexturesvoid
# LightmapSetTextures
C#
public static void LightmapSetTextures(Rid lightmap, Rid light, bool usesSh);

Set the textures on the given lightmap GI instance to the texture array pointed to by the light RID. If the lightmap texture was baked with LightmapGI.Directional set to true, then uses_sh must also be true.

Parameters
NameTypeDefault
lightmapRid—
lightRid—
usesShbool—
LightmapsSetBicubicFiltervoid
# LightmapsSetBicubicFilter
C#
public static void LightmapsSetBicubicFilter(bool enable);

Toggles whether a bicubic filter should be used when lightmaps are sampled. This smoothens their appearance at a performance cost.

Parameters
NameTypeDefault
enablebool—
MakeSphereMeshRid
# MakeSphereMesh
C#
public static Rid MakeSphereMesh(int latitudes, int longitudes, float radius);

Returns a mesh of a sphere with the given number of horizontal subdivisions, vertical subdivisions and radius. See also RenderingServer.GetTestCube.

Parameters
NameTypeDefault
latitudesint—
longitudesint—
radiusfloat—
Returns Rid
MaterialCreateRid
# MaterialCreate
C#
public static Rid MaterialCreate();

Creates an empty material and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all material_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent resource is Material.

Returns Rid
MaterialGetParamVariant
# MaterialGetParam
C#
public static Variant MaterialGetParam(Rid material, StringName parameter);

Returns the value of a certain material's parameter.

Parameters
NameTypeDefault
materialRid—
parameterStringName—
Returns Variant
MaterialSetNextPassvoid
# MaterialSetNextPass
C#
public static void MaterialSetNextPass(Rid material, Rid nextMaterial);

Sets an object's next material.

Parameters
NameTypeDefault
materialRid—
nextMaterialRid—
MaterialSetParamvoid
# MaterialSetParam
C#
public static void MaterialSetParam(Rid material, StringName parameter, Variant value);

Sets a material's parameter.

Parameters
NameTypeDefault
materialRid—
parameterStringName—
valueVariant—
MaterialSetRenderPriorityvoid
# MaterialSetRenderPriority
C#
public static void MaterialSetRenderPriority(Rid material, int priority);

Sets a material's render priority.

Parameters
NameTypeDefault
materialRid—
priorityint—
MaterialSetShadervoid
# MaterialSetShader
C#
public static void MaterialSetShader(Rid shaderMaterial, Rid shader);

Sets a shader material's shader.

Parameters
NameTypeDefault
shaderMaterialRid—
shaderRid—
MaterialSetUseDebandingvoid
# MaterialSetUseDebanding
C#
public static void MaterialSetUseDebanding(bool enable);

When using the Mobile renderer, RenderingServer.MaterialSetUseDebanding can be used to enable or disable the debanding feature of 3D materials (BaseMaterial3D and ShaderMaterial). RenderingServer.MaterialSetUseDebanding has no effect when using the Compatibility or Forward+ renderer. In Forward+, Viewport debanding can be used instead. See also ProjectSettings.rendering/anti_aliasing/quality/use_debanding and RenderingServer.ViewportSetUseDebanding.

Parameters
NameTypeDefault
enablebool—
MeshAddSurfacevoid
# MeshAddSurface
C#
public static void MeshAddSurface(Rid mesh, Reckfell.Collections.Dictionary surface);

Creates a new surface on the given mesh. Equivalent to RenderingServer.MeshAddSurfaceFromArrays, but takes a single Reckfell.Collections.Dictionary argument instead of separate arguments. The dictionary must follow this structure:

See also RenderingServer.MeshGetSurface, which returns data in the same structure defined above.

Parameters
NameTypeDefault
meshRid—
surfaceReckfell.Collections.Dictionary—
MeshAddSurfaceFromArraysvoid
# MeshAddSurfaceFromArrays
C#
public static void MeshAddSurfaceFromArrays(Rid mesh, RenderingServer.PrimitiveType primitive, Reckfell.Collections.Array arrays, Reckfell.Collections.Array blendShapes = null, Reckfell.Collections.Dictionary lods = null, RenderingServer.ArrayFormat compressFormat = RenderingServer.ArrayFormat.FlagFormatVersion1);

Creates a new surface on the given mesh. RenderingServer.MeshGetSurfaceCount will become the surface index for this new surface. Surfaces are created to be rendered using a primitive, which may be any of the values defined in Mesh.PrimitiveType. The arrays argument is an array of arrays. Each of the Mesh.ArrayType.Max elements contains an array with some of the mesh data for this surface as described by the corresponding member of Mesh.ArrayType or null if it is not used by the surface. For example, arrays[Mesh.ArrayType.Index](/en/docs/api/mesh#member-index-23499c80bb) if it is used. The blend_shapesargument is an array of vertex data for each blend shape. Each element is an array of the same structure asarrays, but [Mesh.ArrayType.Vertex](/en/docs/api/mesh#member-vertex-87b0249d36), [Mesh.ArrayType.Normal](/en/docs/api/mesh#member-normal-138d58cd86), and [Mesh.ArrayType.Tangent](/en/docs/api/mesh#member-tangent-14eb4ead6f) are set if and only if they are set in arraysand all other entries arenull. The lods argument is a dictionary with [int[]](/en/docs/api/packedint32array) values. Each entry in the dictionary represents an LOD level of the surface, where the value is the [Mesh.ArrayType.Index](/en/docs/api/mesh#member-index-23499c80bb) array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used. The compress_format argument is the bitwise OR of, as required: One value of [RenderingServer.ArrayFormat](/en/docs/api/renderingserver#enum-arrayformat) left shifted by ARRAY_FORMAT_CUSTOMn_SHIFT for each custom channel in use, [RenderingServer.ArrayFormat.FlagUseDynamicUpdate](/en/docs/api/renderingserver#member-flagusedynamicupdate-d4feaa23f9), [RenderingServer.ArrayFormat.FlagUse8BoneWeights](/en/docs/api/renderingserver#member-flaguse8boneweights-3c033c78c7), or [RenderingServer.ArrayFormat.FlagUsesEmptyVertexArray](/en/docs/api/renderingserver#member-flagusesemptyvertexarray-07eec33ad4). See [ArrayMesh.AddSurfaceFromArrays](/en/docs/api/arraymesh#member-addsurfacefromarrays-7effbb836f) and [ImporterMesh.AddSurface`](/en/docs/api/importermesh#member-addsurface-da30efdaa3) for higher-level equivalents of this method. Note: When using indices, it is recommended to only use points, lines, or triangles.

Parameters
NameTypeDefault
meshRid—
primitiveRenderingServer.PrimitiveType—
arraysReckfell.Collections.Array—
blendShapesReckfell.Collections.Arraynull
lodsReckfell.Collections.Dictionarynull
compressFormatRenderingServer.ArrayFormatRenderingServer.ArrayFormat.FlagFormatVersion1
MeshClearvoid
# MeshClear
C#
public static void MeshClear(Rid mesh);

Removes all surfaces from a mesh.

Parameters
NameTypeDefault
meshRid—
MeshCreateRid
# MeshCreate
C#
public static Rid MeshCreate();

Creates a new mesh and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all mesh_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. To place in a scene, attach this mesh to an instance using RenderingServer.InstanceSetBase using the returned RID. Note: The equivalent resource is Mesh.

Returns Rid
MeshCreateFromSurfacesRid
# MeshCreateFromSurfaces
C#
public static Rid MeshCreateFromSurfaces(Reckfell.Collections.Array<Reckfell.Collections.Dictionary> surfaces, int blendShapeCount = 0);

Creates a new mesh with predefined surfaces for it and adds the mesh to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all mesh_* RenderingServer functions. This method is more efficient for creating meshes with multiple surfaces compared to creating an empty mesh with RenderingServer.MeshCreate and adding surfaces one by one with RenderingServer.MeshAddSurface. Each element in the surfaces array must follow the same structure as described in RenderingServer.MeshAddSurface. The blend_shape_count parameter must match the blend shape data defined in all surfaces. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. To place in a scene, attach this mesh to an instance using RenderingServer.InstanceSetBase using the returned RID. Note: The equivalent resource is Mesh.

Parameters
NameTypeDefault
surfacesReckfell.Collections.Array<Reckfell.Collections.Dictionary>—
blendShapeCountint0
Returns Rid
MeshGetBlendShapeCountint
# MeshGetBlendShapeCount
C#
public static int MeshGetBlendShapeCount(Rid mesh);

Returns a mesh's blend shape count.

Parameters
NameTypeDefault
meshRid—
Returns int
MeshGetBlendShapeModeRenderingServer.BlendShapeMode
# MeshGetBlendShapeMode
C#
public static RenderingServer.BlendShapeMode MeshGetBlendShapeMode(Rid mesh);

Returns a mesh's blend shape mode.

Parameters
NameTypeDefault
meshRid—
Returns RenderingServer.BlendShapeMode
MeshGetCustomAabbAabb
# MeshGetCustomAabb
C#
public static Aabb MeshGetCustomAabb(Rid mesh);

Returns a mesh's custom aabb.

Parameters
NameTypeDefault
meshRid—
Returns Aabb
MeshGetSurfaceReckfell.Collections.Dictionary
# MeshGetSurface
C#
public static Reckfell.Collections.Dictionary MeshGetSurface(Rid mesh, int surface);

Returns a mesh's surface as a dictionary following the same structure as described in RenderingServer.MeshAddSurface.

Parameters
NameTypeDefault
meshRid—
surfaceint—
Returns Reckfell.Collections.Dictionary
MeshGetSurfaceCountint
# MeshGetSurfaceCount
C#
public static int MeshGetSurfaceCount(Rid mesh);

Returns a mesh's number of surfaces.

Parameters
NameTypeDefault
meshRid—
Returns int
MeshSetBlendShapeModevoid
# MeshSetBlendShapeMode
C#
public static void MeshSetBlendShapeMode(Rid mesh, RenderingServer.BlendShapeMode mode);

Sets a mesh's blend shape mode.

Parameters
NameTypeDefault
meshRid—
modeRenderingServer.BlendShapeMode—
MeshSetCustomAabbvoid
# MeshSetCustomAabb
C#
public static void MeshSetCustomAabb(Rid mesh, Aabb aabb);

Sets a mesh's custom aabb.

Parameters
NameTypeDefault
meshRid—
aabbAabb—
MeshSetShadowMeshvoid
# MeshSetShadowMesh
C#
public static void MeshSetShadowMesh(Rid mesh, Rid shadowMesh);

Sets an optional second mesh which can be used for rendering shadows and the depth prepass. Can be used to increase performance by supplying a mesh with fused vertices and only vertex position data (without normals, UVs, colors, etc.). Note: This mesh must have exactly the same vertex positions as the source mesh (including the source mesh's LODs, if present). If vertex positions differ, then the mesh will not draw correctly.

Parameters
NameTypeDefault
meshRid—
shadowMeshRid—
MeshSurfaceGetArraysReckfell.Collections.Array
# MeshSurfaceGetArrays
C#
public static Reckfell.Collections.Array MeshSurfaceGetArrays(Rid mesh, int surface);

Returns a mesh's surface's buffer arrays.

Parameters
NameTypeDefault
meshRid—
surfaceint—
Returns Reckfell.Collections.Array
MeshSurfaceGetAttributeBufferRdRidRid
# MeshSurfaceGetAttributeBufferRdRid
C#
public static Rid MeshSurfaceGetAttributeBufferRdRid(Rid mesh, int surface);

Returns the RenderingDevice Rid handle of the attribute buffer of the given mesh surface (Color, UV, UV2, Custom0-3). The returned Rid can be used like any other buffer on the RenderingDevice, so the surface attributes can be read or written from a compute shader without a CPU round-trip. To bind the buffer as a storage buffer in compute, the surface must have been created with the RenderingServer.ArrayFormat.FlagUseStorageBuffer flag set in its format. Returns an invalid Rid if the surface has no attribute buffer or if the rendering backend does not expose RenderingDevice Rids (such as the OpenGL backend).

Parameters
NameTypeDefault
meshRid—
surfaceint—
Returns Rid
MeshSurfaceGetBlendShapeArraysReckfell.Collections.Array<Reckfell.Collections.Array>
# MeshSurfaceGetBlendShapeArrays
C#
public static Reckfell.Collections.Array<Reckfell.Collections.Array> MeshSurfaceGetBlendShapeArrays(Rid mesh, int surface);

Returns a mesh's surface's arrays for blend shapes.

Parameters
NameTypeDefault
meshRid—
surfaceint—
Returns Reckfell.Collections.Array<Reckfell.Collections.Array>
MeshSurfaceGetFormatAttributeStrideuint
# MeshSurfaceGetFormatAttributeStride
C#
public static uint MeshSurfaceGetFormatAttributeStride(RenderingServer.ArrayFormat format, int vertexCount);

Returns the stride of the attribute buffer for a mesh with given format.

Parameters
NameTypeDefault
formatRenderingServer.ArrayFormat—
vertexCountint—
Returns uint
MeshSurfaceGetFormatIndexStrideuint
# MeshSurfaceGetFormatIndexStride
C#
public static uint MeshSurfaceGetFormatIndexStride(RenderingServer.ArrayFormat format, int vertexCount);

Returns the stride of the index buffer for a mesh with the given format.

Parameters
NameTypeDefault
formatRenderingServer.ArrayFormat—
vertexCountint—
Returns uint
MeshSurfaceGetFormatNormalTangentStrideuint
# MeshSurfaceGetFormatNormalTangentStride
C#
public static uint MeshSurfaceGetFormatNormalTangentStride(RenderingServer.ArrayFormat format, int vertexCount);

Returns the stride of the combined normals and tangents for a mesh with given format. Note importantly that, while normals and tangents are in the vertex buffer with vertices, they are only interleaved with each other and so have a different stride than vertex positions.

Parameters
NameTypeDefault
formatRenderingServer.ArrayFormat—
vertexCountint—
Returns uint
MeshSurfaceGetFormatOffsetuint
# MeshSurfaceGetFormatOffset
C#
public static uint MeshSurfaceGetFormatOffset(RenderingServer.ArrayFormat format, int vertexCount, int arrayIndex);

Returns the offset of a given attribute by array_index in the start of its respective buffer.

Parameters
NameTypeDefault
formatRenderingServer.ArrayFormat—
vertexCountint—
arrayIndexint—
Returns uint
MeshSurfaceGetFormatSkinStrideuint
# MeshSurfaceGetFormatSkinStride
C#
public static uint MeshSurfaceGetFormatSkinStride(RenderingServer.ArrayFormat format, int vertexCount);

Returns the stride of the skin buffer for a mesh with given format.

Parameters
NameTypeDefault
formatRenderingServer.ArrayFormat—
vertexCountint—
Returns uint
MeshSurfaceGetFormatVertexStrideuint
# MeshSurfaceGetFormatVertexStride
C#
public static uint MeshSurfaceGetFormatVertexStride(RenderingServer.ArrayFormat format, int vertexCount);

Returns the stride of the vertex positions for a mesh with given format. Note importantly that vertex positions are stored consecutively and are not interleaved with the other attributes in the vertex buffer (normals and tangents).

Parameters
NameTypeDefault
formatRenderingServer.ArrayFormat—
vertexCountint—
Returns uint
MeshSurfaceGetIndexBufferRdRidRid
# MeshSurfaceGetIndexBufferRdRid
C#
public static Rid MeshSurfaceGetIndexBufferRdRid(Rid mesh, int surface);

Returns the RenderingDevice Rid handle of the index buffer of the given mesh surface. The returned Rid can be used like any other buffer on the RenderingDevice, so the indices can be read or written from a compute shader without a CPU round-trip. To bind the buffer as a storage buffer in compute, the surface must have been created with the RenderingServer.ArrayFormat.FlagUseStorageBuffer flag set in its format. Returns an invalid Rid if the surface is not indexed or if the rendering backend does not expose RenderingDevice Rids (such as the OpenGL backend).

Parameters
NameTypeDefault
meshRid—
surfaceint—
Returns Rid
MeshSurfaceGetMaterialRid
# MeshSurfaceGetMaterial
C#
public static Rid MeshSurfaceGetMaterial(Rid mesh, int surface);

Returns a mesh's surface's material.

Parameters
NameTypeDefault
meshRid—
surfaceint—
Returns Rid
MeshSurfaceGetSkinBufferRdRidRid
# MeshSurfaceGetSkinBufferRdRid
C#
public static Rid MeshSurfaceGetSkinBufferRdRid(Rid mesh, int surface);

Returns the RenderingDevice Rid handle of the skin buffer of the given mesh surface (Bones, Weights). The returned Rid can be used like any other buffer on the RenderingDevice, so the skin data can be read or written from a compute shader without a CPU round-trip. This buffer is created with the storage-buffer usage bit whenever the surface has skinning data, so it can be bound as a storage buffer in compute even without RenderingServer.ArrayFormat.FlagUseStorageBuffer. Returns an invalid Rid if the surface has no skin buffer or if the rendering backend does not expose RenderingDevice Rids (such as the OpenGL backend).

Parameters
NameTypeDefault
meshRid—
surfaceint—
Returns Rid
MeshSurfaceGetVertexBufferRdRidRid
# MeshSurfaceGetVertexBufferRdRid
C#
public static Rid MeshSurfaceGetVertexBufferRdRid(Rid mesh, int surface);

Returns the RenderingDevice Rid handle of the vertex buffer of the given mesh surface (Vertex, Normal, Tangent). The returned Rid can be used like any other buffer on the RenderingDevice, so the surface vertices can be read or written from a compute shader without a CPU round-trip. This is the Mesh equivalent of RenderingServer.MultimeshGetBufferRdRid and is intended for GPU-driven mesh workflows (procedural meshes, ribbon trails, cloth, hair, grass) implemented from a ReckfellExtension. To bind the buffer as a storage buffer in compute, the surface must have been created with the RenderingServer.ArrayFormat.FlagUseStorageBuffer flag set in its format. Returns an invalid Rid if the surface has no vertex buffer or if the rendering backend does not expose RenderingDevice Rids (such as the OpenGL backend).

Parameters
NameTypeDefault
meshRid—
surfaceint—
Returns Rid
MeshSurfaceRemovevoid
# MeshSurfaceRemove
C#
public static void MeshSurfaceRemove(Rid mesh, int surface);

Removes the surface at the given index from the Mesh, shifting surfaces with higher index down by one.

Parameters
NameTypeDefault
meshRid—
surfaceint—
MeshSurfaceSetMaterialvoid
# MeshSurfaceSetMaterial
C#
public static void MeshSurfaceSetMaterial(Rid mesh, int surface, Rid material);

Sets a mesh's surface's material.

Parameters
NameTypeDefault
meshRid—
surfaceint—
materialRid—
MeshSurfaceUpdateAttributeRegion2 overloads
# MeshSurfaceUpdateAttributeRegion · 1/2
C#
public static void MeshSurfaceUpdateAttributeRegion(Rid mesh, int surface, int offset, byte[] data);

Updates the attribute buffer of the mesh surface with the given data. The expected data per attribute is 8 or 12 bytes (4 bytes per float, 2 floats per Vector2, and 3 floats per Vector3) depending on if the mesh is using Vector2 or Vector3 vertices. This value can be determined with RenderingServer.MeshSurfaceGetFormatAttributeStride instead. The starting point of the updates can be changed with offset. The value of offset should be a multiple of 12 bytes in most cases to align to each attribute. A Vector3[] of attribute locations can be converted into a byte[] using PackedVector3Array.to_byte_array for use in data.

Parameters
NameTypeDefault
meshRid—
surfaceint—
offsetint—
databyte[]—
# MeshSurfaceUpdateAttributeRegion · 2/2
C#
public static void MeshSurfaceUpdateAttributeRegion(Rid mesh, int surface, int offset, ReadOnlySpan<byte> data);

Updates the attribute buffer of the mesh surface with the given data. The expected data per attribute is 8 or 12 bytes (4 bytes per float, 2 floats per Vector2, and 3 floats per Vector3) depending on if the mesh is using Vector2 or Vector3 vertices. This value can be determined with RenderingServer.MeshSurfaceGetFormatAttributeStride instead. The starting point of the updates can be changed with offset. The value of offset should be a multiple of 12 bytes in most cases to align to each attribute. A Vector3[] of attribute locations can be converted into a byte[] using PackedVector3Array.to_byte_array for use in data.

Parameters
NameTypeDefault
meshRid—
surfaceint—
offsetint—
dataReadOnlySpan<byte>—
MeshSurfaceUpdateIndexRegion2 overloads
# MeshSurfaceUpdateIndexRegion · 1/2
C#
public static void MeshSurfaceUpdateIndexRegion(Rid mesh, int surface, int offset, byte[] data);

Updates the index buffer of the mesh surface with the given data. The expected data are 16 or 32-bit unsigned integers, which can be determined with RenderingServer.MeshSurfaceGetFormatIndexStride.

Parameters
NameTypeDefault
meshRid—
surfaceint—
offsetint—
databyte[]—
# MeshSurfaceUpdateIndexRegion · 2/2
C#
public static void MeshSurfaceUpdateIndexRegion(Rid mesh, int surface, int offset, ReadOnlySpan<byte> data);

Updates the index buffer of the mesh surface with the given data. The expected data are 16 or 32-bit unsigned integers, which can be determined with RenderingServer.MeshSurfaceGetFormatIndexStride.

Parameters
NameTypeDefault
meshRid—
surfaceint—
offsetint—
dataReadOnlySpan<byte>—
MeshSurfaceUpdateSkinRegion2 overloads
# MeshSurfaceUpdateSkinRegion · 1/2
C#
public static void MeshSurfaceUpdateSkinRegion(Rid mesh, int surface, int offset, byte[] data);

Updates the skin buffer of the mesh surface with the given data. The expected data per skin is 8 or 12 bytes (4 bytes per float, 2 floats per Vector2, and 3 floats per Vector3) depending on if the mesh is using Vector2 or Vector3 vertices. This value can be determined with RenderingServer.MeshSurfaceGetFormatSkinStride instead. The starting point of the updates can be changed with offset. The value of offset should be a multiple of 12 bytes in most cases to align to each skin. A Vector3[] of skin locations can be converted into a byte[] using PackedVector3Array.to_byte_array for use in data.

Parameters
NameTypeDefault
meshRid—
surfaceint—
offsetint—
databyte[]—
# MeshSurfaceUpdateSkinRegion · 2/2
C#
public static void MeshSurfaceUpdateSkinRegion(Rid mesh, int surface, int offset, ReadOnlySpan<byte> data);

Updates the skin buffer of the mesh surface with the given data. The expected data per skin is 8 or 12 bytes (4 bytes per float, 2 floats per Vector2, and 3 floats per Vector3) depending on if the mesh is using Vector2 or Vector3 vertices. This value can be determined with RenderingServer.MeshSurfaceGetFormatSkinStride instead. The starting point of the updates can be changed with offset. The value of offset should be a multiple of 12 bytes in most cases to align to each skin. A Vector3[] of skin locations can be converted into a byte[] using PackedVector3Array.to_byte_array for use in data.

Parameters
NameTypeDefault
meshRid—
surfaceint—
offsetint—
dataReadOnlySpan<byte>—
MeshSurfaceUpdateVertexRegion2 overloads
# MeshSurfaceUpdateVertexRegion · 1/2
C#
public static void MeshSurfaceUpdateVertexRegion(Rid mesh, int surface, int offset, byte[] data);

Updates the vertex buffer of the mesh surface with the given data. The expected data per vertex is 8 or 12 bytes (4 bytes per float, 2 floats per Vector2, and 3 floats per Vector3) depending on if the mesh is using Vector2 or Vector3 vertices. This value can be determined with RenderingServer.MeshSurfaceGetFormatVertexStride instead. The starting point of the updates can be changed with offset. The value of offset should be a multiple of 12 bytes in most cases to align to each vertex. A Vector3[] of vertex locations can be converted into a byte[] using PackedVector3Array.to_byte_array for use in data.

Parameters
NameTypeDefault
meshRid—
surfaceint—
offsetint—
databyte[]—
# MeshSurfaceUpdateVertexRegion · 2/2
C#
public static void MeshSurfaceUpdateVertexRegion(Rid mesh, int surface, int offset, ReadOnlySpan<byte> data);

Updates the vertex buffer of the mesh surface with the given data. The expected data per vertex is 8 or 12 bytes (4 bytes per float, 2 floats per Vector2, and 3 floats per Vector3) depending on if the mesh is using Vector2 or Vector3 vertices. This value can be determined with RenderingServer.MeshSurfaceGetFormatVertexStride instead. The starting point of the updates can be changed with offset. The value of offset should be a multiple of 12 bytes in most cases to align to each vertex. A Vector3[] of vertex locations can be converted into a byte[] using PackedVector3Array.to_byte_array for use in data.

Parameters
NameTypeDefault
meshRid—
surfaceint—
offsetint—
dataReadOnlySpan<byte>—
MultimeshAllocateData2 overloads
# MultimeshAllocateData · 1/2
C#
public static void MultimeshAllocateData(Rid multimesh, int instances, RenderingServer.MultimeshTransformFormat transformFormat, bool colorFormat, bool customDataFormat);

Sets up the multimesh using the specified data. The number of instances is set by instances. The format of the instance transforms is set by transform_format, which should be set according to whether the multimesh is meant to be rendered in 2D or 3D. If color_format is true, each instance will have a color associated with it. If custom_data_format is true, each instance will have a custom data vector associated with it. If use_indirect is true, an indirect command buffer will be created for this multimesh, allowing the instance count to be modified directly on the GPU. See also RenderingServer.MultimeshGetCommandBufferRdRid.

Parameters
NameTypeDefault
multimeshRid—
instancesint—
transformFormatRenderingServer.MultimeshTransformFormat—
colorFormatbool—
customDataFormatbool—
# MultimeshAllocateData · 2/2
C#
public static void MultimeshAllocateData(Rid multimesh, int instances, RenderingServer.MultimeshTransformFormat transformFormat, bool colorFormat = false, bool customDataFormat = false, bool useIndirect = false);

Sets up the multimesh using the specified data. The number of instances is set by instances. The format of the instance transforms is set by transform_format, which should be set according to whether the multimesh is meant to be rendered in 2D or 3D. If color_format is true, each instance will have a color associated with it. If custom_data_format is true, each instance will have a custom data vector associated with it. If use_indirect is true, an indirect command buffer will be created for this multimesh, allowing the instance count to be modified directly on the GPU. See also RenderingServer.MultimeshGetCommandBufferRdRid.

Parameters
NameTypeDefault
multimeshRid—
instancesint—
transformFormatRenderingServer.MultimeshTransformFormat—
colorFormatboolfalse
customDataFormatboolfalse
useIndirectboolfalse
MultimeshCreateRid
# MultimeshCreate
C#
public static Rid MultimeshCreate();

Creates a new multimesh on the RenderingServer and returns an Rid handle. This RID will be used in all multimesh_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. To place in a scene, attach this multimesh to an instance using RenderingServer.InstanceSetBase using the returned RID. Note: The equivalent resource is MultiMesh.

Returns Rid
MultimeshGetAabbAabb
# MultimeshGetAabb
C#
public static Aabb MultimeshGetAabb(Rid multimesh);

Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh.

Parameters
NameTypeDefault
multimeshRid—
Returns Aabb
MultimeshGetBufferfloat[]
# MultimeshGetBuffer
C#
public static float[] MultimeshGetBuffer(Rid multimesh);

Returns the MultiMesh data (such as instance transforms, colors, etc.). See RenderingServer.MultimeshSetBuffer for details on the returned data. Note: If the buffer is in the engine's internal cache, it will have to be fetched from GPU memory and possibly decompressed. This means RenderingServer.MultimeshGetBuffer is potentially a slow operation and should be avoided whenever possible.

Parameters
NameTypeDefault
multimeshRid—
Returns float[]
MultimeshGetBufferRdRidRid
# MultimeshGetBufferRdRid
C#
public static Rid MultimeshGetBufferRdRid(Rid multimesh);

Returns the RenderingDevice Rid handle of the MultiMesh, which can be used as any other buffer on the Rendering Device.

Parameters
NameTypeDefault
multimeshRid—
Returns Rid
MultimeshGetCommandBufferRdRidRid
# MultimeshGetCommandBufferRdRid
C#
public static Rid MultimeshGetCommandBufferRdRid(Rid multimesh);

Returns the RenderingDevice Rid handle of the MultiMesh command buffer. This Rid is only valid if use_indirect is set to true when allocating data through RenderingServer.MultimeshAllocateData. It can be used to directly modify the instance count via buffer. The data structure is dependent on both how many surfaces the mesh contains and whether it is indexed or not, the buffer has 5 integers in it, with the last unused if the mesh is not indexed. Each of the values in the buffer correspond to these options:

Text
Indexed:
  0 - indexCount;
  1 - instanceCount;
  2 - firstIndex;
  3 - vertexOffset;
  4 - firstInstance;
Non-indexed:
  0 - vertexCount;
  1 - instanceCount;
  2 - firstVertex;
  3 - firstInstance;
  4 - unused;
Parameters
NameTypeDefault
multimeshRid—
Returns Rid
MultimeshGetCustomAabbAabb
# MultimeshGetCustomAabb
C#
public static Aabb MultimeshGetCustomAabb(Rid multimesh);

Returns the custom AABB defined for this MultiMesh resource.

Parameters
NameTypeDefault
multimeshRid—
Returns Aabb
MultimeshGetInstanceCountint
# MultimeshGetInstanceCount
C#
public static int MultimeshGetInstanceCount(Rid multimesh);

Returns the number of instances allocated for this multimesh.

Parameters
NameTypeDefault
multimeshRid—
Returns int
MultimeshGetMeshRid
# MultimeshGetMesh
C#
public static Rid MultimeshGetMesh(Rid multimesh);

Returns the RID of the mesh that will be used in drawing this multimesh.

Parameters
NameTypeDefault
multimeshRid—
Returns Rid
MultimeshGetVisibleInstancesint
# MultimeshGetVisibleInstances
C#
public static int MultimeshGetVisibleInstances(Rid multimesh);

Returns the number of visible instances for this multimesh.

Parameters
NameTypeDefault
multimeshRid—
Returns int
MultimeshInstanceGetColorColor
# MultimeshInstanceGetColor
C#
public static Color MultimeshInstanceGetColor(Rid multimesh, int index);

Returns the color by which the specified instance will be modulated.

Parameters
NameTypeDefault
multimeshRid—
indexint—
Returns Color
MultimeshInstanceGetCustomDataColor
# MultimeshInstanceGetCustomData
C#
public static Color MultimeshInstanceGetCustomData(Rid multimesh, int index);

Returns the custom data associated with the specified instance.

Parameters
NameTypeDefault
multimeshRid—
indexint—
Returns Color
MultimeshInstanceGetTransformTransform3D
# MultimeshInstanceGetTransform
C#
public static Transform3D MultimeshInstanceGetTransform(Rid multimesh, int index);

Returns the Transform3D of the specified instance.

Parameters
NameTypeDefault
multimeshRid—
indexint—
Returns Transform3D
MultimeshInstanceGetTransform2DTransform2D
# MultimeshInstanceGetTransform2D
C#
public static Transform2D MultimeshInstanceGetTransform2D(Rid multimesh, int index);

Returns the Transform2D of the specified instance. For use when the multimesh is set to use 2D transforms.

Parameters
NameTypeDefault
multimeshRid—
indexint—
Returns Transform2D
MultimeshInstanceResetPhysicsInterpolationvoid
# MultimeshInstanceResetPhysicsInterpolation
C#
public static void MultimeshInstanceResetPhysicsInterpolation(Rid multimesh, int index);

Prevents physics interpolation for the specified instance during the current physics tick. This is useful when moving an instance to a new location, to give an instantaneous change rather than interpolation from the previous location.

Parameters
NameTypeDefault
multimeshRid—
indexint—
MultimeshInstanceSetColorvoid
# MultimeshInstanceSetColor
C#
public static void MultimeshInstanceSetColor(Rid multimesh, int index, Color color);

Sets the color by which this instance will be modulated. Equivalent to MultiMesh.SetInstanceColor.

Parameters
NameTypeDefault
multimeshRid—
indexint—
colorColor—
MultimeshInstanceSetCustomDatavoid
# MultimeshInstanceSetCustomData
C#
public static void MultimeshInstanceSetCustomData(Rid multimesh, int index, Color customData);

Sets the custom data for this instance. Custom data is passed as a Color, but is interpreted as a vec4 in the shader. Equivalent to MultiMesh.SetInstanceCustomData.

Parameters
NameTypeDefault
multimeshRid—
indexint—
customDataColor—
MultimeshInstanceSetTransformvoid
# MultimeshInstanceSetTransform
C#
public static void MultimeshInstanceSetTransform(Rid multimesh, int index, Transform3D transform);

Sets the Transform3D for this instance. Equivalent to MultiMesh.SetInstanceTransform.

Parameters
NameTypeDefault
multimeshRid—
indexint—
transformTransform3D—
MultimeshInstanceSetTransform2Dvoid
# MultimeshInstanceSetTransform2D
C#
public static void MultimeshInstanceSetTransform2D(Rid multimesh, int index, Transform2D transform);

Sets the Transform2D for this instance. For use when multimesh is used in 2D. Equivalent to MultiMesh.SetInstanceTransform2D.

Parameters
NameTypeDefault
multimeshRid—
indexint—
transformTransform2D—
MultimeshInstancesResetPhysicsInterpolationvoid
# MultimeshInstancesResetPhysicsInterpolation
C#
public static void MultimeshInstancesResetPhysicsInterpolation(Rid multimesh);

Prevents physics interpolation for all instances during the current physics tick. This is useful when moving all instances to new locations, to give instantaneous changes rather than interpolation from the previous locations.

Parameters
NameTypeDefault
multimeshRid—
MultimeshSetBuffer2 overloads
# MultimeshSetBuffer · 1/2
C#
public static void MultimeshSetBuffer(Rid multimesh, ReadOnlySpan<float> buffer);

Set the entire data to use for drawing the multimesh at once to buffer (such as instance transforms and colors). buffer's size must match the number of instances multiplied by the per-instance data size (which depends on the enabled MultiMesh fields). Otherwise, an error message is printed and nothing is rendered. See also RenderingServer.MultimeshGetBuffer. The per-instance data size and expected data order is:

Text
2D:
  - Position: 8 floats (8 floats for Transform2D)
  - Position + Vertex color: 12 floats (8 floats for Transform2D, 4 floats for Color)
  - Position + Custom data: 12 floats (8 floats for Transform2D, 4 floats of custom data)
  - Position + Vertex color + Custom data: 16 floats (8 floats for Transform2D, 4 floats for Color, 4 floats of custom data)
3D:
  - Position: 12 floats (12 floats for Transform3D)
  - Position + Vertex color: 16 floats (12 floats for Transform3D, 4 floats for Color)
  - Position + Custom data: 16 floats (12 floats for Transform3D, 4 floats of custom data)
  - Position + Vertex color + Custom data: 20 floats (12 floats for Transform3D, 4 floats for Color, 4 floats of custom data)

Instance transforms are in row-major order. Specifically:

  • For Transform2D the float-order is: (x.x, y.x, padding_float, origin.x, x.y, y.y, padding_float, origin.y).
  • For Transform3D the float-order is: (basis.x.x, basis.y.x, basis.z.x, origin.x, basis.x.y, basis.y.y, basis.z.y, origin.y, basis.x.z, basis.y.z, basis.z.z, origin.z).
Parameters
NameTypeDefault
multimeshRid—
bufferReadOnlySpan<float>—
# MultimeshSetBuffer · 2/2
C#
public static void MultimeshSetBuffer(Rid multimesh, float[] buffer);

Set the entire data to use for drawing the multimesh at once to buffer (such as instance transforms and colors). buffer's size must match the number of instances multiplied by the per-instance data size (which depends on the enabled MultiMesh fields). Otherwise, an error message is printed and nothing is rendered. See also RenderingServer.MultimeshGetBuffer. The per-instance data size and expected data order is:

Text
2D:
  - Position: 8 floats (8 floats for Transform2D)
  - Position + Vertex color: 12 floats (8 floats for Transform2D, 4 floats for Color)
  - Position + Custom data: 12 floats (8 floats for Transform2D, 4 floats of custom data)
  - Position + Vertex color + Custom data: 16 floats (8 floats for Transform2D, 4 floats for Color, 4 floats of custom data)
3D:
  - Position: 12 floats (12 floats for Transform3D)
  - Position + Vertex color: 16 floats (12 floats for Transform3D, 4 floats for Color)
  - Position + Custom data: 16 floats (12 floats for Transform3D, 4 floats of custom data)
  - Position + Vertex color + Custom data: 20 floats (12 floats for Transform3D, 4 floats for Color, 4 floats of custom data)

Instance transforms are in row-major order. Specifically:

  • For Transform2D the float-order is: (x.x, y.x, padding_float, origin.x, x.y, y.y, padding_float, origin.y).
  • For Transform3D the float-order is: (basis.x.x, basis.y.x, basis.z.x, origin.x, basis.x.y, basis.y.y, basis.z.y, origin.y, basis.x.z, basis.y.z, basis.z.z, origin.z).
Parameters
NameTypeDefault
multimeshRid—
bufferfloat[]—
MultimeshSetBufferInterpolated2 overloads
# MultimeshSetBufferInterpolated · 1/2
C#
public static void MultimeshSetBufferInterpolated(Rid multimesh, ReadOnlySpan<float> buffer, ReadOnlySpan<float> bufferPrevious);

Alternative version of RenderingServer.MultimeshSetBuffer for use with physics interpolation. Takes both an array of current data and an array of data for the previous physics tick.

Parameters
NameTypeDefault
multimeshRid—
bufferReadOnlySpan<float>—
bufferPreviousReadOnlySpan<float>—
# MultimeshSetBufferInterpolated · 2/2
C#
public static void MultimeshSetBufferInterpolated(Rid multimesh, float[] buffer, float[] bufferPrevious);

Alternative version of RenderingServer.MultimeshSetBuffer for use with physics interpolation. Takes both an array of current data and an array of data for the previous physics tick.

Parameters
NameTypeDefault
multimeshRid—
bufferfloat[]—
bufferPreviousfloat[]—
MultimeshSetCustomAabbvoid
# MultimeshSetCustomAabb
C#
public static void MultimeshSetCustomAabb(Rid multimesh, Aabb aabb);

Sets the custom AABB for this MultiMesh resource.

Parameters
NameTypeDefault
multimeshRid—
aabbAabb—
MultimeshSetMeshvoid
# MultimeshSetMesh
C#
public static void MultimeshSetMesh(Rid multimesh, Rid mesh);

Sets the mesh to be drawn by the multimesh. Equivalent to MultiMesh.Mesh.

Parameters
NameTypeDefault
multimeshRid—
meshRid—
MultimeshSetPhysicsInterpolatedvoid
# MultimeshSetPhysicsInterpolated
C#
public static void MultimeshSetPhysicsInterpolated(Rid multimesh, bool interpolated);

Turns on and off physics interpolation for this MultiMesh resource.

Parameters
NameTypeDefault
multimeshRid—
interpolatedbool—
MultimeshSetPhysicsInterpolationQualityvoid
# MultimeshSetPhysicsInterpolationQuality
C#
public static void MultimeshSetPhysicsInterpolationQuality(Rid multimesh, RenderingServer.MultimeshPhysicsInterpolationQuality quality);

Sets the physics interpolation quality for the MultiMesh. A value of RenderingServer.MultimeshPhysicsInterpolationQuality.Fast gives fast but low quality interpolation, a value of RenderingServer.MultimeshPhysicsInterpolationQuality.High gives slower but higher quality interpolation.

Parameters
NameTypeDefault
multimeshRid—
qualityRenderingServer.MultimeshPhysicsInterpolationQuality—
MultimeshSetVisibleInstancesvoid
# MultimeshSetVisibleInstances
C#
public static void MultimeshSetVisibleInstances(Rid multimesh, int visible);

Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to MultiMesh.VisibleInstanceCount.

Parameters
NameTypeDefault
multimeshRid—
visibleint—
OccluderCreateRid
# OccluderCreate
C#
public static Rid OccluderCreate();

Creates an occluder instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all occluder_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent resource is Occluder3D (not to be confused with the OccluderInstance3D node).

Returns Rid
OccluderSetMesh2 overloads
# OccluderSetMesh · 1/2
C#
public static void OccluderSetMesh(Rid occluder, Vector3[] vertices, int[] indices);

Sets the mesh data for the given occluder RID, which controls the shape of the occlusion culling that will be performed.

Parameters
NameTypeDefault
occluderRid—
verticesVector3[]—
indicesint[]—
# OccluderSetMesh · 2/2
C#
public static void OccluderSetMesh(Rid occluder, ReadOnlySpan<Vector3> vertices, ReadOnlySpan<int> indices);

Sets the mesh data for the given occluder RID, which controls the shape of the occlusion culling that will be performed.

Parameters
NameTypeDefault
occluderRid—
verticesReadOnlySpan<Vector3>—
indicesReadOnlySpan<int>—
OmniLightCreateRid
# OmniLightCreate
C#
public static Rid OmniLightCreate();

Creates a new omni light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most light_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. To place in a scene, attach this omni light to an instance using RenderingServer.InstanceSetBase using the returned RID. Note: The equivalent node is OmniLight3D.

Returns Rid
ParticlesCollisionCreateRid
# ParticlesCollisionCreate
C#
public static Rid ParticlesCollisionCreate();

Creates a new 3D GPU particle collision or attractor and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most particles_collision_* RenderingServer functions. Note: The equivalent nodes are GpuParticlesCollision3D and GpuParticlesAttractor3D.

Returns Rid
ParticlesCollisionHeightFieldUpdatevoid
# ParticlesCollisionHeightFieldUpdate
C#
public static void ParticlesCollisionHeightFieldUpdate(Rid particlesCollision);

Requests an update for the 3D GPU particle collision heightfield. This may be automatically called by the 3D GPU particle collision heightfield depending on its GpuParticlesCollisionHeightField3D.UpdateMode.

Parameters
NameTypeDefault
particlesCollisionRid—
ParticlesCollisionSetAttractorAttenuationvoid
# ParticlesCollisionSetAttractorAttenuation
C#
public static void ParticlesCollisionSetAttractorAttenuation(Rid particlesCollision, float curve);

Sets the attenuation curve for the 3D GPU particles attractor specified by the particles_collision RID. Only used for attractors, not colliders. Equivalent to GpuParticlesAttractor3D.Attenuation.

Parameters
NameTypeDefault
particlesCollisionRid—
curvefloat—
ParticlesCollisionSetAttractorDirectionalityvoid
# ParticlesCollisionSetAttractorDirectionality
C#
public static void ParticlesCollisionSetAttractorDirectionality(Rid particlesCollision, float amount);

Sets the directionality amount for the 3D GPU particles attractor specified by the particles_collision RID. Only used for attractors, not colliders. Equivalent to GpuParticlesAttractor3D.Directionality.

Parameters
NameTypeDefault
particlesCollisionRid—
amountfloat—
ParticlesCollisionSetAttractorStrengthvoid
# ParticlesCollisionSetAttractorStrength
C#
public static void ParticlesCollisionSetAttractorStrength(Rid particlesCollision, float strength);

Sets the strength for the 3D GPU particles attractor specified by the particles_collision RID. Only used for attractors, not colliders. Equivalent to GpuParticlesAttractor3D.Strength.

Parameters
NameTypeDefault
particlesCollisionRid—
strengthfloat—
ParticlesCollisionSetBoxExtentsvoid
# ParticlesCollisionSetBoxExtents
C#
public static void ParticlesCollisionSetBoxExtents(Rid particlesCollision, Vector3 extents);

Sets the extents for the 3D GPU particles collision by the particles_collision RID. Equivalent to GpuParticlesCollisionBox3D.Size, GpuParticlesCollisionSdf3D.Size, GpuParticlesCollisionHeightField3D.Size, GpuParticlesAttractorBox3D.Size or GpuParticlesAttractorVectorField3D.Size depending on the particles_collision type.

Parameters
NameTypeDefault
particlesCollisionRid—
extentsVector3—
ParticlesCollisionSetCollisionTypevoid
# ParticlesCollisionSetCollisionType
C#
public static void ParticlesCollisionSetCollisionType(Rid particlesCollision, RenderingServer.ParticlesCollisionType type);

Sets the collision or attractor shape type for the 3D GPU particles collision or attractor specified by the particles_collision RID.

Parameters
NameTypeDefault
particlesCollisionRid—
typeRenderingServer.ParticlesCollisionType—
ParticlesCollisionSetCullMaskvoid
# ParticlesCollisionSetCullMask
C#
public static void ParticlesCollisionSetCullMask(Rid particlesCollision, uint mask);

Sets the cull mask for the 3D GPU particles collision or attractor specified by the particles_collision RID. Equivalent to GpuParticlesCollision3D.CullMask or GpuParticlesAttractor3D.CullMask depending on the particles_collision type.

Parameters
NameTypeDefault
particlesCollisionRid—
maskuint—
ParticlesCollisionSetFieldTexturevoid
# ParticlesCollisionSetFieldTexture
C#
public static void ParticlesCollisionSetFieldTexture(Rid particlesCollision, Rid texture);

Sets the signed distance field texture for the 3D GPU particles collision specified by the particles_collision RID. Equivalent to GpuParticlesCollisionSdf3D.Texture or GpuParticlesAttractorVectorField3D.Texture depending on the particles_collision type.

Parameters
NameTypeDefault
particlesCollisionRid—
textureRid—
ParticlesCollisionSetHeightFieldMaskvoid
# ParticlesCollisionSetHeightFieldMask
C#
public static void ParticlesCollisionSetHeightFieldMask(Rid particlesCollision, uint mask);

Sets the heightfield mask for the 3D GPU particles heightfield collision specified by the particles_collision RID. Equivalent to GpuParticlesCollisionHeightField3D.HeightfieldMask.

Parameters
NameTypeDefault
particlesCollisionRid—
maskuint—
ParticlesCollisionSetHeightFieldResolutionvoid
# ParticlesCollisionSetHeightFieldResolution
C#
public static void ParticlesCollisionSetHeightFieldResolution(Rid particlesCollision, RenderingServer.ParticlesCollisionHeightfieldResolution resolution);

Sets the heightmap resolution for the 3D GPU particles heightfield collision specified by the particles_collision RID. Equivalent to GpuParticlesCollisionHeightField3D.Resolution.

Parameters
NameTypeDefault
particlesCollisionRid—
resolutionRenderingServer.ParticlesCollisionHeightfieldResolution—
ParticlesCollisionSetSphereRadiusvoid
# ParticlesCollisionSetSphereRadius
C#
public static void ParticlesCollisionSetSphereRadius(Rid particlesCollision, float radius);

Sets the radius for the 3D GPU particles sphere collision or attractor specified by the particles_collision RID. Equivalent to GpuParticlesCollisionSphere3D.Radius or GpuParticlesAttractorSphere3D.Radius depending on the particles_collision type.

Parameters
NameTypeDefault
particlesCollisionRid—
radiusfloat—
ParticlesCreateRid
# ParticlesCreate
C#
public static Rid ParticlesCreate();

Creates a GPU-based particle system and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all particles_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. To place in a scene, attach these particles to an instance using RenderingServer.InstanceSetBase using the returned RID. Note: The equivalent nodes are GpuParticles2D and GpuParticles3D. Note: All particles_* methods only apply to GPU-based particles, not CPU-based particles. CpuParticles2D and CpuParticles3D do not have equivalent RenderingServer functions available, as these use MultiMeshInstance2D and MultiMeshInstance3D under the hood (see multimesh_* methods).

Returns Rid
ParticlesEmitvoid
# ParticlesEmit
C#
public static void ParticlesEmit(Rid particles, Transform3D transform, Vector3 velocity, Color color, Color custom, uint emitFlags);

Manually emits particles from the particles instance.

Parameters
NameTypeDefault
particlesRid—
transformTransform3D—
velocityVector3—
colorColor—
customColor—
emitFlagsuint—
ParticlesGetCurrentAabbAabb
# ParticlesGetCurrentAabb
C#
public static Aabb ParticlesGetCurrentAabb(Rid particles);

Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to GpuParticles3D.CaptureAabb.

Parameters
NameTypeDefault
particlesRid—
Returns Aabb
ParticlesGetEmittingbool
# ParticlesGetEmitting
C#
public static bool ParticlesGetEmitting(Rid particles);

Returns true if particles are currently set to emitting.

Parameters
NameTypeDefault
particlesRid—
Returns bool
ParticlesIsInactivebool
# ParticlesIsInactive
C#
public static bool ParticlesIsInactive(Rid particles);

Returns true if particles are not emitting and particles are set to inactive.

Parameters
NameTypeDefault
particlesRid—
Returns bool
ParticlesRequestProcessvoid
# ParticlesRequestProcess
C#
public static void ParticlesRequestProcess(Rid particles);

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 RenderingServer.InstancesCullAabb, RenderingServer.InstancesCullConvex, or RenderingServer.InstancesCullRay.

Parameters
NameTypeDefault
particlesRid—
ParticlesRequestProcessTime2 overloads
# ParticlesRequestProcessTime · 1/2
C#
public static void ParticlesRequestProcessTime(Rid particles, float processTime);

Requests the particles to process for extra process time during a single frame. process_time defines the time that the particles will process while emitting is on. process_time_residual defines the time that particles will process with emitting turned off for the simulation. When combined with the particles' speed scale set to 0.0, this is useful to be able to seek a particle system timeline.

Parameters
NameTypeDefault
particlesRid—
processTimefloat—
# ParticlesRequestProcessTime · 2/2
C#
public static void ParticlesRequestProcessTime(Rid particles, float processTime, float processTimeResidual = 0f);

Requests the particles to process for extra process time during a single frame. process_time defines the time that the particles will process while emitting is on. process_time_residual defines the time that particles will process with emitting turned off for the simulation. When combined with the particles' speed scale set to 0.0, this is useful to be able to seek a particle system timeline.

Parameters
NameTypeDefault
particlesRid—
processTimefloat—
processTimeResidualfloat0f
ParticlesRestartvoid
# ParticlesRestart
C#
public static void ParticlesRestart(Rid particles);

Reset the particles on the next update. Equivalent to GpuParticles3D.Restart.

Parameters
NameTypeDefault
particlesRid—
ParticlesSetAmountvoid
# ParticlesSetAmount
C#
public static void ParticlesSetAmount(Rid particles, int amount);

Sets the number of particles to be drawn and allocates the memory for them. Equivalent to GpuParticles3D.Amount.

Parameters
NameTypeDefault
particlesRid—
amountint—
ParticlesSetAmountRatiovoid
# ParticlesSetAmountRatio
C#
public static void ParticlesSetAmountRatio(Rid particles, float ratio);

Sets the amount ratio for particles to be emitted. Equivalent to GpuParticles3D.AmountRatio.

Parameters
NameTypeDefault
particlesRid—
ratiofloat—
ParticlesSetCollisionBaseSizevoid
# ParticlesSetCollisionBaseSize
C#
public static void ParticlesSetCollisionBaseSize(Rid particles, float size);

Sets the base size for particle collision. Equivalent to GpuParticles3D.CollisionBaseSize.

Parameters
NameTypeDefault
particlesRid—
sizefloat—
ParticlesSetCustomAabbvoid
# ParticlesSetCustomAabb
C#
public static void ParticlesSetCustomAabb(Rid particles, Aabb aabb);

Sets a custom axis-aligned bounding box for the particle system. Equivalent to GpuParticles3D.VisibilityAabb.

Parameters
NameTypeDefault
particlesRid—
aabbAabb—
ParticlesSetDrawOrdervoid
# ParticlesSetDrawOrder
C#
public static void ParticlesSetDrawOrder(Rid particles, RenderingServer.ParticlesDrawOrder order);

Sets the draw order of the particles. Equivalent to GpuParticles3D.DrawOrder.

Parameters
NameTypeDefault
particlesRid—
orderRenderingServer.ParticlesDrawOrder—
ParticlesSetDrawPassMeshvoid
# ParticlesSetDrawPassMesh
C#
public static void ParticlesSetDrawPassMesh(Rid particles, int pass, Rid mesh);

Sets the mesh to be used for the specified draw pass. Equivalent to GpuParticles3D.DrawPass1, GpuParticles3D.DrawPass2, GpuParticles3D.DrawPass3, and GpuParticles3D.DrawPass4.

Parameters
NameTypeDefault
particlesRid—
passint—
meshRid—
ParticlesSetDrawPassesvoid
# ParticlesSetDrawPasses
C#
public static void ParticlesSetDrawPasses(Rid particles, int count);

Sets the number of draw passes to use. Equivalent to GpuParticles3D.DrawPasses.

Parameters
NameTypeDefault
particlesRid—
countint—
ParticlesSetEmissionTransformvoid
# ParticlesSetEmissionTransform
C#
public static void ParticlesSetEmissionTransform(Rid particles, Transform3D transform);

Sets the Transform3D that will be used by the particles when they first emit.

Parameters
NameTypeDefault
particlesRid—
transformTransform3D—
ParticlesSetEmitterVelocityvoid
# ParticlesSetEmitterVelocity
C#
public static void ParticlesSetEmitterVelocity(Rid particles, Vector3 velocity);

Sets the velocity of a particle node, that will be used by ParticleProcessMaterial.InheritVelocityRatio.

Parameters
NameTypeDefault
particlesRid—
velocityVector3—
ParticlesSetEmittingvoid
# ParticlesSetEmitting
C#
public static void ParticlesSetEmitting(Rid particles, bool emitting);

If true, particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to GpuParticles3D.Emitting.

Parameters
NameTypeDefault
particlesRid—
emittingbool—
ParticlesSetExplosivenessRatiovoid
# ParticlesSetExplosivenessRatio
C#
public static void ParticlesSetExplosivenessRatio(Rid particles, float ratio);

Sets the explosiveness ratio. Equivalent to GpuParticles3D.Explosiveness.

Parameters
NameTypeDefault
particlesRid—
ratiofloat—
ParticlesSetFixedFpsvoid
# ParticlesSetFixedFps
C#
public static void ParticlesSetFixedFps(Rid particles, int fps);

Sets the frame rate that the particle system rendering will be fixed to. Equivalent to GpuParticles3D.FixedFps.

Parameters
NameTypeDefault
particlesRid—
fpsint—
ParticlesSetFractionalDeltavoid
# ParticlesSetFractionalDelta
C#
public static void ParticlesSetFractionalDelta(Rid particles, bool enable);

If true, uses fractional delta which smooths the movement of the particles. Equivalent to GpuParticles3D.FractDelta.

Parameters
NameTypeDefault
particlesRid—
enablebool—
ParticlesSetInterpToEndvoid
# ParticlesSetInterpToEnd
C#
public static void ParticlesSetInterpToEnd(Rid particles, float factor);

Sets the value that informs a ParticleProcessMaterial to rush all particles towards the end of their lifetime.

Parameters
NameTypeDefault
particlesRid—
factorfloat—
ParticlesSetInterpolatevoid
# ParticlesSetInterpolate
C#
public static void ParticlesSetInterpolate(Rid particles, bool enable);

Sets whether particles should use interpolation between fixed steps. Equivalent to GpuParticles3D.Interpolate.

Parameters
NameTypeDefault
particlesRid—
enablebool—
ParticlesSetLifetimevoid
# ParticlesSetLifetime
C#
public static void ParticlesSetLifetime(Rid particles, double lifetime);

Sets the lifetime of each particle in the system. Equivalent to GpuParticles3D.Lifetime.

Parameters
NameTypeDefault
particlesRid—
lifetimedouble—
ParticlesSetModevoid
# ParticlesSetMode
C#
public static void ParticlesSetMode(Rid particles, RenderingServer.ParticlesMode mode);

Sets whether the GPU particles specified by the particles RID should be rendered in 2D or 3D according to mode.

Parameters
NameTypeDefault
particlesRid—
modeRenderingServer.ParticlesMode—
ParticlesSetOneShotvoid
# ParticlesSetOneShot
C#
public static void ParticlesSetOneShot(Rid particles, bool oneShot);

If true, particles will emit once and then stop. Equivalent to GpuParticles3D.OneShot.

Parameters
NameTypeDefault
particlesRid—
oneShotbool—
ParticlesSetPreProcessTimevoid
# ParticlesSetPreProcessTime
C#
public static void ParticlesSetPreProcessTime(Rid particles, double time);

Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to GpuParticles3D.Preprocess.

Parameters
NameTypeDefault
particlesRid—
timedouble—
ParticlesSetProcessMaterialvoid
# ParticlesSetProcessMaterial
C#
public static void ParticlesSetProcessMaterial(Rid particles, Rid material);

Sets the material for processing the particles. Note: This is not the material used to draw the materials. Equivalent to GpuParticles3D.ProcessMaterial.

Parameters
NameTypeDefault
particlesRid—
materialRid—
ParticlesSetRandomnessRatiovoid
# ParticlesSetRandomnessRatio
C#
public static void ParticlesSetRandomnessRatio(Rid particles, float ratio);

Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to GpuParticles3D.Randomness.

Parameters
NameTypeDefault
particlesRid—
ratiofloat—
ParticlesSetSpeedScalevoid
# ParticlesSetSpeedScale
C#
public static void ParticlesSetSpeedScale(Rid particles, double scale);

Sets the speed scale of the particle system. Equivalent to GpuParticles3D.SpeedScale.

Parameters
NameTypeDefault
particlesRid—
scaledouble—
ParticlesSetSubemittervoid
# ParticlesSetSubemitter
C#
public static void ParticlesSetSubemitter(Rid particles, Rid subemitterParticles);

Sets the subemitter particles for the particle system. Equivalent to GpuParticles3D.SubEmitter.

Parameters
NameTypeDefault
particlesRid—
subemitterParticlesRid—
ParticlesSetTrailBindPosesvoid
# ParticlesSetTrailBindPoses
C#
public static void ParticlesSetTrailBindPoses(Rid particles, Reckfell.Collections.Array<Transform3D> bindPoses);

Sets the trail bind poses for the particle system. This specified as an array of Transform3Ds representing the bind pose for each draw pass. See GpuParticles3D.DrawSkin, Skin.GetBindCount, and Skin.GetBindPose. Set the value for each draw pass to Transform3D.Identity to use the default behavior, which is what built-in trails use (RibbonTrailMesh and TubeTrailMesh).

Parameters
NameTypeDefault
particlesRid—
bindPosesReckfell.Collections.Array<Transform3D>—
ParticlesSetTrailsvoid
# ParticlesSetTrails
C#
public static void ParticlesSetTrails(Rid particles, bool enable, float lengthSec);

If enable is true, enables trails for the particles with the specified length_sec in seconds. Equivalent to GpuParticles3D.TrailEnabled and GpuParticles3D.TrailLifetime.

Parameters
NameTypeDefault
particlesRid—
enablebool—
lengthSecfloat—
ParticlesSetTransformAlignvoid
# ParticlesSetTransformAlign
C#
public static void ParticlesSetTransformAlign(Rid particles, RenderingServer.ParticlesTransformAlign align);

Sets the transform alignment for the particle system. Equivalent to GpuParticles3D.TransformAlign.

Parameters
NameTypeDefault
particlesRid—
alignRenderingServer.ParticlesTransformAlign—
ParticlesSetTransformAlignAxisvoid
# ParticlesSetTransformAlignAxis
C#
public static void ParticlesSetTransformAlignAxis(Rid particles, RenderingServer.ParticlesTransformAlignAxis rotationAxis);

Sets which axis to use for transform alignment.

Parameters
NameTypeDefault
particlesRid—
rotationAxisRenderingServer.ParticlesTransformAlignAxis—
ParticlesSetTransformAlignChannelFiltervoid
# ParticlesSetTransformAlignChannelFilter
C#
public static void ParticlesSetTransformAlignChannelFilter(Rid particles, RenderingServer.ParticlesTransformAlignCustomSrc channelFilter);

When using Z-Billboarding, which CUSTOM channel to read from.

Parameters
NameTypeDefault
particlesRid—
channelFilterRenderingServer.ParticlesTransformAlignCustomSrc—
ParticlesSetUseLocalCoordinatesvoid
# ParticlesSetUseLocalCoordinates
C#
public static void ParticlesSetUseLocalCoordinates(Rid particles, bool enable);

If true, particles use local coordinates. If false they use global coordinates. Equivalent to GpuParticles3D.LocalCoords.

Parameters
NameTypeDefault
particlesRid—
enablebool—
PositionalSoftShadowFilterSetQualityvoid
# PositionalSoftShadowFilterSetQuality
C#
public static void PositionalSoftShadowFilterSetQuality(RenderingServer.ShadowQuality quality);

Sets the filter quality for omni and spot light shadows in 3D. See also ProjectSettings.rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality. This parameter is global and cannot be set on a per-viewport basis.

Parameters
NameTypeDefault
qualityRenderingServer.ShadowQuality—
ReflectionProbeCreateRid
# ReflectionProbeCreate
C#
public static Rid ReflectionProbeCreate();

Creates a reflection probe and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all reflection_probe_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. To place in a scene, attach this reflection probe to an instance using RenderingServer.InstanceSetBase using the returned RID. Note: The equivalent node is ReflectionProbe.

Returns Rid
ReflectionProbeSetAmbientColorvoid
# ReflectionProbeSetAmbientColor
C#
public static void ReflectionProbeSetAmbientColor(Rid probe, Color color);

Sets the reflection probe's custom ambient light color. Equivalent to ReflectionProbe.AmbientColor.

Parameters
NameTypeDefault
probeRid—
colorColor—
ReflectionProbeSetAmbientEnergyvoid
# ReflectionProbeSetAmbientEnergy
C#
public static void ReflectionProbeSetAmbientEnergy(Rid probe, float energy);

Sets the reflection probe's custom ambient light energy. Equivalent to ReflectionProbe.AmbientColorEnergy.

Parameters
NameTypeDefault
probeRid—
energyfloat—
ReflectionProbeSetAmbientModevoid
# ReflectionProbeSetAmbientMode
C#
public static void ReflectionProbeSetAmbientMode(Rid probe, RenderingServer.ReflectionProbeAmbientMode mode);

Sets the reflection probe's ambient light mode. Equivalent to ReflectionProbe.AmbientMode.

Parameters
NameTypeDefault
probeRid—
modeRenderingServer.ReflectionProbeAmbientMode—
ReflectionProbeSetAsInteriorvoid
# ReflectionProbeSetAsInterior
C#
public static void ReflectionProbeSetAsInterior(Rid probe, bool enable);

If true, reflections will ignore sky contribution. Equivalent to ReflectionProbe.Interior.

Parameters
NameTypeDefault
probeRid—
enablebool—
ReflectionProbeSetBlendDistancevoid
# ReflectionProbeSetBlendDistance
C#
public static void ReflectionProbeSetBlendDistance(Rid probe, float blendDistance);

Sets the distance in meters over which a probe blends into the scene.

Parameters
NameTypeDefault
probeRid—
blendDistancefloat—
ReflectionProbeSetCullMaskvoid
# ReflectionProbeSetCullMask
C#
public static void ReflectionProbeSetCullMask(Rid probe, uint layers);

Sets the render cull mask for this reflection probe. Only instances with a matching layer will be reflected by this probe. Equivalent to ReflectionProbe.CullMask.

Parameters
NameTypeDefault
probeRid—
layersuint—
ReflectionProbeSetEnableBoxProjectionvoid
# ReflectionProbeSetEnableBoxProjection
C#
public static void ReflectionProbeSetEnableBoxProjection(Rid probe, bool enable);

If true, uses box projection. This can make reflections look more correct in certain situations. Equivalent to ReflectionProbe.BoxProjection.

Parameters
NameTypeDefault
probeRid—
enablebool—
ReflectionProbeSetEnableShadowsvoid
# ReflectionProbeSetEnableShadows
C#
public static void ReflectionProbeSetEnableShadows(Rid probe, bool enable);

If true, computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to ReflectionProbe.EnableShadows.

Parameters
NameTypeDefault
probeRid—
enablebool—
ReflectionProbeSetIntensityvoid
# ReflectionProbeSetIntensity
C#
public static void ReflectionProbeSetIntensity(Rid probe, float intensity);

Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to ReflectionProbe.Intensity.

Parameters
NameTypeDefault
probeRid—
intensityfloat—
ReflectionProbeSetMaxDistancevoid
# ReflectionProbeSetMaxDistance
C#
public static void ReflectionProbeSetMaxDistance(Rid probe, float distance);

Sets the max distance away from the probe an object can be before it is culled. Equivalent to ReflectionProbe.MaxDistance.

Parameters
NameTypeDefault
probeRid—
distancefloat—
ReflectionProbeSetMeshLodThresholdvoid
# ReflectionProbeSetMeshLodThreshold
C#
public static void ReflectionProbeSetMeshLodThreshold(Rid probe, float pixels);

Sets the mesh level of detail to use in the reflection probe rendering. Higher values will use less detailed versions of meshes that have LOD variations generated, which can improve performance. Equivalent to ReflectionProbe.MeshLodThreshold.

Parameters
NameTypeDefault
probeRid—
pixelsfloat—
ReflectionProbeSetOriginOffsetvoid
# ReflectionProbeSetOriginOffset
C#
public static void ReflectionProbeSetOriginOffset(Rid probe, Vector3 offset);

Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to ReflectionProbe.OriginOffset.

Parameters
NameTypeDefault
probeRid—
offsetVector3—
ReflectionProbeSetReflectionMaskvoid
# ReflectionProbeSetReflectionMask
C#
public static void ReflectionProbeSetReflectionMask(Rid probe, uint layers);

Sets the render reflection mask for this reflection probe. Only instances with a matching layer will have reflections applied from this probe. Equivalent to ReflectionProbe.ReflectionMask.

Parameters
NameTypeDefault
probeRid—
layersuint—
ReflectionProbeSetResolutionvoid · Deprecated
# ReflectionProbeSetResolution
C#
public static void ReflectionProbeSetResolution(Rid probe, int resolution);

Deprecated. This method does nothing.

Parameters
NameTypeDefault
probeRid—
resolutionint—
ReflectionProbeSetSizevoid
# ReflectionProbeSetSize
C#
public static void ReflectionProbeSetSize(Rid probe, Vector3 size);

Sets the size of the area that the reflection probe will capture. Equivalent to ReflectionProbe.Size.

Parameters
NameTypeDefault
probeRid—
sizeVector3—
ReflectionProbeSetUpdateModevoid
# ReflectionProbeSetUpdateMode
C#
public static void ReflectionProbeSetUpdateMode(Rid probe, RenderingServer.ReflectionProbeUpdateMode mode);

Sets how often the reflection probe updates. Can either be once or every frame.

Parameters
NameTypeDefault
probeRid—
modeRenderingServer.ReflectionProbeUpdateMode—
RequestFrameDrawnCallbackvoid
# RequestFrameDrawnCallback
C#
public static void RequestFrameDrawnCallback(Callable callable);

Schedules a callback to the given callable after a frame has been drawn.

Parameters
NameTypeDefault
callableCallable—
ScenarioCreateRid
# ScenarioCreate
C#
public static Rid ScenarioCreate();

Creates a scenario and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all scenario_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. The scenario is the 3D world that all the visual instances exist in.

Returns Rid
ScenarioSetCameraAttributesvoid
# ScenarioSetCameraAttributes
C#
public static void ScenarioSetCameraAttributes(Rid scenario, Rid effects);

Sets the camera attributes (effects) that will be used with this scenario. See also CameraAttributes.

Parameters
NameTypeDefault
scenarioRid—
effectsRid—
ScenarioSetCompositorvoid
# ScenarioSetCompositor
C#
public static void ScenarioSetCompositor(Rid scenario, Rid compositor);

Sets the compositor (compositor) that will be used with this scenario. See also Compositor.

Parameters
NameTypeDefault
scenarioRid—
compositorRid—
ScenarioSetEnvironmentvoid
# ScenarioSetEnvironment
C#
public static void ScenarioSetEnvironment(Rid scenario, Rid environment);

Sets the environment that will be used with this scenario. See also Environment.

Parameters
NameTypeDefault
scenarioRid—
environmentRid—
ScenarioSetFallbackEnvironmentvoid
# ScenarioSetFallbackEnvironment
C#
public static void ScenarioSetFallbackEnvironment(Rid scenario, Rid environment);

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.

Parameters
NameTypeDefault
scenarioRid—
environmentRid—
ScreenSpaceRoughnessLimiterSetActivevoid
# ScreenSpaceRoughnessLimiterSetActive
C#
public static void ScreenSpaceRoughnessLimiterSetActive(bool enable, float amount, float limit);

Sets the screen-space roughness limiter parameters, such as whether it should be enabled and its thresholds. Equivalent to ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/enabled, ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/amount and ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/limit.

Parameters
NameTypeDefault
enablebool—
amountfloat—
limitfloat—
SetBootImagevoid · Deprecated
# SetBootImage
C#
public static void SetBootImage(Image image, Color color, bool scale, bool useFilter = true);

Sets a boot image. The color defines the background color. The value of scale indicates if the image will be scaled to fit the screen size. If use_filter is true, the image will be scaled with linear interpolation. If use_filter is false, the image will be scaled with nearest-neighbor interpolation.

Parameters
NameTypeDefault
imageImage—
colorColor—
scalebool—
useFilterbooltrue
SetBootImageWithStretchvoid
# SetBootImageWithStretch
C#
public static void SetBootImageWithStretch(Image image, Color color, RenderingServer.SplashStretchMode stretchMode, bool useFilter = true);

Sets a boot image. The color defines the background color. The value of stretch_mode indicates how the image will be stretched (see RenderingServer.SplashStretchMode for possible values). If use_filter is true, the image will be scaled with linear interpolation. If use_filter is false, the image will be scaled with nearest-neighbor interpolation.

Parameters
NameTypeDefault
imageImage—
colorColor—
stretchModeRenderingServer.SplashStretchMode—
useFilterbooltrue
SetDebugGenerateWireframesvoid
# SetDebugGenerateWireframes
C#
public static void SetDebugGenerateWireframes(bool generate);

If generate is true, generates debug wireframes for all meshes that are loaded when using the Compatibility renderer. By default, the engine does not generate debug wireframes at runtime, since they slow down loading of assets and take up VRAM. Note: You must call this method before loading any meshes when using the Compatibility renderer. Otherwise, wireframes will not be used.

Parameters
NameTypeDefault
generatebool—
SetDefaultClearColorvoid
# SetDefaultClearColor
C#
public static void SetDefaultClearColor(Color color);

Sets the default clear color which is used when a specific clear color has not been selected. See also RenderingServer.GetDefaultClearColor.

Parameters
NameTypeDefault
colorColor—
SetRenderLoopEnabledvoid
# SetRenderLoopEnabled
C#
public static void SetRenderLoopEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
ShaderCreateRid
# ShaderCreate
C#
public static Rid ShaderCreate();

Creates an empty shader and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all shader_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent resource is Shader.

Returns Rid
ShaderGetCodestring
# ShaderGetCode
C#
public static string ShaderGetCode(Rid shader);

Returns a shader's source code as a string.

Parameters
NameTypeDefault
shaderRid—
Returns string
ShaderGetDefaultTextureParameterRid
# ShaderGetDefaultTextureParameter
C#
public static Rid ShaderGetDefaultTextureParameter(Rid shader, StringName name, int index = 0);

Returns a default texture from a shader searched by name. Note: If the sampler array is used use index to access the specified texture.

Parameters
NameTypeDefault
shaderRid—
nameStringName—
indexint0
Returns Rid
ShaderGetParameterDefaultVariant
# ShaderGetParameterDefault
C#
public static Variant ShaderGetParameterDefault(Rid shader, StringName name);

Returns the default value for the specified shader uniform. This is usually the value written in the shader source code.

Parameters
NameTypeDefault
shaderRid—
nameStringName—
Returns Variant
ShaderSetCodevoid
# ShaderSetCode
C#
public static void ShaderSetCode(Rid shader, string code);

Sets the shader's source code (which triggers recompilation after being changed).

Parameters
NameTypeDefault
shaderRid—
codestring—
ShaderSetDefaultTextureParametervoid
# ShaderSetDefaultTextureParameter
C#
public static void ShaderSetDefaultTextureParameter(Rid shader, StringName name, Rid texture, int index = 0);

Low-level Shader default texture assignment using RenderingServer RIDs, distinct from a particular material SetShaderParameter. The texture must belong to RenderingServer, not a local RenderingDevice. An empty RID clears the index entry. Retain resource lifetimes; ordinary code can use Shader.SetDefaultTextureParameter with Texture.

Parameters
NameTypeDefault
shaderRid—
nameStringName—
textureRid—
indexint0
shader

Live Shader RID, not ShaderMaterial.

name

Sampler uniform name.

texture

Appropriate texture RID, or an empty RID to clear.

index

Sampler-array index, normally 0.

ShaderSetPathHintvoid
# ShaderSetPathHint
C#
public static void ShaderSetPathHint(Rid shader, string path);

Sets the path hint for the specified shader. This should generally match the Shader resource's Resource.ResourcePath.

Parameters
NameTypeDefault
shaderRid—
pathstring—
SkeletonAllocateDatavoid
# SkeletonAllocateData
C#
public static void SkeletonAllocateData(Rid skeleton, int bones, bool is2DSkeleton = false);

Allocates data for this skeleton using the number of bones specified in bones. If is_2d_skeleton is true, the skeleton will be treated as a 2D skeleton instead of a 3D skeleton. See also RenderingServer.SkeletonGetBoneCount.

Parameters
NameTypeDefault
skeletonRid—
bonesint—
is2DSkeletonboolfalse
SkeletonBoneGetTransformTransform3D
# SkeletonBoneGetTransform
C#
public static Transform3D SkeletonBoneGetTransform(Rid skeleton, int bone);

Returns the Transform3D set for a specific bone of this skeleton.

Parameters
NameTypeDefault
skeletonRid—
boneint—
Returns Transform3D
SkeletonBoneGetTransform2DTransform2D
# SkeletonBoneGetTransform2D
C#
public static Transform2D SkeletonBoneGetTransform2D(Rid skeleton, int bone);

Returns the Transform2D set for a specific bone of this skeleton.

Parameters
NameTypeDefault
skeletonRid—
boneint—
Returns Transform2D
SkeletonBoneSetTransformvoid
# SkeletonBoneSetTransform
C#
public static void SkeletonBoneSetTransform(Rid skeleton, int bone, Transform3D transform);

Sets the Transform3D for a specific bone of this skeleton.

Parameters
NameTypeDefault
skeletonRid—
boneint—
transformTransform3D—
SkeletonBoneSetTransform2Dvoid
# SkeletonBoneSetTransform2D
C#
public static void SkeletonBoneSetTransform2D(Rid skeleton, int bone, Transform2D transform);

Sets the Transform2D for a specific bone of this skeleton.

Parameters
NameTypeDefault
skeletonRid—
boneint—
transformTransform2D—
SkeletonCreateRid
# SkeletonCreate
C#
public static Rid SkeletonCreate();

Creates a skeleton and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all skeleton_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method.

Returns Rid
SkeletonGetBoneCountint
# SkeletonGetBoneCount
C#
public static int SkeletonGetBoneCount(Rid skeleton);

Returns the number of bones allocated for this skeleton. See also RenderingServer.SkeletonAllocateData.

Parameters
NameTypeDefault
skeletonRid—
Returns int
SkeletonSetBaseTransform2Dvoid
# SkeletonSetBaseTransform2D
C#
public static void SkeletonSetBaseTransform2D(Rid skeleton, Transform2D baseTransform);

Sets the base Transform2D to use for the specified skeleton.

Parameters
NameTypeDefault
skeletonRid—
baseTransformTransform2D—
SkyBakePanoramaImage
# SkyBakePanorama
C#
public static Image SkyBakePanorama(Rid sky, float energy, bool bakeIrradiance, Vector2I size);

Reads prepared Sky radiance as a panorama Image of the requested size. Allow the active environment to create/update radiance first. Current RD returns null without prepared radiance; this call does not replace Sky setup or frame rendering. GPU readback costs work; do not perform it every frame. Dispose the caller-owned Image after use.

Parameters
NameTypeDefault
skyRid—
energyfloat—
bakeIrradiancebool—
sizeVector2I—
sky

RID of a live Sky resource, not an Environment or Shader.

energy

Result RGB multiplier; the test uses 1.

bakeIrradiance

true selects irradiance convolution; false reads radiance. The false path is separately checked.

size

Positive Image width and height, such as 64×32.

Returns Image

New panorama Image, or null when radiance is unavailable.

SkyCreateRid
# SkyCreate
C#
public static Rid SkyCreate();

Creates an empty sky and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all sky_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method.

Returns Rid
SkySetMaterialvoid
# SkySetMaterial
C#
public static void SkySetMaterial(Rid sky, Rid material);

Sets the material that the sky uses to render the background, ambient and reflection maps.

Parameters
NameTypeDefault
skyRid—
materialRid—
SkySetModevoid
# SkySetMode
C#
public static void SkySetMode(Rid sky, RenderingServer.SkyMode mode);

Sets the process mode of the sky specified by the sky RID. Equivalent to Sky.ProcessMode.

Parameters
NameTypeDefault
skyRid—
modeRenderingServer.SkyMode—
SkySetRadianceSizevoid
# SkySetRadianceSize
C#
public static void SkySetRadianceSize(Rid sky, int radianceSize);

Sets the radiance_size of the sky specified by the sky RID (in pixels). Equivalent to Sky.RadianceSize.

Parameters
NameTypeDefault
skyRid—
radianceSizeint—
SpotLightCreateRid
# SpotLightCreate
C#
public static Rid SpotLightCreate();

Creates a spot light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most light_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. To place in a scene, attach this spot light to an instance using RenderingServer.InstanceSetBase using the returned RID.

Returns Rid
SubSurfaceScatteringSetQualityvoid
# SubSurfaceScatteringSetQuality
C#
public static void SubSurfaceScatteringSetQuality(RenderingServer.SubSurfaceScatteringQuality quality);

Sets ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality to use when rendering materials that have subsurface scattering enabled.

Parameters
NameTypeDefault
qualityRenderingServer.SubSurfaceScatteringQuality—
SubSurfaceScatteringSetScalevoid
# SubSurfaceScatteringSetScale
C#
public static void SubSurfaceScatteringSetScale(float scale, float depthScale);

Sets the ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale and ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale to use when rendering materials that have subsurface scattering enabled.

Parameters
NameTypeDefault
scalefloat—
depthScalefloat—
Texture2DCreateRid
# Texture2DCreate
C#
public static Rid Texture2DCreate(Image image);

Creates a 2-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_2d_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent resource is Texture2D. Note: Not to be confused with RenderingDevice.TextureCreate, which creates the graphics API's own texture type as opposed to the Reckfell-specific Texture2D resource.

Parameters
NameTypeDefault
imageImage—
Returns Rid
Texture2DGetImage
# Texture2DGet
C#
public static Image Texture2DGet(Rid texture);

Returns an Image instance from the given texture Rid. Example: Get the test texture from RenderingServer.GetTestTexture and apply it to a Sprite2D node:

Parameters
NameTypeDefault
textureRid—
Returns Image
Texture2DLayerGetImage
# Texture2DLayerGet
C#
public static Image Texture2DLayerGet(Rid texture, int layer);

Returns an Image instance from the given texture Rid and layer.

Parameters
NameTypeDefault
textureRid—
layerint—
Returns Image
Texture2DLayeredCreateRid
# Texture2DLayeredCreate
C#
public static Rid Texture2DLayeredCreate(Reckfell.Collections.Array<Image> layers, RenderingServer.TextureLayeredType layeredType);

Creates a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_2d_layered_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent resource is TextureLayered.

Parameters
NameTypeDefault
layersReckfell.Collections.Array<Image>—
layeredTypeRenderingServer.TextureLayeredType—
Returns Rid
Texture2DLayeredPlaceholderCreateRid
# Texture2DLayeredPlaceholderCreate
C#
public static Rid Texture2DLayeredPlaceholderCreate(RenderingServer.TextureLayeredType layeredType);

Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_2d_layered_* RenderingServer functions, although it does nothing when used. See also RenderingServer.Texture2DPlaceholderCreate. Note: The equivalent resource is PlaceholderTextureLayered.

Parameters
NameTypeDefault
layeredTypeRenderingServer.TextureLayeredType—
Returns Rid
Texture2DPlaceholderCreateRid
# Texture2DPlaceholderCreate
C#
public static Rid Texture2DPlaceholderCreate();

Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_2d_layered_* RenderingServer functions, although it does nothing when used. See also RenderingServer.Texture2DLayeredPlaceholderCreate. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent resource is PlaceholderTexture2D.

Returns Rid
Texture2DUpdatevoid
# Texture2DUpdate
C#
public static void Texture2DUpdate(Rid texture, Image image, int layer);

Updates the texture specified by the texture Rid with the data in image. A layer must also be specified, which should be 0 when updating a single-layer texture (Texture2D). Note: The image must have the same width, height and format as the current texture data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height or format, use RenderingServer.TextureReplace instead.

Parameters
NameTypeDefault
textureRid—
imageImage—
layerint—
Texture3DCreateRid
# Texture3DCreate
C#
public static Rid Texture3DCreate(Image.Format format, int width, int height, int depth, bool mipmaps, Reckfell.Collections.Array<Image> data);

Note: The equivalent resource is Texture3D.

Parameters
NameTypeDefault
formatImage.Format—
widthint—
heightint—
depthint—
mipmapsbool—
dataReckfell.Collections.Array<Image>—
Returns Rid
Texture3DGetReckfell.Collections.Array<Image>
# Texture3DGet
C#
public static Reckfell.Collections.Array<Image> Texture3DGet(Rid texture);

Returns 3D texture data as an array of Images for the specified texture Rid.

Parameters
NameTypeDefault
textureRid—
Returns Reckfell.Collections.Array<Image>
Texture3DPlaceholderCreateRid
# Texture3DPlaceholderCreate
C#
public static Rid Texture3DPlaceholderCreate();

Creates a placeholder for a 3-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_3d_* RenderingServer functions, although it does nothing when used. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent resource is PlaceholderTexture3D.

Returns Rid
Texture3DUpdatevoid
# Texture3DUpdate
C#
public static void Texture3DUpdate(Rid texture, Reckfell.Collections.Array<Image> data);

Updates the texture specified by the texture Rid's data with the data in data. All the texture's layers must be replaced at once. Note: The texture must have the same width, height, depth and format as the current texture data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height, depth or format, use RenderingServer.TextureReplace instead.

Parameters
NameTypeDefault
textureRid—
dataReckfell.Collections.Array<Image>—
TextureCreateFromNativeHandleRid
# TextureCreateFromNativeHandle
C#
public static Rid TextureCreateFromNativeHandle(RenderingServer.TextureType type, Image.Format format, ulong nativeHandle, int width, int height, int depth, int layers = 1, RenderingServer.TextureLayeredType layeredType = RenderingServer.TextureLayeredType.Layered2DArray);

Creates a texture based on a native handle that was created outside of Reckfell's renderer. Note: If using only the rendering device renderer, it's recommend to use RenderingDevice.TextureCreateFromExtension together with RenderingServer.TextureRdCreate, rather than this method. This way, the texture's format and usage can be controlled more effectively.

Parameters
NameTypeDefault
typeRenderingServer.TextureType—
formatImage.Format—
nativeHandleulong—
widthint—
heightint—
depthint—
layersint1
layeredTypeRenderingServer.TextureLayeredTypeRenderingServer.TextureLayeredType.Layered2DArray
Returns Rid
TextureDrawableBlitRectvoid
# TextureDrawableBlitRect
C#
public static void TextureDrawableBlitRect(Reckfell.Collections.Array<Rid> textures, Rect2I rect, Rid material, Color modulate, Reckfell.Collections.Array<Rid> sourceTextures, int toMipmap = 0);

Low-level DrawableTexture2D write operation. Takes RenderingServer RIDs, not local RenderingDevice RIDs. Requires 1–4 distinct initialized equal-sized targets and 1–4 sources with no source/target aliasing. Prefer resource BlitRect/BlitRectMulti in ordinary code and retain resource lifetimes.

Parameters
NameTypeDefault
texturesReckfell.Collections.Array<Rid>—
rectRect2I—
materialRid—
modulateColor—
sourceTexturesReckfell.Collections.Array<Rid>—
toMipmapint0
textures

1–4 destination RIDs in COLOR0 through 3 order.

rect

Shared rectangle relative to base target dimensions.

material

texture_blit material RID, not a Shader RID.

modulate

MODULATE color applied by shader code.

sourceTextures

1–4 source RenderingServer RIDs in slot order; an empty RID selects current RD white fallback.

toMipmap

Allocated destination level in every target.

TextureDrawableCreateRid
# TextureDrawableCreate
C#
public static Rid TextureDrawableCreate(int width, int height, RenderingServer.TextureDrawableFormat format, Color? color = default, bool withMipmaps = false);

Creates a 2-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_drawable* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent resource is DrawableTexture2D.

Parameters
NameTypeDefault
widthint—
heightint—
formatRenderingServer.TextureDrawableFormat—
colorColor?default
withMipmapsboolfalse
color

If the parameter is null, then the default value is new Color(1.0f, 1.0f, 1.0f, 1.0f).

Returns Rid
TextureDrawableGenerateMipmapsvoid
# TextureDrawableGenerateMipmaps
C#
public static void TextureDrawableGenerateMipmaps(Rid texture);

Calculates new MipMaps for the given Drawable texture.

Parameters
NameTypeDefault
textureRid—
TextureDrawableGetDefaultMaterialRid
# TextureDrawableGetDefaultMaterial
C#
public static Rid TextureDrawableGetDefaultMaterial();

Returns a ShaderMaterial with the default texture_blit Shader.

Returns Rid
TextureGetFormatImage.Format
# TextureGetFormat
C#
public static Image.Format TextureGetFormat(Rid texture);

Returns the format for the texture.

Parameters
NameTypeDefault
textureRid—
Returns Image.Format
TextureGetNativeHandleulong
# TextureGetNativeHandle
C#
public static ulong TextureGetNativeHandle(Rid texture, bool srgb = false);

Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with ReckfellExtension. srgb should be true when the texture uses nonlinear sRGB encoding and false when the texture uses linear encoding. Note: This function returns a uint64_t which internally maps to a GLuint (OpenGL) or VkImage (Vulkan).

Parameters
NameTypeDefault
textureRid—
srgbboolfalse
Returns ulong
TextureGetPathstring
# TextureGetPath
C#
public static string TextureGetPath(Rid texture);

Returns the resource path (starting with asset:// or uid://) for the specified texture RID. Returns an empty string if the resource is built-in. See also RenderingServer.TextureSetPath.

Parameters
NameTypeDefault
textureRid—
Returns string
TextureGetRdTextureRid
# TextureGetRdTexture
C#
public static Rid TextureGetRdTexture(Rid texture, bool srgb = false);

Returns a texture Rid that can be used with RenderingDevice. srgb should be true when the texture uses nonlinear sRGB encoding and false when the texture uses linear encoding.

Parameters
NameTypeDefault
textureRid—
srgbboolfalse
Returns Rid
TextureProxyCreateRid · Deprecated
# TextureProxyCreate
C#
public static Rid TextureProxyCreate(Rid @base);

This method does nothing and always returns an invalid Rid.

Parameters
NameTypeDefault
baseRid—
Returns Rid
TextureProxyUpdatevoid · Deprecated
# TextureProxyUpdate
C#
public static void TextureProxyUpdate(Rid texture, Rid proxyTo);

This method does nothing.

Parameters
NameTypeDefault
textureRid—
proxyToRid—
TextureRdCreateRid
# TextureRdCreate
C#
public static Rid TextureRdCreate(Rid rdTexture, RenderingServer.TextureLayeredType layerType = RenderingServer.TextureLayeredType.Layered2DArray);

Creates a new texture object based on a texture created directly on the RenderingDevice. If the texture contains layers, layer_type is used to define the layer type. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The RenderingServer's RenderingServer.FreeRid won't free the underlying rd_texture, you will want to free the rd_texture using RenderingDevice.FreeRid.

Parameters
NameTypeDefault
rdTextureRid—
layerTypeRenderingServer.TextureLayeredTypeRenderingServer.TextureLayeredType.Layered2DArray
Returns Rid
TextureReplacevoid
# TextureReplace
C#
public static void TextureReplace(Rid texture, Rid byTexture);

Replaces texture's texture data by the texture specified by the by_texture RID, without changing texture's RID.

Parameters
NameTypeDefault
textureRid—
byTextureRid—
TextureReplaceCompatiblevoid
# TextureReplaceCompatible
C#
public static void TextureReplaceCompatible(Rid texture, Rid byTexture);

Replaces texture's texture data by the texture specified by the by_texture RID, without changing texture's RID. Unlike RenderingServer.TextureReplace, this method automatically patches any uniform sets that reference texture so they point to the new underlying resource. This makes it suitable for replacing textures that are already bound in materials or shaders without invalidating existing draw state. The new texture may have different dimensions (e.g. for texture streaming mip level changes). Textures that are not compatible will likely cause rendering errors, so it's recommended to only use this method on textures that are compatible with each other (e.g. same format and usage flags).

Parameters
NameTypeDefault
textureRid—
byTextureRid—
TextureSetForceRedrawIfVisiblevoid
# TextureSetForceRedrawIfVisible
C#
public static void TextureSetForceRedrawIfVisible(Rid texture, bool enable);

Sets whether the texture RID should force redrawing when it's visible on screen when OS.LowProcessorUsageMode is true. This is used by AnimatedTexture to force redrawing.

Parameters
NameTypeDefault
textureRid—
enablebool—
TextureSetPathvoid
# TextureSetPath
C#
public static void TextureSetPath(Rid texture, string path);

Sets the resource path for this texture RID. See also RenderingServer.TextureGetPath. Note: This is purely a hint and does not cause the texture to be automatically saved when set to a asset:// path.

Parameters
NameTypeDefault
textureRid—
pathstring—
TextureSetSizeOverridevoid
# TextureSetSizeOverride
C#
public static void TextureSetSizeOverride(Rid texture, int width, int height);

Sets the size at which the texture should be displayed in 2D, ignoring its original size. This does not rescale the texture data itself, only how it is drawn in 2D. Set width and height to 0 to disable the size override.

Parameters
NameTypeDefault
textureRid—
widthint—
heightint—
ViewportAttachCameravoid
# ViewportAttachCamera
C#
public static void ViewportAttachCamera(Rid viewport, Rid camera);

Sets a viewport's camera.

Parameters
NameTypeDefault
viewportRid—
cameraRid—
ViewportAttachCanvasvoid
# ViewportAttachCanvas
C#
public static void ViewportAttachCanvas(Rid viewport, Rid canvas);

Sets a viewport's canvas.

Parameters
NameTypeDefault
viewportRid—
canvasRid—
ViewportAttachToScreenvoid
# ViewportAttachToScreen
C#
public static void ViewportAttachToScreen(Rid viewport, Rect2? rect = default, int screen = 0);

Copies the viewport to a region of the screen specified by rect. If RenderingServer.ViewportSetRenderDirectToScreen is true, then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. For example, you can set the root viewport to not render at all with the following code:

Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see RenderingServer.ViewportSetRenderDirectToScreen.

Parameters
NameTypeDefault
viewportRid—
rectRect2?default
screenint0
rect

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

ViewportCreateRid
# ViewportCreate
C#
public static Rid ViewportCreate();

Creates an empty viewport and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all viewport_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent node is Viewport.

Returns Rid
ViewportGetMeasuredRenderTimeCpudouble
# ViewportGetMeasuredRenderTimeCpu
C#
public static double ViewportGetMeasuredRenderTimeCpu(Rid viewport);

Returns the CPU time taken to render the last frame in milliseconds. This only includes time spent in rendering-related operations; scripts' _process functions and other engine subsystems are not included in this readout. To get a complete readout of CPU time spent to render the scene, sum the render times of all viewports that are drawn every frame plus RenderingServer.GetFrameSetupTimeCpu. Unlike Engine.GetFramesPerSecond, this method will accurately reflect CPU utilization even if framerate is capped via V-Sync or Engine.MaxFps. See also RenderingServer.ViewportGetMeasuredRenderTimeGpu. Note: Requires measurements to be enabled on the specified viewport using RenderingServer.ViewportSetMeasureRenderTime. Otherwise, this method returns 0.0.

Parameters
NameTypeDefault
viewportRid—
Returns double
ViewportGetMeasuredRenderTimeGpudouble
# ViewportGetMeasuredRenderTimeGpu
C#
public static double ViewportGetMeasuredRenderTimeGpu(Rid viewport);

Returns the GPU time taken to render the last frame in milliseconds. To get a complete readout of GPU time spent to render the scene, sum the render times of all viewports that are drawn every frame. Unlike Engine.GetFramesPerSecond, this method accurately reflects GPU utilization even if framerate is capped via V-Sync or Engine.MaxFps. See also RenderingServer.ViewportGetMeasuredRenderTimeCpu. Note: Requires measurements to be enabled on the specified viewport using RenderingServer.ViewportSetMeasureRenderTime. Otherwise, this method returns 0.0. Note: When GPU utilization is low enough during a certain period of time, GPUs will decrease their power state (which in turn decreases core and memory clock speeds). This can cause the reported GPU time to increase if GPU utilization is kept low enough by a framerate cap (compared to what it would be at the GPU's highest power state). Keep this in mind when benchmarking using RenderingServer.ViewportGetMeasuredRenderTimeGpu. This behavior can be overridden in the graphics driver settings at the cost of higher power usage.

Parameters
NameTypeDefault
viewportRid—
Returns double
ViewportGetRenderInfoint
# ViewportGetRenderInfo
C#
public static int ViewportGetRenderInfo(Rid viewport, RenderingServer.ViewportRenderInfoType type, RenderingServer.ViewportRenderInfo info);

Returns a statistic about the rendering engine which can be used for performance profiling. This is separated into render pass types, each of them having the same infos you can query (different passes will return different values). See also RenderingServer.GetRenderingInfo, which returns global information across all viewports. Note: Viewport rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, RenderingServer.ViewportGetRenderInfo returns 0. To print rendering information in _ready() successfully, use the following:

Parameters
NameTypeDefault
viewportRid—
typeRenderingServer.ViewportRenderInfoType—
infoRenderingServer.ViewportRenderInfo—
Returns int
ViewportGetRenderTargetRid
# ViewportGetRenderTarget
C#
public static Rid ViewportGetRenderTarget(Rid viewport);

Returns the render target for the viewport.

Parameters
NameTypeDefault
viewportRid—
Returns Rid
ViewportGetTextureRid
# ViewportGetTexture
C#
public static Rid ViewportGetTexture(Rid viewport);

Returns the viewport's last rendered frame.

Parameters
NameTypeDefault
viewportRid—
Returns Rid
ViewportGetUpdateModeRenderingServer.ViewportUpdateMode
# ViewportGetUpdateMode
C#
public static RenderingServer.ViewportUpdateMode ViewportGetUpdateMode(Rid viewport);

Returns the viewport's update mode. Warning: Calling this from any thread other than the rendering thread will be detrimental to performance.

Parameters
NameTypeDefault
viewportRid—
Returns RenderingServer.ViewportUpdateMode
ViewportRemoveCanvasvoid
# ViewportRemoveCanvas
C#
public static void ViewportRemoveCanvas(Rid viewport, Rid canvas);

Detaches a viewport from a canvas.

Parameters
NameTypeDefault
viewportRid—
canvasRid—
ViewportSetActivevoid
# ViewportSetActive
C#
public static void ViewportSetActive(Rid viewport, bool active);

If true, sets the viewport active, else sets it inactive.

Parameters
NameTypeDefault
viewportRid—
activebool—
ViewportSetAnisotropicFilteringLevelvoid
# ViewportSetAnisotropicFilteringLevel
C#
public static void ViewportSetAnisotropicFilteringLevel(Rid viewport, RenderingServer.ViewportAnisotropicFiltering anisotropicFilteringLevel);

Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of 0 forcibly disables anisotropic filtering, even on materials where it is enabled. The anisotropic filtering level also affects decals and light projectors if they are configured to use anisotropic filtering. See ProjectSettings.rendering/textures/decals/filter and ProjectSettings.rendering/textures/light_projectors/filter. Note: In 3D, for this setting to have an effect, set BaseMaterial3D.TextureFilter to BaseMaterial3D.TextureFilterEnum.LinearWithMipmapsAnisotropic or BaseMaterial3D.TextureFilterEnum.NearestWithMipmapsAnisotropic on materials. Note: In 2D, for this setting to have an effect, set CanvasItem.TextureFilter to CanvasItem.TextureFilterEnum.LinearWithMipmapsAnisotropic or CanvasItem.TextureFilterEnum.NearestWithMipmapsAnisotropic on the CanvasItem node displaying the texture (or in CanvasTexture). However, anisotropic filtering is rarely useful in 2D, so only enable it for textures in 2D if it makes a meaningful visual difference.

Parameters
NameTypeDefault
viewportRid—
anisotropicFilteringLevelRenderingServer.ViewportAnisotropicFiltering—
ViewportSetCanvasCullMaskvoid
# ViewportSetCanvasCullMask
C#
public static void ViewportSetCanvasCullMask(Rid viewport, uint canvasCullMask);

Sets the rendering mask associated with this Viewport. Only CanvasItem nodes with a matching rendering visibility layer will be rendered by this Viewport.

Parameters
NameTypeDefault
viewportRid—
canvasCullMaskuint—
ViewportSetCanvasStackingvoid
# ViewportSetCanvasStacking
C#
public static void ViewportSetCanvasStacking(Rid viewport, Rid canvas, int layer, int sublayer);

Sets the stacking order for a viewport's canvas. layer is the actual canvas layer, while sublayer specifies the stacking order of the canvas among those in the same layer. Note: layer should be between RenderingServer.CanvasLayerMin and RenderingServer.CanvasLayerMax (inclusive). Any other value will wrap around.

Parameters
NameTypeDefault
viewportRid—
canvasRid—
layerint—
sublayerint—
ViewportSetCanvasTransformvoid
# ViewportSetCanvasTransform
C#
public static void ViewportSetCanvasTransform(Rid viewport, Rid canvas, Transform2D offset);

Sets the transformation of a viewport's canvas.

Parameters
NameTypeDefault
viewportRid—
canvasRid—
offsetTransform2D—
ViewportSetClearModevoid
# ViewportSetClearMode
C#
public static void ViewportSetClearMode(Rid viewport, RenderingServer.ViewportClearMode clearMode);

Sets the clear mode of a viewport.

Parameters
NameTypeDefault
viewportRid—
clearModeRenderingServer.ViewportClearMode—
ViewportSetDebugDrawvoid
# ViewportSetDebugDraw
C#
public static void ViewportSetDebugDraw(Rid viewport, RenderingServer.ViewportDebugDraw draw);

Sets the debug draw mode of a viewport.

Parameters
NameTypeDefault
viewportRid—
drawRenderingServer.ViewportDebugDraw—
ViewportSetDefaultCanvasItemTextureFiltervoid
# ViewportSetDefaultCanvasItemTextureFilter
C#
public static void ViewportSetDefaultCanvasItemTextureFilter(Rid viewport, RenderingServer.CanvasItemTextureFilter filter);

Sets the default texture filtering mode for the specified viewport RID.

Parameters
NameTypeDefault
viewportRid—
filterRenderingServer.CanvasItemTextureFilter—
ViewportSetDefaultCanvasItemTextureRepeatvoid
# ViewportSetDefaultCanvasItemTextureRepeat
C#
public static void ViewportSetDefaultCanvasItemTextureRepeat(Rid viewport, RenderingServer.CanvasItemTextureRepeat repeat);

Sets the default texture repeat mode for the specified viewport RID.

Parameters
NameTypeDefault
viewportRid—
repeatRenderingServer.CanvasItemTextureRepeat—
ViewportSetDisable2Dvoid
# ViewportSetDisable2D
C#
public static void ViewportSetDisable2D(Rid viewport, bool disable);

If true, the viewport's canvas (i.e. 2D and GUI elements) is not rendered.

Parameters
NameTypeDefault
viewportRid—
disablebool—
ViewportSetDisable3Dvoid
# ViewportSetDisable3D
C#
public static void ViewportSetDisable3D(Rid viewport, bool disable);

If true, the viewport's 3D elements are not rendered.

Parameters
NameTypeDefault
viewportRid—
disablebool—
ViewportSetEnvironmentModevoid
# ViewportSetEnvironmentMode
C#
public static void ViewportSetEnvironmentMode(Rid viewport, RenderingServer.ViewportEnvironmentMode mode);

Sets the viewport's environment mode which allows enabling or disabling rendering of 3D environment over 2D canvas. When disabled, 2D will not be affected by the environment. When enabled, 2D will be affected by the environment if the environment background mode is RenderingServer.EnvironmentBG.Canvas. The default behavior is to inherit the setting from the viewport's parent. If the topmost parent is also set to RenderingServer.ViewportEnvironmentMode.Inherit, then the behavior will be the same as if it was set to RenderingServer.ViewportEnvironmentMode.Enabled.

Parameters
NameTypeDefault
viewportRid—
modeRenderingServer.ViewportEnvironmentMode—
ViewportSetFsrSharpnessvoid
# ViewportSetFsrSharpness
C#
public static void ViewportSetFsrSharpness(Rid viewport, float sharpness);

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.

Parameters
NameTypeDefault
viewportRid—
sharpnessfloat—
ViewportSetGlobalCanvasTransformvoid
# ViewportSetGlobalCanvasTransform
C#
public static void ViewportSetGlobalCanvasTransform(Rid viewport, Transform2D transform);

Sets the viewport's global transformation matrix.

Parameters
NameTypeDefault
viewportRid—
transformTransform2D—
ViewportSetMeasureRenderTimevoid
# ViewportSetMeasureRenderTime
C#
public static void ViewportSetMeasureRenderTime(Rid viewport, bool enable);

Sets the measurement for the given viewport RID (obtained using Viewport.GetViewportRid). Once enabled, RenderingServer.ViewportGetMeasuredRenderTimeCpu and RenderingServer.ViewportGetMeasuredRenderTimeGpu will return values greater than 0.0 when queried with the given viewport.

Parameters
NameTypeDefault
viewportRid—
enablebool—
ViewportSetMsaa2Dvoid
# ViewportSetMsaa2D
C#
public static void ViewportSetMsaa2D(Rid viewport, RenderingServer.ViewportMsaa msaa);

Sets the multisample antialiasing mode for 2D/Canvas on the specified viewport RID. Equivalent to ProjectSettings.rendering/anti_aliasing/quality/msaa_2d or Viewport.Msaa2D.

Parameters
NameTypeDefault
viewportRid—
msaaRenderingServer.ViewportMsaa—
ViewportSetMsaa3Dvoid
# ViewportSetMsaa3D
C#
public static void ViewportSetMsaa3D(Rid viewport, RenderingServer.ViewportMsaa msaa);

Sets the multisample antialiasing mode for 3D on the specified viewport RID. Equivalent to ProjectSettings.rendering/anti_aliasing/quality/msaa_3d or Viewport.Msaa3D.

Parameters
NameTypeDefault
viewportRid—
msaaRenderingServer.ViewportMsaa—
ViewportSetOcclusionCullingBuildQualityvoid
# ViewportSetOcclusionCullingBuildQuality
C#
public static void ViewportSetOcclusionCullingBuildQuality(RenderingServer.ViewportOcclusionCullingBuildQuality quality);

Sets the ProjectSettings.rendering/occlusion_culling/bvh_build_quality to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis.

Parameters
NameTypeDefault
qualityRenderingServer.ViewportOcclusionCullingBuildQuality—
ViewportSetOcclusionRaysPerThreadvoid
# ViewportSetOcclusionRaysPerThread
C#
public static void ViewportSetOcclusionRaysPerThread(int raysPerThread);

Sets the ProjectSettings.rendering/occlusion_culling/occlusion_rays_per_thread to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis.

Parameters
NameTypeDefault
raysPerThreadint—
ViewportSetParentViewportvoid
# ViewportSetParentViewport
C#
public static void ViewportSetParentViewport(Rid viewport, Rid parentViewport);

Sets the viewport's parent to the viewport specified by the parent_viewport RID.

Parameters
NameTypeDefault
viewportRid—
parentViewportRid—
ViewportSetPositionalShadowAtlasQuadrantSubdivisionvoid
# ViewportSetPositionalShadowAtlasQuadrantSubdivision
C#
public static void ViewportSetPositionalShadowAtlasQuadrantSubdivision(Rid viewport, int quadrant, int subdivision);

Sets the number of subdivisions to use in the specified shadow atlas quadrant for omni and spot shadows. See also Viewport.SetPositionalShadowAtlasQuadrantSubdiv.

Parameters
NameTypeDefault
viewportRid—
quadrantint—
subdivisionint—
ViewportSetPositionalShadowAtlasSizevoid
# ViewportSetPositionalShadowAtlasSize
C#
public static void ViewportSetPositionalShadowAtlasSize(Rid viewport, int size, bool use16Bits = false);

Sets the size of the shadow atlas's images (used for omni and spot lights) on the viewport specified by the viewport RID. The value is rounded up to the nearest power of 2. If use_16_bits is true, use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. Note: If this is set to 0, no positional shadows will be visible at all. This can improve performance significantly on low-end systems by reducing both the CPU and GPU load (as fewer draw calls are needed to draw the scene without shadows).

Parameters
NameTypeDefault
viewportRid—
sizeint—
use16Bitsboolfalse
ViewportSetRenderDirectToScreenvoid
# ViewportSetRenderDirectToScreen
C#
public static void ViewportSetRenderDirectToScreen(Rid viewport, bool enabled);

If true, 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 screen_texture. 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.

Parameters
NameTypeDefault
viewportRid—
enabledbool—
ViewportSetScaling3DModevoid
# ViewportSetScaling3DMode
C#
public static void ViewportSetScaling3DMode(Rid viewport, RenderingServer.ViewportScaling3DMode scaling3DMode);

Sets the 3D resolution scaling 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.

Parameters
NameTypeDefault
viewportRid—
scaling3DModeRenderingServer.ViewportScaling3DMode—
ViewportSetScaling3DScalevoid
# ViewportSetScaling3DScale
C#
public static void ViewportSetScaling3DScale(Rid viewport, float scale);

Scales the 3D render buffer based on the viewport size uses an image filter specified in RenderingServer.ViewportScaling3DMode to scale the output image to the full viewport size. Values lower than 1.0 can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than 1.0 are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also RenderingServer.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.

Parameters
NameTypeDefault
viewportRid—
scalefloat—
ViewportSetScenariovoid
# ViewportSetScenario
C#
public static void ViewportSetScenario(Rid viewport, Rid scenario);

Sets a viewport's scenario. The scenario contains information about environment information, reflection atlas, etc.

Parameters
NameTypeDefault
viewportRid—
scenarioRid—
ViewportSetScreenSpaceAAvoid
# ViewportSetScreenSpaceAA
C#
public static void ViewportSetScreenSpaceAA(Rid viewport, RenderingServer.ViewportScreenSpaceAA mode);

Sets the viewport's screen-space antialiasing mode. Equivalent to ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa or Viewport.ScreenSpaceAA.

Parameters
NameTypeDefault
viewportRid—
modeRenderingServer.ViewportScreenSpaceAA—
ViewportSetSdfOversizeAndScalevoid
# ViewportSetSdfOversizeAndScale
C#
public static void ViewportSetSdfOversizeAndScale(Rid viewport, RenderingServer.ViewportSdfOversize oversize, RenderingServer.ViewportSdfScale scale);

Sets the viewport's 2D signed distance field ProjectSettings.rendering/2d/sdf/oversize and ProjectSettings.rendering/2d/sdf/scale. This is used when sampling the signed distance field in CanvasItem shaders as well as GpuParticles2D collision. This is not used by SDFGI in 3D rendering.

Parameters
NameTypeDefault
viewportRid—
oversizeRenderingServer.ViewportSdfOversize—
scaleRenderingServer.ViewportSdfScale—
ViewportSetSize2 overloads
# ViewportSetSize · 1/2
C#
public static void ViewportSetSize(Rid viewport, int width, int height);

Sets the viewport's width and height in pixels. Optionally the view_count can be set to increase the number of view layers for stereo rendering.

Parameters
NameTypeDefault
viewportRid—
widthint—
heightint—
# ViewportSetSize · 2/2
C#
public static void ViewportSetSize(Rid viewport, int width, int height, int viewCount = 1);

Sets the viewport's width and height in pixels. Optionally the view_count can be set to increase the number of view layers for stereo rendering.

Parameters
NameTypeDefault
viewportRid—
widthint—
heightint—
viewCountint1
ViewportSetSnap2DTransformsToPixelvoid
# ViewportSetSnap2DTransformsToPixel
C#
public static void ViewportSetSnap2DTransformsToPixel(Rid viewport, bool enabled);

If true, canvas item transforms (i.e. origin position) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when Camera2D smoothing is enabled. Equivalent to ProjectSettings.rendering/2d/snap/snap_2d_transforms_to_pixel.

Parameters
NameTypeDefault
viewportRid—
enabledbool—
ViewportSetSnap2DVerticesToPixelvoid
# ViewportSetSnap2DVerticesToPixel
C#
public static void ViewportSetSnap2DVerticesToPixel(Rid viewport, bool enabled);

If true, canvas item vertices (i.e. polygon points) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when Camera2D smoothing is enabled. Equivalent to ProjectSettings.rendering/2d/snap/snap_2d_vertices_to_pixel.

Parameters
NameTypeDefault
viewportRid—
enabledbool—
ViewportSetTextureMipmapBiasvoid
# ViewportSetTextureMipmapBias
C#
public static void ViewportSetTextureMipmapBias(Rid viewport, float mipmapBias);

Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between -0.75 and 0.0. Enabling temporal antialiasing (ProjectSettings.rendering/anti_aliasing/quality/use_taa) can help reduce the graininess visible when using negative mipmap bias. Note: When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is -log2(1.0 / scale) + mipmap_bias. Note: This method is only supported in the Forward+ and Mobile renderers, not Compatibility. In Compatibility, this method is always treated as if mipmap_bias was set to 0.0.

Parameters
NameTypeDefault
viewportRid—
mipmapBiasfloat—
ViewportSetTransparentBackgroundvoid
# ViewportSetTransparentBackground
C#
public static void ViewportSetTransparentBackground(Rid viewport, bool enabled);

If true, the viewport renders its background as transparent.

Parameters
NameTypeDefault
viewportRid—
enabledbool—
ViewportSetUpdateModevoid
# ViewportSetUpdateMode
C#
public static void ViewportSetUpdateMode(Rid viewport, RenderingServer.ViewportUpdateMode updateMode);

Sets when the viewport should be updated.

Parameters
NameTypeDefault
viewportRid—
updateModeRenderingServer.ViewportUpdateMode—
ViewportSetUseDebandingvoid
# ViewportSetUseDebanding
C#
public static void ViewportSetUseDebanding(Rid viewport, bool enable);

Equivalent to Viewport.UseDebanding. See also ProjectSettings.rendering/anti_aliasing/quality/use_debanding.

Parameters
NameTypeDefault
viewportRid—
enablebool—
ViewportSetUseHdr2Dvoid
# ViewportSetUseHdr2D
C#
public static void ViewportSetUseHdr2D(Rid viewport, bool enabled);

If true, 2D rendering will use a high dynamic range (HDR) RGBA16 format framebuffer. Additionally, 2D rendering will be performed on linear values and will be converted using the appropriate transfer function immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped to the 0-1 range and can be used in 3D rendering without color encoding adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as Viewport.UseHdr2D.

Parameters
NameTypeDefault
viewportRid—
enabledbool—
ViewportSetUseOcclusionCullingvoid
# ViewportSetUseOcclusionCulling
C#
public static void ViewportSetUseOcclusionCulling(Rid viewport, bool enable);

If true, enables occlusion culling on the specified viewport. Equivalent to ProjectSettings.rendering/occlusion_culling/use_occlusion_culling.

Parameters
NameTypeDefault
viewportRid—
enablebool—
ViewportSetUseTaavoid
# ViewportSetUseTaa
C#
public static void ViewportSetUseTaa(Rid viewport, bool enable);

If true, use temporal antialiasing. Equivalent to ProjectSettings.rendering/anti_aliasing/quality/use_taa or Viewport.UseTaa.

Parameters
NameTypeDefault
viewportRid—
enablebool—
ViewportSetUseXRvoid
# ViewportSetUseXR
C#
public static void ViewportSetUseXR(Rid viewport, bool useXR);

If true, the viewport uses augmented or virtual reality technologies. See XRInterface.

Parameters
NameTypeDefault
viewportRid—
useXRbool—
ViewportSetVrsModevoid
# ViewportSetVrsMode
C#
public static void ViewportSetVrsMode(Rid viewport, RenderingServer.ViewportVrsMode mode);

Sets the Variable Rate Shading (VRS) mode for the viewport. If the GPU does not support VRS, this property is ignored. Equivalent to ProjectSettings.rendering/vrs/mode.

Parameters
NameTypeDefault
viewportRid—
modeRenderingServer.ViewportVrsMode—
ViewportSetVrsTexturevoid
# ViewportSetVrsTexture
C#
public static void ViewportSetVrsTexture(Rid viewport, Rid texture);

The texture to use when the VRS mode is set to RenderingServer.ViewportVrsMode.Texture. Equivalent to ProjectSettings.rendering/vrs/texture.

Parameters
NameTypeDefault
viewportRid—
textureRid—
ViewportSetVrsUpdateModevoid
# ViewportSetVrsUpdateMode
C#
public static void ViewportSetVrsUpdateMode(Rid viewport, RenderingServer.ViewportVrsUpdateMode mode);

Sets the update mode for Variable Rate Shading (VRS) for the viewport. VRS requires the input texture to be converted to the format usable by the VRS method supported by the hardware. The update mode defines how often this happens. If the GPU does not support VRS, or VRS is not enabled, this property is ignored. If set to RenderingServer.ViewportVrsUpdateMode.Once, the input texture is copied once and the mode is changed to RenderingServer.ViewportVrsUpdateMode.Disabled.

Parameters
NameTypeDefault
viewportRid—
modeRenderingServer.ViewportVrsUpdateMode—
VisibilityNotifierCreateRid
# VisibilityNotifierCreate
C#
public static Rid VisibilityNotifierCreate();

Creates a new 3D visibility notifier object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all visibility_notifier_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. To place in a scene, attach this notifier to an instance using RenderingServer.InstanceSetBase using the returned RID. Note: The equivalent node is VisibleOnScreenNotifier3D.

Returns Rid
VisibilityNotifierSetAabbvoid
# VisibilityNotifierSetAabb
C#
public static void VisibilityNotifierSetAabb(Rid notifier, Aabb aabb);

Sets the AABB of the specified visibility notifier.

Parameters
NameTypeDefault
notifierRid—
aabbAabb—
VisibilityNotifierSetCallbacksvoid
# VisibilityNotifierSetCallbacks
C#
public static void VisibilityNotifierSetCallbacks(Rid notifier, Callable enterCallable, Callable exitCallable);

Sets the methods to be called when the notifier enters or exits the view.

Parameters
NameTypeDefault
notifierRid—
enterCallableCallable—
exitCallableCallable—
VoxelGIAllocateData2 overloads
# VoxelGIAllocateData · 1/2
C#
public static void VoxelGIAllocateData(Rid voxelGI, Transform3D toCellXform, Aabb aabb, Vector3I octreeSize, byte[] octreeCells, byte[] dataCells, byte[] distanceField, int[] levelCounts);

Allocates and initializes the voxel GI data for the specified voxel_gi RID. octree_cells must be a multiple of 32. octree_cells must be double the size of data_cells. The allocated data can be retrieved later using the various voxel_gi_get_* methods.

Parameters
NameTypeDefault
voxelGIRid—
toCellXformTransform3D—
aabbAabb—
octreeSizeVector3I—
octreeCellsbyte[]—
dataCellsbyte[]—
distanceFieldbyte[]—
levelCountsint[]—
# VoxelGIAllocateData · 2/2
C#
public static void VoxelGIAllocateData(Rid voxelGI, Transform3D toCellXform, Aabb aabb, Vector3I octreeSize, ReadOnlySpan<byte> octreeCells, ReadOnlySpan<byte> dataCells, ReadOnlySpan<byte> distanceField, ReadOnlySpan<int> levelCounts);

Allocates and initializes the voxel GI data for the specified voxel_gi RID. octree_cells must be a multiple of 32. octree_cells must be double the size of data_cells. The allocated data can be retrieved later using the various voxel_gi_get_* methods.

Parameters
NameTypeDefault
voxelGIRid—
toCellXformTransform3D—
aabbAabb—
octreeSizeVector3I—
octreeCellsReadOnlySpan<byte>—
dataCellsReadOnlySpan<byte>—
distanceFieldReadOnlySpan<byte>—
levelCountsReadOnlySpan<int>—
VoxelGICreateRid
# VoxelGICreate
C#
public static Rid VoxelGICreate();

Creates a new voxel-based global illumination object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all voxel_gi_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's RenderingServer.FreeRid method. Note: The equivalent node is VoxelGI.

Returns Rid
VoxelGIGetDataCellsbyte[]
# VoxelGIGetDataCells
C#
public static byte[] VoxelGIGetDataCells(Rid voxelGI);

Returns the data cells for the specified voxel GI data instance. See also RenderingServer.VoxelGIAllocateData.

Parameters
NameTypeDefault
voxelGIRid—
Returns byte[]
VoxelGIGetDistanceFieldbyte[]
# VoxelGIGetDistanceField
C#
public static byte[] VoxelGIGetDistanceField(Rid voxelGI);

Returns the distance field data for the specified voxel GI data instance. See also RenderingServer.VoxelGIAllocateData.

Parameters
NameTypeDefault
voxelGIRid—
Returns byte[]
VoxelGIGetLevelCountsint[]
# VoxelGIGetLevelCounts
C#
public static int[] VoxelGIGetLevelCounts(Rid voxelGI);

Returns the level counts for the specified voxel GI data instance. See also RenderingServer.VoxelGIAllocateData.

Parameters
NameTypeDefault
voxelGIRid—
Returns int[]
VoxelGIGetOctreeCellsbyte[]
# VoxelGIGetOctreeCells
C#
public static byte[] VoxelGIGetOctreeCells(Rid voxelGI);

Returns the octree cell data for the specified voxel GI data instance. See also RenderingServer.VoxelGIAllocateData.

Parameters
NameTypeDefault
voxelGIRid—
Returns byte[]
VoxelGIGetOctreeSizeVector3I
# VoxelGIGetOctreeSize
C#
public static Vector3I VoxelGIGetOctreeSize(Rid voxelGI);

Returns the octree size for the specified voxel GI data instance, which corresponds to the number of subdivisions per axis. This can be viewed in the editor by hovering the Bake VoxelGI button at the top of the 3D editor viewport when a VoxelGI node is selected and looking at the Subdivisions field in the tooltip.

Parameters
NameTypeDefault
voxelGIRid—
Returns Vector3I
VoxelGIGetToCellXformTransform3D
# VoxelGIGetToCellXform
C#
public static Transform3D VoxelGIGetToCellXform(Rid voxelGI);

Returns the transform to cell space for the specified voxel GI data instance. See also RenderingServer.VoxelGIAllocateData.

Parameters
NameTypeDefault
voxelGIRid—
Returns Transform3D
VoxelGISetBakedExposureNormalizationvoid
# VoxelGISetBakedExposureNormalization
C#
public static void VoxelGISetBakedExposureNormalization(Rid voxelGI, float bakedExposure);

Used to inform the renderer what exposure normalization value was used while baking the voxel gi. This value will be used and modulated at run time to ensure that the voxel gi maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see RenderingServer.CameraAttributesSetExposure.

Parameters
NameTypeDefault
voxelGIRid—
bakedExposurefloat—
VoxelGISetBiasvoid
# VoxelGISetBias
C#
public static void VoxelGISetBias(Rid voxelGI, float bias);

Sets the VoxelGIData.Bias value to use on the specified voxel_gi's Rid.

Parameters
NameTypeDefault
voxelGIRid—
biasfloat—
VoxelGISetDynamicRangevoid
# VoxelGISetDynamicRange
C#
public static void VoxelGISetDynamicRange(Rid voxelGI, float range);

Sets the VoxelGIData.DynamicRange value to use on the specified voxel_gi's Rid.

Parameters
NameTypeDefault
voxelGIRid—
rangefloat—
VoxelGISetEnergyvoid
# VoxelGISetEnergy
C#
public static void VoxelGISetEnergy(Rid voxelGI, float energy);

Sets the VoxelGIData.Energy value to use on the specified voxel_gi's Rid.

Parameters
NameTypeDefault
voxelGIRid—
energyfloat—
VoxelGISetInteriorvoid
# VoxelGISetInterior
C#
public static void VoxelGISetInterior(Rid voxelGI, bool enable);

Sets the VoxelGIData.Interior value to use on the specified voxel_gi's Rid.

Parameters
NameTypeDefault
voxelGIRid—
enablebool—
VoxelGISetNormalBiasvoid
# VoxelGISetNormalBias
C#
public static void VoxelGISetNormalBias(Rid voxelGI, float bias);

Sets the VoxelGIData.NormalBias value to use on the specified voxel_gi's Rid.

Parameters
NameTypeDefault
voxelGIRid—
biasfloat—
VoxelGISetPropagationvoid
# VoxelGISetPropagation
C#
public static void VoxelGISetPropagation(Rid voxelGI, float amount);

Sets the VoxelGIData.Propagation value to use on the specified voxel_gi's Rid.

Parameters
NameTypeDefault
voxelGIRid—
amountfloat—
VoxelGISetQualityvoid
# VoxelGISetQuality
C#
public static void VoxelGISetQuality(RenderingServer.VoxelGIQuality quality);

Sets the ProjectSettings.rendering/global_illumination/voxel_gi/quality value to use when rendering. This parameter is global and cannot be set on a per-VoxelGI basis.

Parameters
NameTypeDefault
qualityRenderingServer.VoxelGIQuality—
VoxelGISetUseTwoBouncesvoid
# VoxelGISetUseTwoBounces
C#
public static void VoxelGISetUseTwoBounces(Rid voxelGI, bool enable);

Sets the VoxelGIData.UseTwoBounces value to use on the specified voxel_gi's Rid.

Parameters
NameTypeDefault
voxelGIRid—
enablebool—

Signals and events2

FramePostDrawEvent
# FramePostDraw
C#
public static event Action FramePostDraw;

Emitted at the end of the frame, after the RenderingServer has finished updating all the Viewports.

FramePreDrawEvent
# FramePreDraw
C#
public static event Action FramePreDraw;

Emitted at the beginning of the frame, before the RenderingServer updates all the Viewports.

Fields and constants18

ArrayCustomCountField
# ArrayCustomCount
C#
public const long ArrayCustomCount = 4;

The number of custom data arrays available (RenderingServer.ArrayType.Custom0, RenderingServer.ArrayType.Custom1, RenderingServer.ArrayType.Custom2, RenderingServer.ArrayType.Custom3).

ArrayWeightsSizeField
# ArrayWeightsSize
C#
public const long ArrayWeightsSize = 4;

Number of weights/bones per vertex.

CanvasItemZMaxField
# CanvasItemZMax
C#
public const long CanvasItemZMax = 4096;

The maximum Z-layer for canvas items.

CanvasItemZMinField
# CanvasItemZMin
C#
public const long CanvasItemZMin = -4096;

The minimum Z-layer for canvas items.

CanvasLayerMaxField
# CanvasLayerMax
C#
public const long CanvasLayerMax = 2147483647;

The maximum canvas layer.

CanvasLayerMinField
# CanvasLayerMin
C#
public const long CanvasLayerMin = -2147483648;

The minimum canvas layer.

MaterialRenderPriorityMaxField
# MaterialRenderPriorityMax
C#
public const long MaterialRenderPriorityMax = 127;

The maximum renderpriority of all materials.

MaterialRenderPriorityMinField
# MaterialRenderPriorityMin
C#
public const long MaterialRenderPriorityMin = -128;

The minimum renderpriority of all materials.

Max2DDirectionalLightsField
# Max2DDirectionalLights
C#
public const long Max2DDirectionalLights = 8;

The maximum number of directional lights that can be rendered at a given time in 2D.

MaxCursorsField · Deprecated
# MaxCursors
C#
public const long MaxCursors = 8;
MaxGlowLevelsField
# MaxGlowLevels
C#
public const long MaxGlowLevels = 7;

The maximum number of glow levels that can be used with the glow post-processing effect.

MaxMeshSurfacesField
# MaxMeshSurfaces
C#
public const long MaxMeshSurfaces = 256;

The maximum number of surfaces a mesh can have.

NoIndexArrayField
# NoIndexArray
C#
public const long NoIndexArray = -1;

Marks an error that shows that the index array is empty.

ParticlesEmitFlagColorField
# ParticlesEmitFlagColor
C#
public const long ParticlesEmitFlagColor = 8;

Particle starts with specified color.

ParticlesEmitFlagCustomField
# ParticlesEmitFlagCustom
C#
public const long ParticlesEmitFlagCustom = 16;

Particle starts with specified CUSTOM data.

ParticlesEmitFlagPositionField
# ParticlesEmitFlagPosition
C#
public const long ParticlesEmitFlagPosition = 1;

Particle starts at the specified position.

ParticlesEmitFlagRotationScaleField
# ParticlesEmitFlagRotationScale
C#
public const long ParticlesEmitFlagRotationScale = 2;

Particle starts with specified rotation and scale.

ParticlesEmitFlagVelocityField
# ParticlesEmitFlagVelocity
C#
public const long ParticlesEmitFlagVelocity = 4;

Particle starts with the specified velocity vector, which defines the emission direction and speed.

RenderingServer.ArrayCustomFormat

ValueDescription
Max = 8

Represents the size of the RenderingServer.ArrayCustomFormat enum.

RFloat = 4

Custom data array contains 32-bit-per-channel red color data. Values are floating-point in single precision.

RgFloat = 5

Custom data array contains 32-bit-per-channel red/green color data. Values are floating-point in single precision.

RgHalf = 2

Custom data array contains 16-bit-per-channel red/green color data. Values are floating-point in half precision.

RgbFloat = 6

Custom data array contains 32-bit-per-channel red/green/blue color data. Values are floating-point in single precision.

Rgba8Snorm = 1

Custom data array contains 8-bit-per-channel red/green/blue/alpha color data. Values are normalized, signed floating-point in the [-1.0, 1.0] range.

Rgba8Unorm = 0

Custom data array contains 8-bit-per-channel red/green/blue/alpha color data. Values are normalized, unsigned floating-point in the [0.0, 1.0] range.

RgbaFloat = 7

Custom data array contains 32-bit-per-channel red/green/blue/alpha color data. Values are floating-point in single precision.

RgbaHalf = 3

Custom data array contains 16-bit-per-channel red/green/blue/alpha color data. Values are floating-point in half precision.

RenderingServer.ArrayFormat

ValueDescription
CompressFlagsBase = 25

Shift of first compress flag. Compress flags should be passed to ArrayMesh.AddSurfaceFromArrays and SurfaceTool.Commit.

FlagCompressAttributes = 536870912

Flag used to mark that a mesh is using compressed attributes (vertices, normals, tangents, UVs). When this form of compression is enabled, vertex positions will be packed into an RGBA16UNORM attribute and scaled in the vertex shader. The normal and tangent will be packed into an RG16UNORM representing an axis, and a 16-bit float stored in the A-channel of the vertex. UVs will use 16-bit normalized floats instead of full 32-bit signed floats. When using this compression mode you must use either vertices, normals, and tangents or only vertices. You cannot use normals without tangents. Importers will automatically enable this compression if they can.

FlagFormatCurrentVersion = 34359738368

Flag used to record the current version that the engine expects. Currently this is the same as RenderingServer.ArrayFormat.FlagFormatVersion2.

FlagFormatVersion1 = 0

Flag used to record the format used by prior mesh versions before the introduction of a version.

FlagFormatVersion2 = 34359738368

Flag used to record the second iteration of the mesh version flag. The primary difference between this and RenderingServer.ArrayFormat.FlagFormatVersion1 is that this version supports RenderingServer.ArrayFormat.FlagCompressAttributes and in this version vertex positions are de-interleaved from normals and tangents.

FlagFormatVersionBase = 35

Flag used to mark the start of the bits used to store the mesh version.

FlagFormatVersionMask = 255

Flag used to isolate the bits used for mesh version after using RenderingServer.ArrayFormat.FlagFormatVersionShift to shift them into place.

FlagFormatVersionShift = 35

Flag used to shift a mesh format int to bring the version into the lowest digits.

FlagUse2DVertices = 33554432

Flag used to mark that the array contains 2D vertices.

FlagUse8BoneWeights = 134217728

Flag used to mark that the array uses 8 bone weights instead of 4.

FlagUseDynamicUpdate = 67108864

Flag used to mark that the mesh data will use GL_DYNAMIC_DRAW on GLES. Unused on Vulkan.

FlagUseStorageBuffer = 1073741824

Flag used to mark that the surface's vertex, attribute, skin, and index buffers must be created with the storage-buffer usage bit so they can be bound as storage buffers in compute shaders. This is required to write into them from a compute pipeline through the Rids returned by RenderingServer.MeshSurfaceGetVertexBufferRdRid and the matching methods for the attribute, skin, and index buffers. Has no effect on the OpenGL backend, which does not expose RenderingDevice Rids.

FlagUsesEmptyVertexArray = 268435456

Flag used to mark that the mesh does not have a vertex array and instead will infer vertex positions in the shader using indices and other information.

FormatBlendShapeMask = 7

Mask of mesh channels permitted in blend shapes.

FormatBones = 1024

Flag used to mark a bone information array.

FormatColor = 8

Flag used to mark a vertex color array.

FormatCustom0 = 64

Flag used to mark an array of custom per-vertex data for the first set of custom data.

FormatCustom0Shift = 13

Amount to shift RenderingServer.ArrayCustomFormat for custom channel index 0.

FormatCustom1 = 128

Flag used to mark an array of custom per-vertex data for the second set of custom data.

FormatCustom1Shift = 16

Amount to shift RenderingServer.ArrayCustomFormat for custom channel index 1.

FormatCustom2 = 256

Flag used to mark an array of custom per-vertex data for the third set of custom data.

FormatCustom2Shift = 19

Amount to shift RenderingServer.ArrayCustomFormat for custom channel index 2.

FormatCustom3 = 512

Flag used to mark an array of custom per-vertex data for the fourth set of custom data.

FormatCustom3Shift = 22

Amount to shift RenderingServer.ArrayCustomFormat for custom channel index 3.

FormatCustomBase = 13

Shift of first custom channel.

FormatCustomBits = 3

Number of format bits per custom channel. See RenderingServer.ArrayCustomFormat.

FormatCustomMask = 7

Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See RenderingServer.ArrayCustomFormat.

FormatIndex = 4096

Flag used to mark an index array.

FormatNormal = 2

Flag used to mark a normal array.

FormatTangent = 4

Flag used to mark a tangent array.

FormatTexUV = 16

Flag used to mark a UV coordinates array.

FormatTexUV2 = 32

Flag used to mark a UV coordinates array for the second UV coordinates.

FormatVertex = 1

Flag used to mark a vertex position array.

FormatWeights = 2048

Flag used to mark a weights array.

RenderingServer.ArrayType

ValueDescription
Bones = 10

Array contains bone information.

Color = 3

Array is a vertex color array.

Custom0 = 6

Array is a custom data array for the first set of custom data.

Custom1 = 7

Array is a custom data array for the second set of custom data.

Custom2 = 8

Array is a custom data array for the third set of custom data.

Custom3 = 9

Array is a custom data array for the fourth set of custom data.

Index = 12

Array is an index array.

Max = 13

Represents the size of the RenderingServer.ArrayType enum.

Normal = 1

Array is a normal array.

Tangent = 2

Array is a tangent array.

TexUV = 4

Array is a UV coordinates array.

TexUV2 = 5

Array is a UV coordinates array for the second set of UV coordinates.

Vertex = 0

Array is a vertex position array.

Weights = 11

Array is weight information.

RenderingServer.BakeChannels

ValueDescription
AlbedoAlpha = 0

Index of Image in array of Images returned by RenderingServer.BakeRenderUV2. Image uses Image.Format.Rgba8 and contains albedo color in the .rgb channels and alpha in the .a channel.

Emission = 3

Index of Image in array of Images returned by RenderingServer.BakeRenderUV2. Image uses Image.Format.Rgbah and contains emission color in the .rgb channels and nothing in the .a channel.

Normal = 1

Index of Image in array of Images returned by RenderingServer.BakeRenderUV2. Image uses Image.Format.Rgba8 and contains the per-pixel normal of the object in the .rgb channels and nothing in the .a channel. The per-pixel normal is encoded as normal * 0.5 + 0.5.

Orm = 2

Index of Image in array of Images returned by RenderingServer.BakeRenderUV2. Image uses Image.Format.Rgba8 and contains ambient occlusion (from material and decals only) in the .r channel, roughness in the .g channel, metallic in the .b channel and sub surface scattering amount in the .a channel.

RenderingServer.BlendShapeMode

ValueDescription
Normalized = 0

Blend shapes are normalized.

Relative = 1

Blend shapes are relative to base weight.

RenderingServer.CanvasGroupMode

ValueDescription
ClipAndDraw = 2

Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area.

ClipOnly = 1

Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn.

Disabled = 0

Child draws over parent and is not clipped.

Transparent = 3

RenderingServer.CanvasItemTextureFilter

ValueDescription
Default = 0

Uses the default filter mode for this Viewport.

Linear = 2

The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).

LinearWithMipmaps = 4

The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true). This makes the texture look smooth from up close, and smooth from a distance. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to Camera2D zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.

LinearWithMipmapsAnisotropic = 6

The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level. Note: This texture filter is rarely useful in 2D projects. RenderingServer.CanvasItemTextureFilter.LinearWithMipmaps is usually more appropriate in this case.

Max = 7

Max value for RenderingServer.CanvasItemTextureFilter enum.

Nearest = 1

The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).

NearestWithMipmaps = 3

The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true). This makes the texture look pixelated from up close, and smooth from a distance. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to Camera2D zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.

NearestWithMipmapsAnisotropic = 5

The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level. Note: This texture filter is rarely useful in 2D projects. RenderingServer.CanvasItemTextureFilter.NearestWithMipmaps is usually more appropriate in this case.

RenderingServer.CanvasItemTextureRepeat

ValueDescription
Default = 0

Uses the default repeat mode for this Viewport.

Disabled = 1

Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture.

Enabled = 2

Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture.

Max = 4

Max value for RenderingServer.CanvasItemTextureRepeat enum.

Mirror = 3

Flip the texture when repeating so that the edge lines up instead of abruptly changing.

RenderingServer.CanvasLightBlendMode

ValueDescription
Add = 0

Adds light color additive to the canvas.

Mix = 2

The light adds color depending on transparency.

Sub = 1

Adds light color subtractive to the canvas.

RenderingServer.CanvasLightMode

ValueDescription
Directional = 1

2D directional (sun/moon) light (see DirectionalLight2D).

Point = 0

2D point light (see PointLight2D).

RenderingServer.CanvasLightShadowFilter

ValueDescription
Max = 3

Max value of the RenderingServer.CanvasLightShadowFilter enum.

None = 0

Do not apply a filter to canvas light shadows.

Pcf13 = 2

Use PCF13 filtering to filter canvas light shadows.

Pcf5 = 1

Use PCF5 filtering to filter canvas light shadows.

RenderingServer.CanvasOccluderPolygonCullMode

ValueDescription
Clockwise = 1

Culling of the canvas occluder is clockwise.

CounterClockwise = 2

Culling of the canvas occluder is counterclockwise.

Disabled = 0

Culling of the canvas occluder is disabled.

RenderingServer.CanvasTextureChannel

ValueDescription
Diffuse = 0

Diffuse canvas texture (CanvasTexture.DiffuseTexture).

Normal = 1

Normal map canvas texture (CanvasTexture.NormalTexture).

Specular = 2

Specular map canvas texture (CanvasTexture.SpecularTexture).

RenderingServer.CompositorEffectCallbackType

ValueDescription
Any = -1
PostOpaque = 1

The callback is called after our opaque rendering pass, but before our sky is rendered.

PostSky = 2

The callback is called after our sky is rendered, but before our back buffers are created (and if enabled, before subsurface scattering and/or screen space reflections).

PostTransparent = 4

The callback is called after our transparent rendering pass, but before any built-in post-processing effects and output to our render target.

PreOpaque = 0

The callback is called before our opaque rendering pass, but after depth prepass (if applicable).

PreTransparent = 3

The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers.

RenderingServer.CompositorEffectFlags

ValueDescription
AccessResolvedColor = 1

The rendering effect requires the color buffer to be resolved if MSAA is enabled.

AccessResolvedDepth = 2

The rendering effect requires the depth buffer to be resolved if MSAA is enabled.

NeedsMotionVectors = 4

The rendering effect requires motion vectors to be produced.

NeedsRoughness = 8

The rendering effect requires normals and roughness g-buffer to be produced (Forward+ only).

NeedsSeparateSpecular = 16

The rendering effect requires specular data to be separated out (Forward+ only).

RenderingServer.CubeMapLayer

ValueDescription
Back = 5

Back face of a Cubemap.

Bottom = 2

Bottom face of a Cubemap.

Front = 4

Front face of a Cubemap.

Left = 0

Left face of a Cubemap.

Right = 1

Right face of a Cubemap.

Top = 3

Top face of a Cubemap.

RenderingServer.DecalFilter

ValueDescription
Linear = 1

Linear filter for decals (use for non-pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps.

LinearMipmaps = 3

Linear filter for decals (use for non-pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.

LinearMipmapsAnisotropic = 5

Linear filter for decals (use for non-pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.

Nearest = 0

Nearest-neighbor filter for decals (use for pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps.

NearestMipmaps = 2

Nearest-neighbor filter for decals (use for pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.

NearestMipmapsAnisotropic = 4

Nearest-neighbor filter for decals (use for pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.

RenderingServer.DecalTexture

ValueDescription
Albedo = 0

Albedo texture slot in a decal (Decal.TextureAlbedo).

Emission = 3

Emission texture slot in a decal (Decal.TextureEmission).

Max = 4

Represents the size of the RenderingServer.DecalTexture enum.

Normal = 1

Normal map texture slot in a decal (Decal.TextureNormal).

Orm = 2

Occlusion/Roughness/Metallic texture slot in a decal (Decal.TextureOrm).

RenderingServer.DofBlurQuality

ValueDescription
High = 3

Highest quality DOF blur. Results in the smoothest looking blur by taking the most samples, but is also significantly slower.

Low = 1

Low quality DOF blur.

Medium = 2

Medium quality DOF blur.

VeryLow = 0

Lowest quality DOF blur. This is the fastest setting, but you may be able to see filtering artifacts.

RenderingServer.DofBokehShape

ValueDescription
Box = 0

Calculate the DOF blur using a box filter. The fastest option, but results in obvious lines in blur pattern.

Circle = 2

Calculates DOF blur using a circle shaped filter. Best quality and most realistic, but slowest. Use only for areas where a lot of performance can be dedicated to post-processing (e.g. cutscenes).

Hexagon = 1

Calculates DOF blur using a hexagon shaped filter.

RenderingServer.EnvironmentAmbientSource

ValueDescription
Bg = 0

Gather ambient light from whichever source is specified as the background.

Color = 2

Specify a specific Color for ambient light.

Disabled = 1

Disable ambient light.

Sky = 3

Gather ambient light from the Sky regardless of what the background is.

RenderingServer.EnvironmentBG

ValueDescription
CameraFeed = 5

Displays a camera feed in the background.

Canvas = 3

Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world.

ClearColor = 0

Use the clear color as background.

Color = 1

Use a specified color as the background.

Keep = 4

Do not clear the background, use whatever was rendered last frame as the background.

Max = 6

Represents the size of the RenderingServer.EnvironmentBG enum.

Sky = 2

Use a sky resource for the background.

RenderingServer.EnvironmentFogMode

ValueDescription
Depth = 1

Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control.

Exponential = 0

Use a physically-based fog model defined primarily by fog density.

RenderingServer.EnvironmentGlowBlendMode

ValueDescription
Additive = 0

Adds the glow effect to the scene.

Mix = 4

Mixes the glow image with the scene image. Best used with Environment.GlowBloom to avoid darkening the scene.

Replace = 3

Replaces all pixels' color by the glow effect. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness or to preview glow configuration in the editor.

Screen = 1

Adds the glow effect to the scene after modifying the glow influence based on the scene value; dark values will be highly influenced by glow and bright values will not be influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. Environment.TonemapWhite is used to determine the maximum scene value where the glow should have no influence. When Environment.TonemapMode is set to Environment.TONE_MAPPER_LINEAR and Viewport.UseHdr2D is true, the parent window's Window.GetOutputMaxLinearValue will be used as the maximum scene value.

Softlight = 2

Adds the glow effect to the tonemapped image after modifying the glow influence based on the image value; dark values and bright values will not be influenced by glow and mid-range values will be highly influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. The glow will have the largest influence on image values of 0.25 and will have no influence when applied to image values greater than 1.0. Note: This blend mode does not support HDR output because expects a maximum output value of 1.0. It is recommended to use a different blend mode when rendering to an HDR screen.

RenderingServer.EnvironmentReflectionSource

ValueDescription
Bg = 0

Use the background for reflections.

Disabled = 1

Disable reflections.

Sky = 2

Use the Sky for reflections regardless of what the background is.

RenderingServer.EnvironmentSdfgiFramesToConverge

ValueDescription
In10Frames = 1

Configure SDFGI to fully converge over 10 frames.

In15Frames = 2

Configure SDFGI to fully converge over 15 frames.

In20Frames = 3

Configure SDFGI to fully converge over 20 frames.

In25Frames = 4

Configure SDFGI to fully converge over 25 frames.

In30Frames = 5

Configure SDFGI to fully converge over 30 frames. This is the least responsive, but creates the least noisy result with a given ray count.

In5Frames = 0

Converge SDFGI over 5 frames. This is the most responsive, but creates the most noisy result with a given ray count.

Max = 6

Represents the size of the RenderingServer.EnvironmentSdfgiFramesToConverge enum.

RenderingServer.EnvironmentSdfgiFramesToUpdateLight

ValueDescription
In16Frames = 4

Update indirect light from dynamic lights in SDFGI over 16 frames. This is the least responsive, but has the lowest GPU requirements.

In1Frame = 0

Update indirect light from dynamic lights in SDFGI over 1 frame. This is the most responsive, but has the highest GPU requirements.

In2Frames = 1

Update indirect light from dynamic lights in SDFGI over 2 frames.

In4Frames = 2

Update indirect light from dynamic lights in SDFGI over 4 frames.

In8Frames = 3

Update indirect light from dynamic lights in SDFGI over 8 frames.

Max = 5

Represents the size of the RenderingServer.EnvironmentSdfgiFramesToUpdateLight enum.

RenderingServer.EnvironmentSdfgiRayCount

ValueDescription
Count128 = 6

Throw 128 rays per frame when converging SDFGI. This has very high GPU requirements, but creates the least noisy result.

Count16 = 2

Throw 16 rays per frame when converging SDFGI.

Count32 = 3

Throw 32 rays per frame when converging SDFGI.

Count4 = 0

Throw 4 rays per frame when converging SDFGI. This has the lowest GPU requirements, but creates the most noisy result.

Count64 = 4

Throw 64 rays per frame when converging SDFGI.

Count8 = 1

Throw 8 rays per frame when converging SDFGI.

Count96 = 5

Throw 96 rays per frame when converging SDFGI. This has high GPU requirements.

Max = 7

Represents the size of the RenderingServer.EnvironmentSdfgiRayCount enum.

RenderingServer.EnvironmentSdfgiyScale

ValueDescription
Scale100Percent = 2

Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings.

Scale50Percent = 0

Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality.

Scale75Percent = 1

Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales.

RenderingServer.EnvironmentSsaoQuality

ValueDescription
High = 3

High quality screen-space ambient occlusion.

Low = 1

Low quality screen-space ambient occlusion.

Medium = 2

Medium quality screen-space ambient occlusion.

Ultra = 4

Highest quality screen-space ambient occlusion. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.

VeryLow = 0

Lowest quality of screen-space ambient occlusion.

RenderingServer.EnvironmentSsilQuality

ValueDescription
High = 3

High quality screen-space indirect lighting.

Low = 1

Low quality screen-space indirect lighting.

Medium = 2

High quality screen-space indirect lighting.

Ultra = 4

Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.

VeryLow = 0

Lowest quality of screen-space indirect lighting.

RenderingServer.EnvironmentSsrRoughnessQuality

ValueDescription
Disabled = 0

Lowest quality of roughness filter for screen-space reflections. Rough materials will not have blurrier screen-space reflections compared to smooth (non-rough) materials. This is the fastest option.

High = 3

High quality of roughness filter for screen-space reflections. This is the slowest option.

Low = 1

Low quality of roughness filter for screen-space reflections.

Medium = 2

Medium quality of roughness filter for screen-space reflections.

RenderingServer.EnvironmentToneMapper

ValueDescription
Aces = 3

Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than RenderingServer.EnvironmentToneMapper.Filmic. Note: This tonemapping operator is called "ACES Fitted" in Reckfell.x. Note: This tonemapper does not support HDR output because it produces output in the SDR range. It is recommended to use a different tonemapper when rendering to an HDR screen.

Agx = 4

Uses an adjustable film-like tonemapping curve and desaturates bright values for a more realistic appearance. Better than other tonemappers at maintaining the hue of colors as they become brighter. The slowest tonemapping option.

Filmic = 2

Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than RenderingServer.EnvironmentToneMapper.Reinhard. Slightly slower than RenderingServer.EnvironmentToneMapper.Reinhard. Note: This tonemapper does not support HDR output because it produces output in the SDR range. It is recommended to use a different tonemapper when rendering to an HDR screen.

Linear = 0

Does not modify color data, resulting in a linear tonemapping curve which unnaturally clips bright values, causing bright lighting to look blown out. The simplest and fastest tonemapper.

Reinhard = 1

A simple tonemapping curve that rolls off bright values to prevent clipping. This results in an image that can appear dull and low contrast. Slower than RenderingServer.EnvironmentToneMapper.Linear. Note: When Environment.TonemapWhite is left at the default value of 1.0, RenderingServer.EnvironmentToneMapper.Reinhard produces an identical image to RenderingServer.EnvironmentToneMapper.Linear.

RenderingServer.Features

ValueDescription
Multithreaded = 1
Shaders = 0

RenderingServer.FogVolumeShape

ValueDescription
Box = 3

FogVolume will be shaped like a box.

Cone = 1

FogVolume will be shaped like a cone pointing upwards (in local coordinates). The cone's angle is set automatically to fill the size. The cone will be adjusted to fit within the size. Rotate the FogVolume node to reorient the cone. Non-uniform scaling via size is not supported (scale the FogVolume node instead).

Cylinder = 2

FogVolume will be shaped like an upright cylinder (in local coordinates). Rotate the FogVolume node to reorient the cylinder. The cylinder will be adjusted to fit within the size. Non-uniform scaling via size is not supported (scale the FogVolume node instead).

Ellipsoid = 0

FogVolume will be shaped like an ellipsoid (stretched sphere).

Max = 5

Represents the size of the RenderingServer.FogVolumeShape enum.

World = 4

FogVolume will have no shape, will cover the whole world and will not be culled.

RenderingServer.GlobalShaderParameterType

ValueDescription
Bool = 0

Boolean global shader parameter (global uniform bool ...).

Bvec2 = 1

2-dimensional boolean vector global shader parameter (global uniform bvec2 ...).

Bvec3 = 2

3-dimensional boolean vector global shader parameter (global uniform bvec3 ...).

Bvec4 = 3

4-dimensional boolean vector global shader parameter (global uniform bvec4 ...).

Color = 17

Color global shader parameter (global uniform vec4 ...). Equivalent to RenderingServer.GlobalShaderParameterType.Vec4 in shader code, but exposed as a Color in the editor UI.

Float = 13

Single-precision floating-point global shader parameter (global uniform float ...).

Int = 4

Integer global shader parameter (global uniform int ...).

Ivec2 = 5

2-dimensional integer vector global shader parameter (global uniform ivec2 ...).

Ivec3 = 6

3-dimensional integer vector global shader parameter (global uniform ivec3 ...).

Ivec4 = 7

4-dimensional integer vector global shader parameter (global uniform ivec4 ...).

Mat2 = 19

2×2 matrix global shader parameter (global uniform mat2 ...). Exposed as a int[] in the editor UI.

Mat3 = 20

3×3 matrix global shader parameter (global uniform mat3 ...). Exposed as a Basis in the editor UI.

Mat4 = 21

4×4 matrix global shader parameter (global uniform mat4 ...). Exposed as a Projection in the editor UI.

Max = 29

Represents the size of the RenderingServer.GlobalShaderParameterType enum.

Rect2 = 18

2-dimensional floating-point rectangle global shader parameter (global uniform vec4 ...). Equivalent to RenderingServer.GlobalShaderParameterType.Vec4 in shader code, but exposed as a Rect2 in the editor UI.

Rect2I = 8

2-dimensional integer rectangle global shader parameter (global uniform ivec4 ...). Equivalent to RenderingServer.GlobalShaderParameterType.Ivec4 in shader code, but exposed as a Rect2I in the editor UI.

Sampler2D = 24

2D sampler global shader parameter (global uniform sampler2D ...). Exposed as a Texture2D in the editor UI.

Sampler2Darray = 25

2D sampler array global shader parameter (global uniform sampler2DArray ...). Exposed as a Texture2DArray in the editor UI.

Sampler3D = 26

3D sampler global shader parameter (global uniform sampler3D ...). Exposed as a Texture3D in the editor UI.

Samplercube = 27

Cubemap sampler global shader parameter (global uniform samplerCube ...). Exposed as a Cubemap in the editor UI.

Samplerext = 28

External sampler global shader parameter (global uniform samplerExternalOES ...). Exposed as an ExternalTexture in the editor UI.

Transform = 23

3-dimensional transform global shader parameter (global uniform mat3x4 ...). Exposed as a Transform3D in the editor UI.

Transform2D = 22

2-dimensional transform global shader parameter (global uniform mat2x3 ...). Exposed as a Transform2D in the editor UI.

Uint = 9

Unsigned integer global shader parameter (global uniform uint ...).

Uvec2 = 10

2-dimensional unsigned integer vector global shader parameter (global uniform uvec2 ...).

Uvec3 = 11

3-dimensional unsigned integer vector global shader parameter (global uniform uvec3 ...).

Uvec4 = 12

4-dimensional unsigned integer vector global shader parameter (global uniform uvec4 ...).

Vec2 = 14

2-dimensional floating-point vector global shader parameter (global uniform vec2 ...).

Vec3 = 15

3-dimensional floating-point vector global shader parameter (global uniform vec3 ...).

Vec4 = 16

4-dimensional floating-point vector global shader parameter (global uniform vec4 ...).

RenderingServer.InstanceFlags

ValueDescription
DrawNextFrameIfVisible = 2

When set, manually requests to draw geometry on next frame.

IgnoreOcclusionCulling = 3

Always draw, even if the instance would be culled by occlusion culling. Does not affect view frustum culling.

Max = 4

Represents the size of the RenderingServer.InstanceFlags enum.

UseBakedLight = 0

Allows the instance to be used in baked lighting.

UseDynamicGI = 1

Allows the instance to be used with dynamic global illumination.

RenderingServer.InstanceType

ValueDescription
Decal = 7

The instance is a decal.

FogVolume = 12

The instance is a fog volume.

GeometryMask = 14

A combination of the flags of geometry instances (mesh, multimesh, immediate and particles).

Light = 5

The instance is a light.

Lightmap = 9

The instance is a lightmap.

Max = 13

Represents the size of the RenderingServer.InstanceType enum.

Mesh = 1

The instance is a mesh.

Multimesh = 2

The instance is a multimesh.

None = 0

The instance does not have a type.

Occluder = 10

The instance is an occlusion culling occluder.

Particles = 3

The instance is a particle emitter.

ParticlesCollision = 4

The instance is a GPUParticles collision shape.

ReflectionProbe = 6

The instance is a reflection probe.

VisiblityNotifier = 11

The instance is a visible on-screen notifier.

VoxelGI = 8

The instance is a VoxelGI.

RenderingServer.LightBakeMode

ValueDescription
Disabled = 0

Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights.

Dynamic = 2

Light is taken into account in dynamic baking (VoxelGI and SDFGI (Environment.SdfgiEnabled) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to RenderingServer.LightBakeMode.Static. This has a greater performance cost compared to RenderingServer.LightBakeMode.Static. When using SDFGI, the update speed of dynamic lights is affected by ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights.

Static = 1

Light is taken into account in static baking (VoxelGI, LightmapGI, SDFGI (Environment.SdfgiEnabled)). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off.

RenderingServer.LightDirectionalShadowMode

ValueDescription
Orthogonal = 0

Use orthogonal shadow projection for directional light.

Parallel2Splits = 1

Use 2 splits for shadow projection when using directional light.

Parallel4Splits = 2

Use 4 splits for shadow projection when using directional light.

RenderingServer.LightDirectionalSkyMode

ValueDescription
LightAndSky = 0

Use DirectionalLight3D in both sky rendering and scene lighting.

LightOnly = 1

Only use DirectionalLight3D in scene lighting.

SkyOnly = 2

Only use DirectionalLight3D in sky rendering.

RenderingServer.LightOmniShadowMode

ValueDescription
Cube = 1

Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid.

DualParaboloid = 0

Use a dual paraboloid shadow map for omni lights.

RenderingServer.LightParam

ValueDescription
Attenuation = 6

The light's attenuation.

ContactShadowBlur = 22

Blurs the edges of the contact shadow. 0.0 produces sharp shadows; higher values increase the noise magnitude.

ContactShadowOpacity = 21

Changes the opacity of the lights screen-space contact shadows. A value of 1.0 uses the same opacity as RenderingServer.LightParam.ShadowOpacity, a value of 0.5 would be 50% of the opacity of RenderingServer.LightParam.ShadowOpacity.

Energy = 0

The light's energy multiplier.

IndirectEnergy = 1

The light's indirect energy multiplier (final indirect energy is RenderingServer.LightParam.Energy * RenderingServer.LightParam.IndirectEnergy).

Intensity = 20

Constant representing the intensity of the light, measured in Lumens when dealing with a SpotLight3D or OmniLight3D, or measured in Lux with a DirectionalLight3D. Only used when ProjectSettings.rendering/lights_and_shadows/use_physical_light_units is true.

Max = 23

Represents the size of the RenderingServer.LightParam enum.

Range = 4

The light's range.

ShadowBias = 15

Bias for the shadow lookup to fix self-shadowing artifacts.

ShadowBlur = 18

Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible.

ShadowFadeStart = 13

Proportion of shadow max distance where the shadow will start to fade out.

ShadowMaxDistance = 9

The maximum distance for shadow splits. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (since more objects need to be included in the directional shadow rendering).

ShadowNormalBias = 14

Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts.

ShadowOpacity = 17

The light's shadow opacity. Values lower than 1.0 make the light appear through shadows. This can be used to fake global illumination at a low performance cost.

ShadowPancakeSize = 16

Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to 0 turns off the pancaking effect.

ShadowSplit1Offset = 10

Proportion of shadow atlas occupied by the first split.

ShadowSplit2Offset = 11

Proportion of shadow atlas occupied by the second split.

ShadowSplit3Offset = 12

Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest.

Size = 5

The size of the light when using spot light or omni light. The angular size of the light when using directional light.

Specular = 3

The light's influence on specularity.

SpotAngle = 7

The spotlight's angle.

SpotAttenuation = 8

The spotlight's attenuation.

TransmittanceBias = 19
VolumetricFogEnergy = 2

The light's volumetric fog energy multiplier (final volumetric fog energy is RenderingServer.LightParam.Energy * RenderingServer.LightParam.VolumetricFogEnergy).

RenderingServer.LightProjectorFilter

ValueDescription
Linear = 1

Linear filter for light projectors (use for non-pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps.

LinearMipmaps = 3

Linear filter for light projectors (use for non-pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.

LinearMipmapsAnisotropic = 5

Linear filter for light projectors (use for non-pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.

Nearest = 0

Nearest-neighbor filter for light projectors (use for pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps.

NearestMipmaps = 2

Nearest-neighbor filter for light projectors (use for pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.

NearestMipmapsAnisotropic = 4

Nearest-neighbor filter for light projectors (use for pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.

RenderingServer.LightType

ValueDescription
Area = 3

Area light (see AreaLight3D).

Directional = 0

Directional (sun/moon) light (see DirectionalLight3D).

Omni = 1

Omni light (see OmniLight3D).

Spot = 2

Spot light (see SpotLight3D).

RenderingServer.MultimeshPhysicsInterpolationQuality

ValueDescription
Fast = 0

MultiMesh physics interpolation favors speed over quality.

High = 1

MultiMesh physics interpolation favors quality over speed.

RenderingServer.MultimeshTransformFormat

ValueDescription
Transform2D = 0

Use Transform2D to store MultiMesh transform.

Transform3D = 1

Use Transform3D to store MultiMesh transform.

RenderingServer.NinePatchAxisMode

ValueDescription
Stretch = 0

The nine patch gets stretched where needed.

Tile = 1

The nine patch gets filled with tiles where needed.

TileFit = 2

The nine patch gets filled with tiles where needed and stretches them a bit if needed.

RenderingServer.ParticlesCollisionHeightfieldResolution

ValueDescription
Max = 6

Represents the size of the RenderingServer.ParticlesCollisionHeightfieldResolution enum.

Resolution1024 = 2

1024×1024 heightfield resolution for GpuParticlesCollisionHeightField3D.

Resolution2048 = 3

2048×2048 heightfield resolution for GpuParticlesCollisionHeightField3D.

Resolution256 = 0

256×256 heightfield resolution for GpuParticlesCollisionHeightField3D.

Resolution4096 = 4

4096×4096 heightfield resolution for GpuParticlesCollisionHeightField3D.

Resolution512 = 1

512×512 heightfield resolution for GpuParticlesCollisionHeightField3D.

Resolution8192 = 5

8192×8192 heightfield resolution for GpuParticlesCollisionHeightField3D.

RenderingServer.ParticlesCollisionType

RenderingServer.ParticlesDrawOrder

ValueDescription
Index = 0

Draw particles in the order that they appear in the particles array.

Lifetime = 1

Sort particles based on their lifetime. In other words, the particle with the highest lifetime is drawn at the front.

ReverseLifetime = 2

Sort particles based on the inverse of their lifetime. In other words, the particle with the lowest lifetime is drawn at the front.

ViewDepth = 3

Sort particles based on their distance to the camera.

RenderingServer.ParticlesMode

ValueDescription
Mode2D = 0

2D particles.

Mode3D = 1

3D particles.

RenderingServer.ParticlesTransformAlign

ValueDescription
Disabled = 0

Do not align particle transforms relative to the camera or velocity.

LocalBillboard = 4

Billboard each particles around a local axis.

YToVelocity = 2

Align each particle's Y axis to the velocity vector.

ZBillboard = 1

Align each particle's Z axis to face the camera.

ZBillboardYToVelocity = 3

Align each particle's Z axis to face the camera and Y axis to the velocity vector.

RenderingServer.ParticlesTransformAlignAxis

ValueDescription
X = 0

Use the X axis for local billboarding.

Y = 1

Use the Y axis for local billboarding.

RenderingServer.ParticlesTransformAlignCustomSrc

ValueDescription
Disabled = 0

Do not read from CUSTOM when performing billboarding.

W = 4

Read from CUSTOM.w when performing billboarding and use it as an angle, in radians.

X = 1

Read from CUSTOM.x when performing billboarding and use it as an angle, in radians.

Y = 2

Read from CUSTOM.y when performing billboarding and use it as an angle, in radians.

Z = 3

Read from CUSTOM.z when performing billboarding and use it as an angle, in radians.

RenderingServer.PipelineSource

ValueDescription
Canvas = 0

Pipeline compilation that was triggered by the 2D canvas renderer.

Draw = 3

Pipeline compilation that was triggered while drawing the scene.

Max = 5

Represents the size of the RenderingServer.PipelineSource enum.

Mesh = 1

Pipeline compilation that was triggered by loading a mesh.

Specialization = 4

Pipeline compilation that was triggered to optimize the current scene.

Surface = 2

Pipeline compilation that was triggered by building the surface cache before rendering the scene.

RenderingServer.PrimitiveType

ValueDescription
LineStrip = 2

Primitive to draw consists of a line strip from start to end.

Lines = 1

Primitive to draw consists of lines.

Max = 5

Represents the size of the RenderingServer.PrimitiveType enum.

Points = 0

Primitive to draw consists of points.

TriangleStrip = 4

Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle).

Triangles = 3

Primitive to draw consists of triangles.

RenderingServer.ReflectionProbeAmbientMode

ValueDescription
Color = 2

Apply custom ambient lighting inside the reflection probe's box defined by its size. See RenderingServer.ReflectionProbeSetAmbientColor and RenderingServer.ReflectionProbeSetAmbientEnergy.

Disabled = 0

Do not apply any ambient lighting inside the reflection probe's box defined by its size.

Environment = 1

Apply automatically-sourced environment lighting inside the reflection probe's box defined by its size.

RenderingServer.ReflectionProbeUpdateMode

ValueDescription
Always = 1

Reflection probe will update each frame. This mode is necessary to capture moving objects.

Once = 0

Reflection probe will update reflections once and then stop.

RenderingServer.RenderingInfo

ValueDescription
BufferMemUsed = 4

Buffer memory used (in bytes). This includes vertex data, uniform buffers, and many miscellaneous buffer types used internally.

PipelineCompilationsCanvas = 6

Number of pipeline compilations that were triggered by the 2D canvas renderer.

PipelineCompilationsDraw = 9

Number of pipeline compilations that were triggered while drawing the scene. These compilations will show up as stutters during gameplay the first time a user runs the game and the pipeline is required.

PipelineCompilationsMesh = 7

Number of pipeline compilations that were triggered by loading meshes. These compilations will show up as longer loading times the first time a user runs the game and the pipeline is required.

PipelineCompilationsSpecialization = 10

Number of pipeline compilations that were triggered to optimize the current scene. These compilations are done in the background and should not cause any stutters whatsoever.

PipelineCompilationsSurface = 8

Number of pipeline compilations that were triggered by building the surface cache before rendering the scene. These compilations will show up as a stutter when loading a scene the first time a user runs the game and the pipeline is required.

TextureMemUsed = 3

Texture memory used (in bytes).

TotalDrawCallsInFrame = 2

Number of draw calls performed to render in the current 3D scene. This varies depending on camera position and rotation.

TotalObjectsInFrame = 0

Number of objects rendered in the current 3D scene. This varies depending on camera position and rotation.

TotalPrimitivesInFrame = 1

Number of points, lines, or triangles rendered in the current 3D scene. This varies depending on camera position and rotation.

VideoMemUsed = 5

Video memory used (in bytes). When using the Forward+ or Mobile renderers, this is always greater than the sum of RenderingServer.RenderingInfo.TextureMemUsed and RenderingServer.RenderingInfo.BufferMemUsed, since there is miscellaneous data not accounted for by those two metrics. When using the Compatibility renderer, this is equal to the sum of RenderingServer.RenderingInfo.TextureMemUsed and RenderingServer.RenderingInfo.BufferMemUsed.

RenderingServer.ShaderMode

ValueDescription
CanvasItem = 1

Shader is a 2D shader.

Fog = 4

Shader is a 3D fog shader.

Max = 6

Represents the size of the RenderingServer.ShaderMode enum.

Particles = 2

Shader is a particle shader (can be used in both 2D and 3D).

Sky = 3

Shader is a 3D sky shader.

Spatial = 0

Shader is a 3D shader.

TextureBlit = 5

Shader is a texture_blit shader.

RenderingServer.ShadowCastingSetting

ValueDescription
DoubleSided = 2

Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows.

Off = 0

Disable shadows from this instance.

On = 1

Cast shadows from this instance.

ShadowsOnly = 3

Only render the shadows from the object. The object itself will not be drawn.

RenderingServer.ShadowQuality

ValueDescription
Hard = 0

Lowest shadow filtering quality (fastest). Soft shadows are not available with this quality setting, which means the Light3D.ShadowBlur property is ignored if Light3D.LightSize and Light3D.LightAngularDistance is 0.0. Note: The variable shadow blur performed by Light3D.LightSize and Light3D.LightAngularDistance is still effective when using hard shadow filtering. In this case, Light3D.ShadowBlur is taken into account. However, the results will not be blurred, instead the blur amount is treated as a maximum radius for the penumbra.

Max = 6

Represents the size of the RenderingServer.ShadowQuality enum.

SoftHigh = 4

High low shadow filtering quality (slow). When using this quality setting, Light3D.ShadowBlur is automatically multiplied by 1.5× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose Light3D.LightSize or Light3D.LightAngularDistance is 0.0).

SoftLow = 2

Low shadow filtering quality (fast).

SoftMedium = 3

Medium low shadow filtering quality (average).

SoftUltra = 5

Highest low shadow filtering quality (slowest). When using this quality setting, Light3D.ShadowBlur is automatically multiplied by 2× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose Light3D.LightSize or Light3D.LightAngularDistance is 0.0).

SoftVeryLow = 1

Very low shadow filtering quality (faster). When using this quality setting, Light3D.ShadowBlur is automatically multiplied by 0.75× to avoid introducing too much noise. This division only applies to lights whose Light3D.LightSize or Light3D.LightAngularDistance is 0.0).

RenderingServer.SkyMode

ValueDescription
Automatic = 0

Automatically selects the appropriate process mode based on your sky shader. If your shader uses TIME or POSITION, this will use RenderingServer.SkyMode.Realtime. If your shader uses any of the LIGHT_* variables or any custom uniforms, this uses RenderingServer.SkyMode.Incremental. Otherwise, this defaults to RenderingServer.SkyMode.Quality.

Incremental = 2

Uses the same high quality importance sampling to process the radiance map as RenderingServer.SkyMode.Quality, but updates over several frames. The number of frames is determined by ProjectSettings.rendering/reflections/sky_reflections/roughness_layers. Use this when you need highest quality radiance maps, but have a sky that updates slowly.

Quality = 1

Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than RenderingServer.SkyMode.Realtime but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing ProjectSettings.rendering/reflections/sky_reflections/ggx_samples.

Realtime = 3

Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on ProjectSettings.rendering/reflections/sky_reflections/fast_filter_high_quality. Note: The fast filtering algorithm is limited to 256×256 cubemaps, so RenderingServer.SkySetRadianceSize must be set to 256. Otherwise, a warning is printed and the overridden radiance size is ignored.

RenderingServer.SplashStretchMode

ValueDescription
Cover = 4

Stretches the image to cover the entire screen while preserving aspect ratio.

Disabled = 0

No stretching is applied.

Ignore = 5

Stretches the image to cover the entire screen but doesn't preserve aspect ratio.

Keep = 1

Stretches image to fullscreen while preserving aspect ratio.

KeepHeight = 3

Stretches the width of the image based on the height of the screen.

KeepWidth = 2

Stretches the height of the image based on the width of the screen.

RenderingServer.SubSurfaceScatteringQuality

ValueDescription
Disabled = 0

Disables subsurface scattering entirely, even on materials that have BaseMaterial3D.SubsurfScatterEnabled set to true. This has the lowest GPU requirements.

High = 3

High subsurface scattering quality. This has the highest GPU requirements.

Low = 1

Low subsurface scattering quality.

Medium = 2

Medium subsurface scattering quality.

RenderingServer.TextureDrawableFormat

ValueDescription
Rgba8 = 0

OpenGL texture format RGBA with four components, each with a bitdepth of 8.

Rgba8Srgb = 1

OpenGL texture format RGBA with four components, each with a bitdepth of 8. When drawn to, an sRGB to linear color space conversion is performed.

Rgbaf = 3

OpenGL texture format GL_RGBA32F where there are four components, each a 32-bit floating-point value.

Rgbah = 2

OpenGL texture format GL_RGBA16F where there are four components, each a 16-bit "half-precision" floating-point value.

RenderingServer.TextureLayeredType

ValueDescription
Cubemap = 1

Cubemap texture (see Cubemap).

CubemapArray = 2

Array of cubemap textures (see CubemapArray).

Layered2DArray = 0

Array of 2-dimensional textures (see Texture2DArray).

RenderingServer.TextureType

ValueDescription
Layered = 1

Layered texture.

Type2D = 0

2D texture.

Type3D = 2

3D texture.

RenderingServer.ViewportAnisotropicFiltering

ValueDescription
Anisotropy16X = 4

Use 16× anisotropic filtering.

Anisotropy2X = 1

Use 2× anisotropic filtering.

Anisotropy4X = 2

Use 4× anisotropic filtering. This is the default value.

Anisotropy8X = 3

Use 8× anisotropic filtering.

Disabled = 0

Anisotropic filtering is disabled.

Max = 5

Represents the size of the RenderingServer.ViewportAnisotropicFiltering enum.

RenderingServer.ViewportClearMode

ValueDescription
Always = 0

Always clear the viewport's render target before drawing.

Never = 1

Never clear the viewport's render target.

OnlyNextFrame = 2

Clear the viewport's render target on the next frame, then switch to RenderingServer.ViewportClearMode.Never.

RenderingServer.ViewportDebugDraw

ValueDescription
ClusterDecals = 22

Draws the Decal cluster. Clustering determines where decals are positioned in screen-space, which allows the engine to only process these portions of the screen for decals. Note: Only supported when using the Forward+ rendering method.

ClusterOmniLights = 20

Draws the OmniLight3D cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting. Note: Only supported when using the Forward+ rendering method.

ClusterReflectionProbes = 23

Draws the ReflectionProbe cluster. Clustering determines where reflection probes are positioned in screen-space, which allows the engine to only process these portions of the screen for reflection probes. Note: Only supported when using the Forward+ rendering method.

ClusterSpotLights = 21

Draws the SpotLight3D cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting. Note: Only supported when using the Forward+ rendering method.

DecalAtlas = 15

Draws the decal atlas that stores decal textures from Decals. Note: Only supported when using the Forward+ or Mobile rendering methods.

DirectionalShadowAtlas = 10

Draws the shadow atlas that stores shadows from DirectionalLight3Ds in the upper left quadrant of the Viewport. The slice of the camera frustum related to the shadow map cascade is superimposed to visualize coverage. The color of each slice matches the colors used for RenderingServer.ViewportDebugDraw.PssmSplits. When shadow cascades are blended the overlap is taken into account when drawing the frustum slices. The last cascade shows all frustum slices to illustrate the coverage of all slices.

DisableLod = 19

Disable mesh LOD. All meshes are drawn with full detail, which can be used to compare performance.

Disabled = 0

Debug draw is disabled. Default setting.

GIBuffer = 18

Draws the global illumination buffer from VoxelGI or SDFGI. Requires VoxelGI (at least one visible baked VoxelGI node) or SDFGI (Environment.SdfgiEnabled) to be enabled to have a visible effect. Note: Only supported when using the Forward+ rendering method.

InternalBuffer = 26

Internal buffer is drawn instead of regular scene so you can see the per-pixel output that will be used by post-processing effects. Note: Only supported when using the Forward+ or Mobile rendering methods.

Lighting = 2

Objects are displayed with only light information. Note: When using this debug draw mode, custom shaders are ignored since all materials in the scene temporarily use a debug material. This means the result from custom shader functions (such as vertex displacement) won't be visible anymore when using this debug draw mode.

MotionVectors = 25

Draws the motion vectors buffer. This is used by temporal antialiasing to correct for motion that occurs during gameplay. Note: Only supported when using the Forward+ rendering method.

NormalBuffer = 5

Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects.

Occluders = 24

Draws the occlusion culling buffer. This low-resolution occlusion culling buffer is rasterized on the CPU and is used to check whether instances are occluded by other objects. Note: Only supported when using the Forward+ or Mobile rendering methods.

Overdraw = 3

Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw (represented by brighter colors) means you are wasting performance on drawing pixels that are being hidden behind others. Note: When using this debug draw mode, custom shaders are ignored since all materials in the scene temporarily use a debug material. This means the result from custom shader functions (such as vertex displacement) won't be visible anymore when using this debug draw mode.

PssmSplits = 14

Colors each PSSM split for the DirectionalLight3Ds in the scene a different color so you can see where the splits are. In order (from closest to furthest from the camera), they are colored red, green, blue, and yellow. Note: When using this debug draw mode, custom shaders are ignored since all materials in the scene temporarily use a debug material. This means the result from custom shader functions (such as vertex displacement) won't be visible anymore when using this debug draw mode. Note: Only supported when using the Forward+ or Mobile rendering methods.

SceneLuminance = 11

Draws the estimated scene luminance. This is a 1×1 texture that is generated when autoexposure is enabled to control the scene's exposure. Note: Only supported when using the Forward+ or Mobile rendering methods.

Sdfgi = 16

Draws SDFGI cascade data. This is the data structure that is used to bounce lighting against and create reflections. Note: Only supported when using the Forward+ rendering method.

SdfgiProbes = 17

Draws SDFGI probe data. This is the data structure that is used to give indirect lighting dynamic objects moving within the scene. When in the editor, left-clicking a probe will display additional bright dots that show its occlusion information. A white dot means the light is not occluded at all at the dot's position, while a red dot means the light is fully occluded. Intermediate values are possible. Note: Only supported when using the Forward+ rendering method.

ShadowAtlas = 9

Draws the shadow atlas that stores shadows from OmniLight3Ds and SpotLight3Ds in the upper left quadrant of the Viewport.

Ssao = 12

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 Environment.SsaoEnabled set in your WorldEnvironment. Note: Only supported when using the Forward+ rendering method.

Ssil = 13

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 Environment.SsilEnabled set in your WorldEnvironment. Note: Only supported when using the Forward+ rendering method.

Unshaded = 1

Objects are displayed without light information.

VoxelGIAlbedo = 6

Objects are displayed with only the albedo value from VoxelGIs. Requires at least one visible VoxelGI node that has been baked to have a visible effect. Note: Only supported when using the Forward+ rendering method.

VoxelGIEmission = 8

Objects are displayed with only the emission color from VoxelGIs. Requires at least one visible VoxelGI node that has been baked to have a visible effect. Note: Only supported when using the Forward+ rendering method.

VoxelGILighting = 7

Objects are displayed with only the lighting value from VoxelGIs. Requires at least one visible VoxelGI node that has been baked to have a visible effect. Note: Only supported when using the Forward+ rendering method.

Wireframe = 4

Debug draw draws objects in wireframe. Note: RenderingServer.SetDebugGenerateWireframes must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer. Note: In the Compatibility renderer, backfaces are always visible when using wireframe rendering. In the Forward+ and Mobile renderers, wireframes follow the material's backface culling properties instead.

RenderingServer.ViewportEnvironmentMode

ValueDescription
Disabled = 0

Disable rendering of 3D environment over 2D canvas.

Enabled = 1

Enable rendering of 3D environment over 2D canvas.

Inherit = 2

Inherit enable/disable value from parent. If the topmost parent is also set to RenderingServer.ViewportEnvironmentMode.Inherit, then this has the same behavior as RenderingServer.ViewportEnvironmentMode.Enabled.

Max = 3

Represents the size of the RenderingServer.ViewportEnvironmentMode enum.

RenderingServer.ViewportMsaa

ValueDescription
Disabled = 0

Multisample antialiasing for 3D is disabled. This is the default value, and also the fastest setting.

Max = 4

Represents the size of the RenderingServer.ViewportMsaa enum.

Msaa2X = 1

Multisample antialiasing uses 2 samples per pixel for 3D. This has a moderate impact on performance.

Msaa4X = 2

Multisample antialiasing uses 4 samples per pixel for 3D. This has a high impact on performance.

Msaa8X = 3

Multisample antialiasing uses 8 samples per pixel for 3D. This has a very high impact on performance. Likely unsupported on low-end and older hardware.

RenderingServer.ViewportOcclusionCullingBuildQuality

ValueDescription
High = 2

High occlusion culling BVH build quality (as defined by Embree). Results in the highest CPU usage, but most effective culling.

Low = 0

Low occlusion culling BVH build quality (as defined by Embree). Results in the lowest CPU usage, but least effective culling.

Medium = 1

Medium occlusion culling BVH build quality (as defined by Embree).

RenderingServer.ViewportRenderInfo

ValueDescription
DrawCallsInFrame = 2

Number of draw calls during this frame.

Max = 3

Represents the size of the RenderingServer.ViewportRenderInfo enum.

ObjectsInFrame = 0

Number of objects drawn in a single frame.

PrimitivesInFrame = 1

Number of points, lines, or triangles drawn in a single frame.

RenderingServer.ViewportRenderInfoType

ValueDescription
Canvas = 2

Canvas item rendering. This includes all 2D rendering.

Max = 3

Represents the size of the RenderingServer.ViewportRenderInfoType enum.

Shadow = 1

Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits.

Visible = 0

Visible render pass (excluding shadows).

RenderingServer.ViewportScaling3DMode

ValueDescription
Bilinear = 0

Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using Viewport.Scaling3DScale. Values less than 1.0 will result in undersampling while values greater than 1.0 will result in supersampling. A value of 1.0 disables scaling.

Fsr = 1

Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using Viewport.Scaling3DScale. Values less than 1.0 will result in the viewport being upscaled using FSR. Values greater than 1.0 are not supported and bilinear downsampling will be used instead. A value of 1.0 disables scaling.

Fsr2 = 2

Use AMD FidelityFX Super Resolution 2.2 upscaling for the viewport's 3D buffer. The amount of scaling can be set using Viewport.Scaling3DScale. Values less than 1.0 will result in the viewport being upscaled using FSR2. Values greater than 1.0 are not supported and bilinear downsampling will be used instead. A value of 1.0 will use FSR2 at native resolution as a TAA solution.

Max = 6

Represents the size of the RenderingServer.ViewportScaling3DMode enum.

MetalfxSpatial = 3

Use MetalFX spatial upscaling for the viewport's 3D buffer. The amount of scaling can be set using Viewport.Scaling3DScale. Values less than 1.0 will result in the viewport being upscaled using MetalFX. Values greater than 1.0 are not supported and bilinear downsampling will be used instead. A value of 1.0 disables scaling. Note: Only supported when the Metal rendering driver is in use, which limits this scaling mode to macOS and iOS.

MetalfxTemporal = 4

Use MetalFX temporal upscaling for the viewport's 3D buffer. The amount of scaling can be set using Viewport.Scaling3DScale. Values less than 1.0 will result in the viewport being upscaled using MetalFX. Values greater than 1.0 are not supported and bilinear downsampling will be used instead. A value of 1.0 will use MetalFX at native resolution as a TAA solution. Note: Only supported when the Metal rendering driver is in use, which limits this scaling mode to macOS and iOS.

Nearest = 5

Use nearest-neighbor filtering for the viewport's 3D buffer. This looks crisper than RenderingServer.ViewportScaling3DMode.Bilinear and has no additional rendering cost. The amount of scaling can be set using Viewport.Scaling3DScale. Values greater than 1.0 are not supported and bilinear downsampling will be used instead. A value of 1.0 disables scaling. Note: When using the Nearest scaling mode, to avoid uneven pixel scaling, it's highly recommended to use a value equal to an integer divisor with a dividend of 1. For example, it's best to use a scale of 0.5 (1/2), 0.3333 (1/3), 0.25 (1/4), 0.2 (1/5), and so on.

RenderingServer.ViewportScreenSpaceAA

ValueDescription
Disabled = 0

Do not perform any antialiasing in the full screen post-process.

Fxaa = 1

Use fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K.

Max = 3

Represents the size of the RenderingServer.ViewportScreenSpaceAA enum.

Smaa = 2

Use subpixel morphological antialiasing. SMAA may produce clearer results than FXAA, but at a slightly higher performance cost.

RenderingServer.ViewportSdfOversize

ValueDescription
Max = 4

Represents the size of the RenderingServer.ViewportSdfOversize enum.

Oversize100Percent = 0

Do not oversize the 2D signed distance field. Occluders may disappear when touching the viewport's edges, and GpuParticles3D collision may stop working earlier than intended. This has the lowest GPU requirements.

Oversize120Percent = 1

2D signed distance field covers 20% of the viewport's size outside the viewport on each side (top, right, bottom, left).

Oversize150Percent = 2

2D signed distance field covers 50% of the viewport's size outside the viewport on each side (top, right, bottom, left).

Oversize200Percent = 3

2D signed distance field covers 100% of the viewport's size outside the viewport on each side (top, right, bottom, left). This has the highest GPU requirements.

RenderingServer.ViewportSdfScale

ValueDescription
Max = 3

Represents the size of the RenderingServer.ViewportSdfScale enum.

Scale100Percent = 0

Full resolution 2D signed distance field scale. This has the highest GPU requirements.

Scale25Percent = 2

Quarter resolution 2D signed distance field scale on each axis (6.25% of the viewport pixel count). This has the lowest GPU requirements.

Scale50Percent = 1

Half resolution 2D signed distance field scale on each axis (25% of the viewport pixel count).

RenderingServer.ViewportUpdateMode

ValueDescription
Always = 4

Always update the viewport's render target.

Disabled = 0

Do not update the viewport's render target.

Once = 1

Update the viewport's render target once, then switch to RenderingServer.ViewportUpdateMode.Disabled.

WhenParentVisible = 3

Update the viewport's render target only when its parent is visible.

WhenVisible = 2

Update the viewport's render target only when it is visible. This is the default value.

RenderingServer.ViewportVrsMode

ValueDescription
Disabled = 0

Variable rate shading is disabled.

Max = 3

Represents the size of the RenderingServer.ViewportVrsMode enum.

Texture = 1

Variable rate shading uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view.

XR = 2

Variable rate shading texture is supplied by the primary XRInterface. Note that this may override the update mode.

RenderingServer.ViewportVrsUpdateMode

ValueDescription
Always = 2

The input texture for variable rate shading will be processed each frame.

Disabled = 0

The input texture for variable rate shading will not be processed.

Max = 3

Represents the size of the RenderingServer.ViewportVrsUpdateMode enum.

Once = 1

The input texture for variable rate shading will be processed once.

RenderingServer.VisibilityRangeFadeMode

ValueDescription
Dependencies = 2

Fade-in the given instance's dependencies when reaching its visibility range limits.

Disabled = 0

Disable visibility range fading for the given instance.

Self = 1

Fade-out the given instance when it approaches its visibility range limits.

RenderingServer.VoxelGIQuality

ValueDescription
High = 1

High VoxelGI rendering quality using 6 cones.

Low = 0

Low VoxelGI rendering quality using 4 cones.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.