RenderingServer

package
v0.0.0-...-357ca8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 38 Imported by: 0

Documentation

Overview

The rendering server is the API backend for everything visible. The whole scene system mounts on it to display. The rendering server is completely opaque: the internals are entirely implementation-specific and cannot be accessed.

The rendering server can be used to bypass the scene/Node system entirely. This can improve performance in cases where the scene system is the bottleneck, but won't improve performance otherwise (for instance, if the GPU is already fully utilized).

Resources are created using the *_create functions. These functions return Resource.IDs which are not references to the objects themselves, but opaque pointers towards these objects.

All objects are drawn to a viewport. You can use the Viewport attached to the SceneTree or you can create one yourself with ViewportCreate. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using ViewportSetScenario or ViewportAttachCanvas.

Scenarios: In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the rendering server from a running game, the scenario can be accessed from the scene tree from any Node3D node with Node3D.GetWorld3d. Otherwise, a scenario can be created with ScenarioCreate.

Similarly, in 2D, a canvas is needed to draw all canvas items.

3D: In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using InstanceSetBase. The instance must also be attached to the scenario using InstanceSetScenario in order to be visible. RenderingServer methods that don't have a prefix are usually 3D-specific (but not always).

2D: In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. 2D-specific RenderingServer methods generally start with canvas_*.

Headless mode: Starting the engine with the --headless command line argument disables all rendering and window management functions. Most functions from RenderingServer will return dummy values in this case.

Index

Constants

View Source
const ArrayCustomCount int = 4 //gd:RenderingServer.ARRAY_CUSTOM_COUNT
View Source
const ArrayWeightsSize int = 4 //gd:RenderingServer.ARRAY_WEIGHTS_SIZE
View Source
const CanvasItemZMax int = 4096 //gd:RenderingServer.CANVAS_ITEM_Z_MAX
View Source
const CanvasItemZMin int = -4096 //gd:RenderingServer.CANVAS_ITEM_Z_MIN
View Source
const CanvasLayerMax int = 2.147483647e+09 //gd:RenderingServer.CANVAS_LAYER_MAX
View Source
const CanvasLayerMin int = -2.147483648e+09 //gd:RenderingServer.CANVAS_LAYER_MIN
View Source
const MaterialRenderPriorityMax int = 127 //gd:RenderingServer.MATERIAL_RENDER_PRIORITY_MAX
View Source
const MaterialRenderPriorityMin int = -128 //gd:RenderingServer.MATERIAL_RENDER_PRIORITY_MIN
View Source
const Max2dDirectionalLights int = 8 //gd:RenderingServer.MAX_2D_DIRECTIONAL_LIGHTS
View Source
const MaxCursors int = 8 //gd:RenderingServer.MAX_CURSORS
View Source
const MaxGlowLevels int = 7 //gd:RenderingServer.MAX_GLOW_LEVELS
View Source
const MaxMeshSurfaces int = 256 //gd:RenderingServer.MAX_MESH_SURFACES

Variables

This section is empty.

Functions

func Advanced

func Advanced() class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

func BakeRenderUv2

func BakeRenderUv2(base RID.Mesh, material_overrides [][]RID.Material, image_size Vector2i.XY) []Image.Instance

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 BakeChannels.

func CallOnRenderThread

func CallOnRenderThread(callable func())

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.

func CameraAttributesCreate

func CameraAttributesCreate() RID.CameraAttributes

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 FreeRid method.

Note: The equivalent resource is CameraAttributes.

func CameraAttributesSetAutoExposure

func CameraAttributesSetAutoExposure(camera_attributes RID.CameraAttributes, enable bool, min_sensitivity Float.X, max_sensitivity Float.X, speed Float.X, scale Float.X)

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

func CameraAttributesSetDofBlur

func CameraAttributesSetDofBlur(camera_attributes RID.CameraAttributes, far_enable bool, far_distance Float.X, far_transition Float.X, near_enable bool, near_distance Float.X, near_transition Float.X, amount Float.X)

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

func CameraAttributesSetDofBlurBokehShape

func CameraAttributesSetDofBlurBokehShape(shape DOFBokehShape)

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

func CameraAttributesSetDofBlurQuality

func CameraAttributesSetDofBlurQuality(quality DOFBlurQuality, use_jitter bool)

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.

func CameraAttributesSetExposure

func CameraAttributesSetExposure(camera_attributes RID.CameraAttributes, multiplier Float.X, normalization Float.X)

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:

GetExposureNormalization := func(ev100 float32) float32 {
	return 1.0 / (Float.Pow(2, ev100) * 12 / 10)
}

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

func CameraCreate

func CameraCreate() RID.Camera

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 FreeRid method.

Note: The equivalent node is Camera3D.

func CameraSetCameraAttributes

func CameraSetCameraAttributes(camera RID.Camera, effects RID.CameraAttributes)

Sets the camera_attributes created with CameraAttributesCreate to the given camera.

func CameraSetCompositor

func CameraSetCompositor(camera RID.Camera, compositor RID.Compositor)

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

func CameraSetCullMask

func CameraSetCullMask(camera RID.Camera, layers int)

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

func CameraSetEnvironment

func CameraSetEnvironment(camera RID.Camera, env RID.Environment)

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

func CameraSetFrustum

func CameraSetFrustum(camera RID.Camera, size Float.X, offset Vector2.XY, z_near Float.X, z_far Float.X)

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

func CameraSetOrthogonal

func CameraSetOrthogonal(camera RID.Camera, size Float.X, z_near Float.X, z_far Float.X)

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.

func CameraSetPerspective

func CameraSetPerspective(camera RID.Camera, fovy_degrees Float.X, z_near Float.X, z_far Float.X)

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

func CameraSetTransform

func CameraSetTransform(camera RID.Camera, transform Transform3D.BasisOrigin)

Sets Transform3D.BasisOrigin of camera.

func CameraSetUseVerticalAspect

func CameraSetUseVerticalAspect(camera RID.Camera, enable bool)

If true, preserves the horizontal aspect ratio which is equivalent to [Camera3d.KeepWidth]. If false, preserves the vertical aspect ratio which is equivalent to [Camera3d.KeepHeight].

func CanvasCreate

func CanvasCreate() RID.Canvas

Creates a canvas and returns the assigned Resource.ID. 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 FreeRid method.

Canvas has no Resource or Node equivalent.

func CanvasItemAddAnimationSlice

func CanvasItemAddAnimationSlice(item RID.CanvasItem, animation_length Float.X, slice_begin Float.X, slice_end Float.X, offset Float.X)

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.

func CanvasItemAddCircle

func CanvasItemAddCircle(item RID.CanvasItem, pos Vector2.XY, radius Float.X, color Color.RGBA, antialiased bool)

Draws a circle on the CanvasItem pointed to by the 'item' Resource.ID. See also CanvasItem.DrawCircle.

func CanvasItemAddClipIgnore

func CanvasItemAddClipIgnore(item RID.CanvasItem, ignore bool)

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

func CanvasItemAddLcdTextureRectRegion

func CanvasItemAddLcdTextureRectRegion(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture, src_rect Rect2.PositionSize, modulate Color.RGBA)

See also CanvasItem.DrawLcdTextureRectRegion.

func CanvasItemAddLine

func CanvasItemAddLine(item RID.CanvasItem, from Vector2.XY, to Vector2.XY, color Color.RGBA, antialiased bool)

Draws a line on the CanvasItem pointed to by the 'item' Resource.ID. See also CanvasItem.DrawLine.

func CanvasItemAddLineOptions

func CanvasItemAddLineOptions(item RID.CanvasItem, from Vector2.XY, to Vector2.XY, color Color.RGBA, width Float.X, antialiased bool)

Draws a line on the CanvasItem pointed to by the 'item' Resource.ID. See also CanvasItem.DrawLine.

func CanvasItemAddMesh

func CanvasItemAddMesh(item RID.CanvasItem, mesh RID.Mesh, texture RID.CanvasTexture)

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

func CanvasItemAddMeshOptions

func CanvasItemAddMeshOptions(item RID.CanvasItem, mesh RID.Mesh, transform Transform2D.OriginXY, modulate Color.RGBA, texture RID.CanvasTexture)

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

func CanvasItemAddMsdfTextureRectRegion

func CanvasItemAddMsdfTextureRectRegion(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture, src_rect Rect2.PositionSize, outline_size int)

See also CanvasItem.DrawMsdfTextureRectRegion.

func CanvasItemAddMsdfTextureRectRegionOptions

func CanvasItemAddMsdfTextureRectRegionOptions(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture, src_rect Rect2.PositionSize, modulate Color.RGBA, outline_size int, px_range Float.X, scale Float.X)

See also CanvasItem.DrawMsdfTextureRectRegion.

func CanvasItemAddMultiline

func CanvasItemAddMultiline(item RID.CanvasItem, points []Vector2.XY, colors []Color.RGBA, antialiased bool)

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

func CanvasItemAddMultilineOptions

func CanvasItemAddMultilineOptions(item RID.CanvasItem, points []Vector2.XY, colors []Color.RGBA, width Float.X, antialiased bool)

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

func CanvasItemAddMultimesh

func CanvasItemAddMultimesh(item RID.CanvasItem, mesh RID.MultiMesh, texture RID.Texture)

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

func CanvasItemAddNinePatch

func CanvasItemAddNinePatch(item RID.CanvasItem, rect Rect2.PositionSize, source Rect2.PositionSize, texture RID.CanvasTexture, topleft Vector2.XY, bottomright Vector2.XY, x_axis_mode NinePatchAxisMode, y_axis_mode NinePatchAxisMode)

Draws a nine-patch rectangle on the CanvasItem pointed to by the 'item' Resource.ID.

func CanvasItemAddNinePatchOptions

func CanvasItemAddNinePatchOptions(item RID.CanvasItem, rect Rect2.PositionSize, source Rect2.PositionSize, texture RID.CanvasTexture, topleft Vector2.XY, bottomright Vector2.XY, x_axis_mode NinePatchAxisMode, y_axis_mode NinePatchAxisMode, draw_center bool, modulate Color.RGBA)

Draws a nine-patch rectangle on the CanvasItem pointed to by the 'item' Resource.ID.

func CanvasItemAddParticles

func CanvasItemAddParticles(item RID.CanvasItem, particles RID.Particles, texture RID.Texture)

Draws particles on the CanvasItem pointed to by the 'item' Resource.ID.

func CanvasItemAddPolygon

func CanvasItemAddPolygon(item RID.CanvasItem, points []Vector2.XY, colors []Color.RGBA, uvs []Vector2.XY, texture RID.CanvasTexture)

Draws a 2D polygon on the CanvasItem pointed to by the 'item' Resource.ID. If you need more flexibility (such as being able to use bones), use 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 CanvasItemAddTriangleArray.

func CanvasItemAddPolyline

func CanvasItemAddPolyline(item RID.CanvasItem, points []Vector2.XY, colors []Color.RGBA, antialiased bool)

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

func CanvasItemAddPolylineOptions

func CanvasItemAddPolylineOptions(item RID.CanvasItem, points []Vector2.XY, colors []Color.RGBA, width Float.X, antialiased bool)

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

func CanvasItemAddPrimitive

func CanvasItemAddPrimitive(item RID.CanvasItem, points []Vector2.XY, colors []Color.RGBA, uvs []Vector2.XY, texture RID.CanvasTexture)

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

func CanvasItemAddRect

func CanvasItemAddRect(item RID.CanvasItem, rect Rect2.PositionSize, color Color.RGBA, antialiased bool)

Draws a rectangle on the CanvasItem pointed to by the 'item' Resource.ID. See also CanvasItem.DrawRect.

func CanvasItemAddSetTransform

func CanvasItemAddSetTransform(item RID.CanvasItem, transform Transform2D.OriginXY)

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

func CanvasItemAddTextureRect

func CanvasItemAddTextureRect(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture, tile bool, transpose bool)

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

func CanvasItemAddTextureRectOptions

func CanvasItemAddTextureRectOptions(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture, tile bool, modulate Color.RGBA, transpose bool)

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

func CanvasItemAddTextureRectRegion

func CanvasItemAddTextureRectRegion(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture, src_rect Rect2.PositionSize, transpose bool)

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

func CanvasItemAddTextureRectRegionOptions

func CanvasItemAddTextureRectRegionOptions(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture, src_rect Rect2.PositionSize, modulate Color.RGBA, transpose bool, clip_uv bool)

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

func CanvasItemAddTriangleArray

func CanvasItemAddTriangleArray(item RID.CanvasItem, indices []int32, points []Vector2.XY, colors []Color.RGBA, uvs []Vector2.XY, bones []int32, weights []float32, texture RID.CanvasTexture)

Draws a triangle array on the CanvasItem pointed to by the 'item' Resource.ID. This is internally used by Line2D and StyleBoxFlat for rendering. CanvasItemAddTriangleArray is highly flexible, but more complex to use than CanvasItemAddPolygon.

Note: If 'count' is set to a non-negative value, only the first count * 3 indices (corresponding to count triangles) will be drawn. Otherwise, all indices are drawn.

func CanvasItemAddTriangleArrayOptions

func CanvasItemAddTriangleArrayOptions(item RID.CanvasItem, indices []int32, points []Vector2.XY, colors []Color.RGBA, uvs []Vector2.XY, bones []int32, weights []float32, texture RID.CanvasTexture, count int)

Draws a triangle array on the CanvasItem pointed to by the 'item' Resource.ID. This is internally used by Line2D and StyleBoxFlat for rendering. CanvasItemAddTriangleArray is highly flexible, but more complex to use than CanvasItemAddPolygon.

Note: If 'count' is set to a non-negative value, only the first count * 3 indices (corresponding to count triangles) will be drawn. Otherwise, all indices are drawn.

func CanvasItemAttachSkeleton

func CanvasItemAttachSkeleton(item RID.CanvasItem, skeleton RID.Skeleton)

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

func CanvasItemClear

func CanvasItemClear(item RID.CanvasItem)

Clears the CanvasItem and removes all commands in it.

func CanvasItemCreate

func CanvasItemCreate() RID.CanvasItem

Creates a new CanvasItem instance and returns its Resource.ID. 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 FreeRid method.

Note: The equivalent node is CanvasItem.

func CanvasItemGetInstanceShaderParameter

func CanvasItemGetInstanceShaderParameter(instance RID.CanvasItem, parameter string) any

Returns the value of the per-instance shader uniform from the specified canvas item instance. Equivalent to CanvasItem.GetInstanceShaderParameter.

func CanvasItemGetInstanceShaderParameterDefaultValue

func CanvasItemGetInstanceShaderParameterDefaultValue(instance RID.CanvasItem, parameter string) any

Returns the default value of the per-instance shader uniform from the specified canvas item instance. Equivalent to CanvasItem.GetInstanceShaderParameter.

func CanvasItemGetInstanceShaderParameterList

func CanvasItemGetInstanceShaderParameterList(instance RID.CanvasItem) []Object.PropertyInfo

Returns a dictionary of per-instance shader uniform names of the per-instance shader uniform from the specified canvas item instance.

The returned dictionary is in PropertyInfo format, with the keys name, class_name, type, hint, hint_string, and usage.

func CanvasItemResetPhysicsInterpolation

func CanvasItemResetPhysicsInterpolation(item RID.CanvasItem)

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.

func CanvasItemSetCanvasGroupMode

func CanvasItemSetCanvasGroupMode(item RID.CanvasItem, mode CanvasGroupMode, fit_empty bool, fit_margin Float.X, blur_mipmaps bool)

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 CanvasItemSetClip instead.

Note: The equivalent node functionality is found in CanvasGroup and CanvasItem.ClipChildren.

func CanvasItemSetCanvasGroupModeOptions

func CanvasItemSetCanvasGroupModeOptions(item RID.CanvasItem, mode CanvasGroupMode, clear_margin Float.X, fit_empty bool, fit_margin Float.X, blur_mipmaps bool)

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 CanvasItemSetClip instead.

Note: The equivalent node functionality is found in CanvasGroup and CanvasItem.ClipChildren.

func CanvasItemSetClip

func CanvasItemSetClip(item RID.CanvasItem, clip bool)

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 CanvasItemSetCanvasGroupMode instead.

Note: The equivalent node functionality is found in Label.ClipText, RichTextLabel (always enabled) and more.

func CanvasItemSetCopyToBackbuffer

func CanvasItemSetCopyToBackbuffer(item RID.CanvasItem, enabled bool, rect Rect2.PositionSize)

Sets the CanvasItem to copy a rect to the backbuffer.

func CanvasItemSetCustomRect

func CanvasItemSetCustomRect(item RID.CanvasItem, use_custom_rect bool, rect Rect2.PositionSize)

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.

func CanvasItemSetDefaultTextureFilter

func CanvasItemSetDefaultTextureFilter(item RID.CanvasItem, filter CanvasItemTextureFilter)

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

func CanvasItemSetDefaultTextureRepeat

func CanvasItemSetDefaultTextureRepeat(item RID.CanvasItem, repeat CanvasItemTextureRepeat)

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

func CanvasItemSetDistanceFieldMode

func CanvasItemSetDistanceFieldMode(item RID.CanvasItem, enabled bool)

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.

func CanvasItemSetDrawBehindParent

func CanvasItemSetDrawBehindParent(item RID.CanvasItem, enabled bool)

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

func CanvasItemSetDrawIndex

func CanvasItemSetDrawIndex(item RID.CanvasItem, index int)

Sets the index for the CanvasItem.

func CanvasItemSetInstanceShaderParameter

func CanvasItemSetInstanceShaderParameter(instance RID.CanvasItem, parameter string, value any)

Sets the per-instance shader uniform on the specified canvas item instance. Equivalent to CanvasItem.SetInstanceShaderParameter.

func CanvasItemSetInterpolated

func CanvasItemSetInterpolated(item RID.CanvasItem, interpolated bool)

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

func CanvasItemSetLightMask

func CanvasItemSetLightMask(item RID.CanvasItem, mask int)

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

func CanvasItemSetMaterial

func CanvasItemSetMaterial(item RID.CanvasItem, material RID.Material)

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

func CanvasItemSetModulate

func CanvasItemSetModulate(item RID.CanvasItem, color Color.RGBA)

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

func CanvasItemSetParent

func CanvasItemSetParent(item RID.CanvasItem, parent RID.CanvasItem)

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.

func CanvasItemSetSelfModulate

func CanvasItemSetSelfModulate(item RID.CanvasItem, color Color.RGBA)

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

func CanvasItemSetSortChildrenByY

func CanvasItemSetSortChildrenByY(item RID.CanvasItem, enabled bool)

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.

func CanvasItemSetTransform

func CanvasItemSetTransform(item RID.CanvasItem, transform Transform2D.OriginXY)

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 Node2D.Transform.

func CanvasItemSetUseParentMaterial

func CanvasItemSetUseParentMaterial(item RID.CanvasItem, enabled bool)

Sets if the CanvasItem uses its parent's material.

func CanvasItemSetVisibilityLayer

func CanvasItemSetVisibilityLayer(item RID.CanvasItem, visibility_layer int)

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

func CanvasItemSetVisibilityNotifier

func CanvasItemSetVisibilityNotifier(item RID.CanvasItem, enable bool, area Rect2.PositionSize, enter_callable func(), exit_callable func())

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.

func CanvasItemSetVisible

func CanvasItemSetVisible(item RID.CanvasItem, visible bool)

Sets the visibility of the CanvasItem.

func CanvasItemSetZAsRelativeToParent

func CanvasItemSetZAsRelativeToParent(item RID.CanvasItem, enabled bool)

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

func CanvasItemSetZIndex

func CanvasItemSetZIndex(item RID.CanvasItem, z_index int)

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

func CanvasItemTransformPhysicsInterpolation

func CanvasItemTransformPhysicsInterpolation(item RID.CanvasItem, transform Transform2D.OriginXY)

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.

func CanvasLightAttachToCanvas

func CanvasLightAttachToCanvas(light RID.CanvasLight, canvas RID.Canvas)

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

func CanvasLightCreate

func CanvasLightCreate() RID.CanvasLight

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 FreeRid method.

Note: The equivalent node is Light2D.

func CanvasLightOccluderAttachToCanvas

func CanvasLightOccluderAttachToCanvas(occluder RID.CanvasLightOccluder, canvas RID.Canvas)

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

func CanvasLightOccluderCreate

func CanvasLightOccluderCreate() RID.CanvasLightOccluder

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 FreeRid method.

Note: The equivalent node is LightOccluder2D.

func CanvasLightOccluderResetPhysicsInterpolation

func CanvasLightOccluderResetPhysicsInterpolation(occluder RID.CanvasLightOccluder)

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.

func CanvasLightOccluderSetAsSdfCollision

func CanvasLightOccluderSetAsSdfCollision(occluder RID.CanvasLightOccluder, enable bool)

func CanvasLightOccluderSetEnabled

func CanvasLightOccluderSetEnabled(occluder RID.CanvasLightOccluder, enabled bool)

Enables or disables light occluder.

func CanvasLightOccluderSetInterpolated

func CanvasLightOccluderSetInterpolated(occluder RID.CanvasLightOccluder, interpolated bool)

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

func CanvasLightOccluderSetLightMask

func CanvasLightOccluderSetLightMask(occluder RID.CanvasLightOccluder, mask int)

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

func CanvasLightOccluderSetPolygon

func CanvasLightOccluderSetPolygon(occluder RID.CanvasLightOccluder, polygon RID.CanvasLightOccluderPolygon)

Sets a light occluder's polygon.

func CanvasLightOccluderSetTransform

func CanvasLightOccluderSetTransform(occluder RID.CanvasLightOccluder, transform Transform2D.OriginXY)

Sets a light occluder's Transform2D.OriginXY.

func CanvasLightOccluderTransformPhysicsInterpolation

func CanvasLightOccluderTransformPhysicsInterpolation(occluder RID.CanvasLightOccluder, transform Transform2D.OriginXY)

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.

func CanvasLightResetPhysicsInterpolation

func CanvasLightResetPhysicsInterpolation(light RID.CanvasLight)

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.

func CanvasLightSetBlendMode

func CanvasLightSetBlendMode(light RID.CanvasLight, mode CanvasLightBlendMode)

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

func CanvasLightSetColor

func CanvasLightSetColor(light RID.CanvasLight, color Color.RGBA)

Sets the color for a light.

func CanvasLightSetEnabled

func CanvasLightSetEnabled(light RID.CanvasLight, enabled bool)

Enables or disables a canvas light.

func CanvasLightSetEnergy

func CanvasLightSetEnergy(light RID.CanvasLight, energy Float.X)

Sets a canvas light's energy.

func CanvasLightSetHeight

func CanvasLightSetHeight(light RID.CanvasLight, height Float.X)

Sets a canvas light's height.

func CanvasLightSetInterpolated

func CanvasLightSetInterpolated(light RID.CanvasLight, interpolated bool)

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

func CanvasLightSetItemCullMask

func CanvasLightSetItemCullMask(light RID.CanvasLight, mask int)

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

func CanvasLightSetItemShadowCullMask

func CanvasLightSetItemShadowCullMask(light RID.CanvasLight, mask int)

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

func CanvasLightSetLayerRange

func CanvasLightSetLayerRange(light RID.CanvasLight, min_layer int, max_layer int)

The layer range that gets rendered with this light.

func CanvasLightSetMode

func CanvasLightSetMode(light RID.CanvasLight, mode CanvasLightMode)

Sets the mode of the canvas light.

func CanvasLightSetShadowColor

func CanvasLightSetShadowColor(light RID.CanvasLight, color Color.RGBA)

Sets the color of the canvas light's shadow.

func CanvasLightSetShadowEnabled

func CanvasLightSetShadowEnabled(light RID.CanvasLight, enabled bool)

Enables or disables the canvas light's shadow.

func CanvasLightSetShadowFilter

func CanvasLightSetShadowFilter(light RID.CanvasLight, filter CanvasLightShadowFilter)

Sets the canvas light's shadow's filter.

func CanvasLightSetShadowSmooth

func CanvasLightSetShadowSmooth(light RID.CanvasLight, smooth Float.X)

Smoothens the shadow. The lower, the smoother.

func CanvasLightSetTexture

func CanvasLightSetTexture(light RID.CanvasLight, texture RID.CanvasTexture)

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

func CanvasLightSetTextureOffset

func CanvasLightSetTextureOffset(light RID.CanvasLight, offset Vector2.XY)

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

func CanvasLightSetTextureScale

func CanvasLightSetTextureScale(light RID.CanvasLight, scale Float.X)

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

func CanvasLightSetTransform

func CanvasLightSetTransform(light RID.CanvasLight, transform Transform2D.OriginXY)

Sets the canvas light's Transform2D.OriginXY.

func CanvasLightSetZRange

func CanvasLightSetZRange(light RID.CanvasLight, min_z int, max_z int)

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

func CanvasLightTransformPhysicsInterpolation

func CanvasLightTransformPhysicsInterpolation(light RID.CanvasLight, transform Transform2D.OriginXY)

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.

func CanvasOccluderPolygonCreate

func CanvasOccluderPolygonCreate() RID.CanvasLightOccluderPolygon

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 FreeRid method.

Note: The equivalent resource is OccluderPolygon2D.

func CanvasOccluderPolygonSetCullMode

func CanvasOccluderPolygonSetCullMode(occluder_polygon RID.CanvasLightOccluderPolygon, mode CanvasOccluderPolygonCullMode)

Sets an occluder polygon's cull mode.

func CanvasOccluderPolygonSetShape

func CanvasOccluderPolygonSetShape(occluder_polygon RID.CanvasLightOccluderPolygon, shape []Vector2.XY, closed bool)

Sets the shape of the occluder polygon.

func CanvasSetDisableScale

func CanvasSetDisableScale(disable bool)

func CanvasSetItemMirroring

func CanvasSetItemMirroring(canvas RID.Canvas, item RID.CanvasItem, mirroring Vector2.XY)

A copy of the canvas item will be drawn with a local offset of the 'mirroring'.

Note: This is equivalent to calling CanvasSetItemRepeat like canvas_set_item_repeat(item, mirroring, 1), with an additional check ensuring 'canvas' is a parent of 'item'.

func CanvasSetItemRepeat

func CanvasSetItemRepeat(item RID.CanvasItem, repeat_size Vector2.XY, repeat_times int)

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.

func CanvasSetModulate

func CanvasSetModulate(canvas RID.Canvas, color Color.RGBA)

Modulates all colors in the given canvas.

func CanvasSetShadowTextureSize

func CanvasSetShadowTextureSize(size int)

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.

func CanvasTextureCreate

func CanvasTextureCreate() RID.CanvasTexture

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 FreeRid method. See also Texture2dCreate.

Note: The equivalent resource is CanvasTexture and is only meant to be used in 2D rendering, not 3D.

func CanvasTextureSetChannel

func CanvasTextureSetChannel(canvas_texture RID.CanvasTexture, channel CanvasTextureChannel, texture RID.CanvasTexture)

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

func CanvasTextureSetShadingParameters

func CanvasTextureSetShadingParameters(canvas_texture RID.CanvasTexture, base_color Color.RGBA, shininess Float.X)

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.

func CanvasTextureSetTextureFilter

func CanvasTextureSetTextureFilter(canvas_texture RID.CanvasTexture, filter CanvasItemTextureFilter)

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

func CanvasTextureSetTextureRepeat

func CanvasTextureSetTextureRepeat(canvas_texture RID.CanvasTexture, repeat CanvasItemTextureRepeat)

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

func CompositorCreate

func CompositorCreate() RID.Compositor

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 FreeRid method.

func CompositorEffectCreate

func CompositorEffectCreate() RID.CompositorEffect

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 FreeRid method.

func CompositorEffectSetCallback

func CompositorEffectSetCallback(effect RID.CompositorEffect, callback_type CompositorEffectCallbackType, callback func())

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

func CompositorEffectSetEnabled

func CompositorEffectSetEnabled(effect RID.CompositorEffect, enabled bool)

Enables/disables this rendering effect.

func CompositorEffectSetFlag

func CompositorEffectSetFlag(effect RID.CompositorEffect, flag CompositorEffectFlags, set bool)

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

func CompositorSetCompositorEffects

func CompositorSetCompositorEffects(compositor RID.Compositor, effects [][]RID.CompositorEffect)

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

func CreateLocalRenderingDevice

func CreateLocalRenderingDevice() RenderingDevice.Instance

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.

func DebugCanvasItemGetRect

func DebugCanvasItemGetRect(item RID.CanvasItem) Rect2.PositionSize

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.PositionSize in exported projects.

func DecalCreate

func DecalCreate() RID.Decal

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 FreeRid method.

To place in a scene, attach this decal to an instance using InstanceSetBase using the returned RID.

Note: The equivalent node is Decal.

func DecalSetAlbedoMix

func DecalSetAlbedoMix(decal RID.Decal, albedo_mix Float.X)

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

func DecalSetCullMask

func DecalSetCullMask(decal RID.Decal, mask int)

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

func DecalSetDistanceFade

func DecalSetDistanceFade(decal RID.Decal, enabled bool, begin Float.X, length Float.X)

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

func DecalSetEmissionEnergy

func DecalSetEmissionEnergy(decal RID.Decal, energy Float.X)

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

func DecalSetFade

func DecalSetFade(decal RID.Decal, above Float.X, below Float.X)

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

func DecalSetModulate

func DecalSetModulate(decal RID.Decal, color Color.RGBA)

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

func DecalSetNormalFade

func DecalSetNormalFade(decal RID.Decal, fade Float.X)

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

func DecalSetSize

func DecalSetSize(decal RID.Decal, size Vector3.XYZ)

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

func DecalSetTexture

func DecalSetTexture(decal RID.Decal, atype DecalTexture, texture RID.Texture)

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

func DecalsSetFilter

func DecalsSetFilter(filter DecalFilter)

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

func DirectionalLightCreate

func DirectionalLightCreate() RID.Light

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 FreeRid method.

To place in a scene, attach this directional light to an instance using InstanceSetBase using the returned RID.

Note: The equivalent node is DirectionalLight3D.

func DirectionalShadowAtlasSetSize

func DirectionalShadowAtlasSetSize(size int, is_16bits bool)

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.

func DirectionalSoftShadowFilterSetQuality

func DirectionalSoftShadowFilterSetQuality(quality ShadowQuality)

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.

func EnvironmentBakePanorama

func EnvironmentBakePanorama(environment RID.Environment, bake_irradiance bool, size Vector2i.XY) Image.Instance

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 SkyBakePanorama.

Note: The image is saved in linear color space 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.

func EnvironmentCreate

func EnvironmentCreate() RID.Environment

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 FreeRid method.

Note: The equivalent resource is Environment.

func EnvironmentGlowSetUseBicubicUpscale

func EnvironmentGlowSetUseBicubicUpscale(enable bool)

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.

func EnvironmentSetAdjustment

func EnvironmentSetAdjustment(env RID.Environment, enable bool, brightness Float.X, contrast Float.X, saturation Float.X, use_1d_color_correction bool, color_correction RID.ColorCorrection)

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

func EnvironmentSetAmbientLight

func EnvironmentSetAmbientLight(env RID.Environment, color Color.RGBA, ambient EnvironmentAmbientSource, sky_contribution Float.X, reflection_source EnvironmentReflectionSource)

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

func EnvironmentSetAmbientLightOptions

func EnvironmentSetAmbientLightOptions(env RID.Environment, color Color.RGBA, ambient EnvironmentAmbientSource, energy Float.X, sky_contribution Float.X, reflection_source EnvironmentReflectionSource)

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

func EnvironmentSetBackground

func EnvironmentSetBackground(env RID.Environment, bg EnvironmentBG)

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

func EnvironmentSetBgColor

func EnvironmentSetBgColor(env RID.Environment, color Color.RGBA)

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

func EnvironmentSetBgEnergy

func EnvironmentSetBgEnergy(env RID.Environment, multiplier Float.X, exposure_value Float.X)

Sets the intensity of the background color.

func EnvironmentSetCameraId

func EnvironmentSetCameraId(env RID.Environment, id int)

Sets the camera ID to be used as environment background.

func EnvironmentSetCanvasMaxLayer

func EnvironmentSetCanvasMaxLayer(env RID.Environment, max_layer int)

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

func EnvironmentSetFog

func EnvironmentSetFog(env RID.Environment, enable bool, light_color Color.RGBA, light_energy Float.X, sun_scatter Float.X, density Float.X, height Float.X, height_density Float.X, aerial_perspective Float.X, sky_affect Float.X, fog_mode EnvironmentFogMode)

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

func EnvironmentSetFogDepth

func EnvironmentSetFogDepth(env RID.Environment, curve Float.X, begin Float.X, end Float.X)

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

func EnvironmentSetGlow

func EnvironmentSetGlow(env RID.Environment, enable bool, levels []float32, intensity Float.X, strength Float.X, mix Float.X, bloom_threshold Float.X, blend_mode EnvironmentGlowBlendMode, hdr_bleed_threshold Float.X, hdr_bleed_scale Float.X, hdr_luminance_cap Float.X, glow_map_strength Float.X, glow_map RID.Texture)

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

func EnvironmentSetSdfgi

func EnvironmentSetSdfgi(env RID.Environment, enable bool, cascades int, min_cell_size Float.X, y_scale EnvironmentSDFGIYScale, use_occlusion bool, bounce_feedback Float.X, read_sky bool, energy Float.X, normal_bias Float.X, probe_bias Float.X)

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

func EnvironmentSetSdfgiFramesToConverge

func EnvironmentSetSdfgiFramesToConverge(frames EnvironmentSDFGIFramesToConverge)

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

func EnvironmentSetSdfgiFramesToUpdateLight

func EnvironmentSetSdfgiFramesToUpdateLight(frames EnvironmentSDFGIFramesToUpdateLight)

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".

func EnvironmentSetSdfgiRayCount

func EnvironmentSetSdfgiRayCount(ray_count EnvironmentSDFGIRayCount)

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".

func EnvironmentSetSky

func EnvironmentSetSky(env RID.Environment, sky RID.Sky)

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

func EnvironmentSetSkyCustomFov

func EnvironmentSetSkyCustomFov(env RID.Environment, scale Float.X)

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

func EnvironmentSetSkyOrientation

func EnvironmentSetSkyOrientation(env RID.Environment, orientation Basis.XYZ)

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

func EnvironmentSetSsao

func EnvironmentSetSsao(env RID.Environment, enable bool, radius Float.X, intensity Float.X, power Float.X, detail Float.X, horizon Float.X, sharpness Float.X, light_affect Float.X, ao_channel_affect Float.X)

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

func EnvironmentSetSsaoQuality

func EnvironmentSetSsaoQuality(quality EnvironmentSSAOQuality, half_size bool, adaptive_target Float.X, blur_passes int, fadeout_from Float.X, fadeout_to Float.X)

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

func EnvironmentSetSsilQuality

func EnvironmentSetSsilQuality(quality EnvironmentSSILQuality, half_size bool, adaptive_target Float.X, blur_passes int, fadeout_from Float.X, fadeout_to Float.X)

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

func EnvironmentSetSsr

func EnvironmentSetSsr(env RID.Environment, enable bool, max_steps int, fade_in Float.X, fade_out Float.X, depth_tolerance Float.X)

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

func EnvironmentSetSsrRoughnessQuality

func EnvironmentSetSsrRoughnessQuality(quality EnvironmentSSRRoughnessQuality)

func EnvironmentSetTonemap

func EnvironmentSetTonemap(env RID.Environment, tone_mapper EnvironmentToneMapper, exposure Float.X, white Float.X)

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

func EnvironmentSetVolumetricFog

func EnvironmentSetVolumetricFog(env RID.Environment, enable bool, density Float.X, albedo Color.RGBA, emission Color.RGBA, emission_energy Float.X, anisotropy Float.X, length Float.X, p_detail_spread Float.X, gi_inject Float.X, temporal_reprojection bool, temporal_reprojection_amount Float.X, ambient_inject Float.X, sky_affect Float.X)

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

func EnvironmentSetVolumetricFogFilterActive

func EnvironmentSetVolumetricFogFilterActive(active bool)

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

func EnvironmentSetVolumetricFogVolumeSize

func EnvironmentSetVolumetricFogVolumeSize(size int, depth int)

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.

func FogVolumeCreate

func FogVolumeCreate() RID.FogVolume

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 FreeRid method.

Note: The equivalent node is FogVolume.

func FogVolumeSetMaterial

func FogVolumeSetMaterial(fog_volume RID.FogVolume, material RID.Material)

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

func FogVolumeSetShape

func FogVolumeSetShape(fog_volume RID.FogVolume, shape FogVolumeShape)

Sets the shape of the fog volume to either [Renderingserver.FogVolumeShapeEllipsoid], [Renderingserver.FogVolumeShapeCone], [Renderingserver.FogVolumeShapeCylinder], [Renderingserver.FogVolumeShapeBox] or [Renderingserver.FogVolumeShapeWorld].

func FogVolumeSetSize

func FogVolumeSetSize(fog_volume RID.FogVolume, size Vector3.XYZ)

Sets the size of the fog volume when shape is [Renderingserver.FogVolumeShapeEllipsoid], [Renderingserver.FogVolumeShapeCone], [Renderingserver.FogVolumeShapeCylinder] or [Renderingserver.FogVolumeShapeBox].

func ForceDraw

func ForceDraw(frame_step Float.X)

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

func ForceDrawOptions

func ForceDrawOptions(swap_buffers bool, frame_step Float.X)

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

func ForceSync

func 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.

func FreeRid

func FreeRid(rid RID.Any)

Tries to free an object in the RenderingServer. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingServer directly.

func GetCurrentRenderingDriverName

func GetCurrentRenderingDriverName() string

Returns the name of the current rendering driver. This can be vulkan, d3d12, metal, opengl3, opengl3_es, or opengl3_angle. See also GetCurrentRenderingMethod.

When ProjectSettings "rendering/renderer/rendering_method" is forward_plus or mobile, the rendering driver is determined by ProjectSettings "rendering/rendering_device/driver".

When ProjectSettings "rendering/renderer/rendering_method" is gl_compatibility, the rendering driver is determined by ProjectSettings "rendering/gl_compatibility/driver".

The rendering driver is also determined by the --rendering-driver command line argument that overrides this project setting, or an automatic fallback that is applied depending on the hardware.

func GetCurrentRenderingMethod

func GetCurrentRenderingMethod() string

Returns the name of the current rendering method. This can be forward_plus, mobile, or gl_compatibility. See also GetCurrentRenderingDriverName.

The rendering method is determined by ProjectSettings "rendering/renderer/rendering_method", the --rendering-method command line argument that overrides this project setting, or an automatic fallback that is applied depending on the hardware.

func GetDefaultClearColor

func GetDefaultClearColor() Color.RGBA

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

func GetFrameSetupTimeCpu

func GetFrameSetupTimeCpu() Float.X

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

func GetRenderingDevice

func GetRenderingDevice() RenderingDevice.Instance

Returns the global RenderingDevice.

Note: When using the OpenGL rendering driver or when running in headless mode, this function always returns null.

func GetRenderingInfo

func GetRenderingInfo(info RenderingInfo) int

Returns a statistic about the rendering engine which can be used for performance profiling. See also 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, GetRenderingInfo returns 0. To print rendering information in _ready() successfully, use the following:

if Engine.GetFramesDrawn() == 2 {
	fmt.Println(RenderingServer.GetRenderingInfo(RenderingServer.RenderingInfoTotalDrawCallsInFrame))
}

func GetShaderParameterList

func GetShaderParameterList(shader RID.Shader) []map[string]interface{}

Returns the parameters of a shader.

func GetTestCube

func GetTestCube() RID.Mesh

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

func GetTestTexture

func GetTestTexture() RID.Texture

Returns the RID of a 256×256 texture with a testing pattern on it (in [Image.FormatRgb8] format). This texture will be created and returned on the first call to GetTestTexture, then it will be cached for subsequent calls. See also GetWhiteTexture.

Example: Get the test texture and apply it to a Sprite2D node:

var texture_rid = RenderingServer.GetTestTexture()
var texture = ImageTexture.CreateFromImage(RenderingServer.Texture2dGet(RID.Texture2D(texture_rid)))
sprite.SetTexture(texture.AsTexture2D())

func GetVideoAdapterApiVersion

func GetVideoAdapterApiVersion() string

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 Godot 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.

func GetVideoAdapterName

func GetVideoAdapterName() string

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.

func GetVideoAdapterType

func GetVideoAdapterType() Rendering.DeviceType

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.DeviceTypeOther].

func GetVideoAdapterVendor

func GetVideoAdapterVendor() string

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.

func GetWhiteTexture

func GetWhiteTexture() RID.Texture

Returns the ID of a 4×4 white texture (in [Image.FormatRgb8] format). This texture will be created and returned on the first call to GetWhiteTexture, then it will be cached for subsequent calls. See also GetTestTexture.

Example: Get the white texture and apply it to a Sprite2D node:

var texture_rid = RenderingServer.GetWhiteTexture()
var texture = ImageTexture.CreateFromImage(RenderingServer.Texture2dGet(RID.Texture2D(texture_rid)))
sprite.SetTexture(texture.AsTexture2D())

func GiSetUseHalfResolution

func GiSetUseHalfResolution(half_resolution bool)

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".

func GlobalShaderParameterAdd

func GlobalShaderParameterAdd(name string, atype GlobalShaderParameterType, default_value any)

Creates a new global shader uniform.

Note: Global shader parameter names are case-sensitive.

func GlobalShaderParameterGet

func GlobalShaderParameterGet(name string) any

Returns the value of the global shader uniform specified by 'name'.

Note: GlobalShaderParameterGet has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters.

func GlobalShaderParameterGetList

func GlobalShaderParameterGetList() []string

Returns the list of global shader uniform names.

Note: GlobalShaderParameterGet has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters.

func GlobalShaderParameterRemove

func GlobalShaderParameterRemove(name string)

Removes the global shader uniform specified by 'name'.

func GlobalShaderParameterSet

func GlobalShaderParameterSet(name string, value any)

Sets the global shader uniform 'name' to 'value'.

func GlobalShaderParameterSetOverride

func GlobalShaderParameterSetOverride(name string, value any)

Overrides the global shader uniform 'name' with 'value'. Equivalent to the ShaderGlobalsOverride node.

func HasChanged

func HasChanged() bool

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

func HasFeature

func HasFeature(feature Features) bool

This method does nothing and always returns false.

func HasOsFeature

func HasOsFeature(feature string) bool

Returns true if the OS supports a certain 'feature'. Features might be s3tc, etc, and etc2.

func InstanceAttachObjectInstanceId

func InstanceAttachObjectInstanceId(instance RID.VisualInstance, id int)

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

func InstanceAttachSkeleton

func InstanceAttachSkeleton(instance RID.VisualInstance, skeleton RID.Skeleton)

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

func InstanceCreate

func InstanceCreate() RID.VisualInstance

Creates a visual instance and adds it to the RenderingServer. 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 FreeRid method.

An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, reflection probes and decals need to be associated with an instance to be visible in the scenario using InstanceSetBase.

Note: The equivalent node is VisualInstance3D.

func InstanceCreate2

func InstanceCreate2(base RID.VisualInstance, scenario RID.Scenario) RID.VisualInstance

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 FreeRid method. This is a shorthand for using InstanceCreate and setting the base and scenario manually.

func InstanceGeometryGetShaderParameter

func InstanceGeometryGetShaderParameter(instance RID.VisualInstance, parameter string) any

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.

func InstanceGeometryGetShaderParameterDefaultValue

func InstanceGeometryGetShaderParameterDefaultValue(instance RID.VisualInstance, parameter string) any

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

func InstanceGeometryGetShaderParameterList

func InstanceGeometryGetShaderParameterList(instance RID.VisualInstance) []map[string]interface{}

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.

func InstanceGeometrySetCastShadowsSetting

func InstanceGeometrySetCastShadowsSetting(instance RID.VisualInstance, shadow_casting_setting ShadowCastingSetting)

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

func InstanceGeometrySetFlag

func InstanceGeometrySetFlag(instance RID.VisualInstance, flag InstanceFlags, enabled bool)

Sets the 'flag' for a given 'instance' to 'enabled'.

func InstanceGeometrySetLightmap

func InstanceGeometrySetLightmap(instance RID.VisualInstance, lightmap RID.Lightmap, lightmap_uv_scale Rect2.PositionSize, lightmap_slice int)

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.

func InstanceGeometrySetLodBias

func InstanceGeometrySetLodBias(instance RID.VisualInstance, lod_bias Float.X)

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.

func InstanceGeometrySetMaterialOverlay

func InstanceGeometrySetMaterialOverlay(instance RID.VisualInstance, material RID.Material)

Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to GeometryInstance3D.MaterialOverlay.

func InstanceGeometrySetMaterialOverride

func InstanceGeometrySetMaterialOverride(instance RID.VisualInstance, material RID.Material)

Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to GeometryInstance3D.MaterialOverride.

func InstanceGeometrySetShaderParameter

func InstanceGeometrySetShaderParameter(instance RID.VisualInstance, parameter string, value any)

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

func InstanceGeometrySetTransparency

func InstanceGeometrySetTransparency(instance RID.VisualInstance, transparency Float.X)

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.

func InstanceGeometrySetVisibilityRange

func InstanceGeometrySetVisibilityRange(instance RID.VisualInstance, min Float.X, max Float.X, min_margin Float.X, max_margin Float.X, fade_mode VisibilityRangeFadeMode)

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

func InstanceSetBase

func InstanceSetBase(instance RID.VisualInstance, base RID.VisualInstance)

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.

func InstanceSetBlendShapeWeight

func InstanceSetBlendShapeWeight(instance RID.VisualInstance, shape int, weight Float.X)

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

func InstanceSetCustomAabb

func InstanceSetCustomAabb(instance RID.VisualInstance, aabb AABB.PositionSize)

Sets a custom AABB to use when culling objects from the view frustum. Equivalent to setting GeometryInstance3D.CustomAabb.

func InstanceSetExtraVisibilityMargin

func InstanceSetExtraVisibilityMargin(instance RID.VisualInstance, margin Float.X)

Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to GeometryInstance3D.ExtraCullMargin.

func InstanceSetIgnoreCulling

func InstanceSetIgnoreCulling(instance RID.VisualInstance, enabled bool)

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

func InstanceSetLayerMask

func InstanceSetLayerMask(instance RID.VisualInstance, mask int)

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

func InstanceSetPivotData

func InstanceSetPivotData(instance RID.VisualInstance, sorting_offset Float.X, use_aabb_center bool)

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

func InstanceSetScenario

func InstanceSetScenario(instance RID.VisualInstance, scenario RID.Scenario)

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

func InstanceSetSurfaceOverrideMaterial

func InstanceSetSurfaceOverrideMaterial(instance RID.VisualInstance, surface int, material RID.Material)

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

func InstanceSetTransform

func InstanceSetTransform(instance RID.VisualInstance, transform Transform3D.BasisOrigin)

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

func InstanceSetVisibilityParent

func InstanceSetVisibilityParent(instance RID.VisualInstance, parent RID.VisualInstance)

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

func InstanceSetVisible

func InstanceSetVisible(instance RID.VisualInstance, visible bool)

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

func InstanceTeleport

func InstanceTeleport(instance RID.VisualInstance)

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

func InstancesCullAabb

func InstancesCullAabb(aabb AABB.PositionSize, scenario RID.Scenario) []int64

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.InstanceFromId 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.

func InstancesCullConvex

func InstancesCullConvex(convex []Plane.NormalD, scenario RID.Scenario) []int64

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.InstanceFromId 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.

func InstancesCullRay

func InstancesCullRay(from Vector3.XYZ, to Vector3.XYZ, scenario RID.Scenario) []int64

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.InstanceFromId 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.

func IsOnRenderThread

func IsOnRenderThread() bool

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

func LightDirectionalSetBlendSplits

func LightDirectionalSetBlendSplits(light RID.Light, enable bool)

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

func LightDirectionalSetShadowMode

func LightDirectionalSetShadowMode(light RID.Light, mode LightDirectionalShadowMode)

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

func LightDirectionalSetSkyMode

func LightDirectionalSetSkyMode(light RID.Light, mode LightDirectionalSkyMode)

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.

func LightOmniSetShadowMode

func LightOmniSetShadowMode(light RID.Light, mode LightOmniShadowMode)

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.

func LightProjectorsSetFilter

func LightProjectorsSetFilter(filter LightProjectorFilter)

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

func LightSetBakeMode

func LightSetBakeMode(light RID.Light, bake_mode LightBakeMode)

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

func LightSetColor

func LightSetColor(light RID.Light, color Color.RGBA)

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

func LightSetCullMask

func LightSetCullMask(light RID.Light, mask int)

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

func LightSetDistanceFade

func LightSetDistanceFade(decal RID.Light, enabled bool, begin Float.X, shadow Float.X, length Float.X)

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.

func LightSetMaxSdfgiCascade

func LightSetMaxSdfgiCascade(light RID.Light, cascade int)

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.

func LightSetNegative

func LightSetNegative(light RID.Light, enable bool)

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

func LightSetParam

func LightSetParam(light RID.Light, param LightParam, value Float.X)

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

func LightSetProjector

func LightSetProjector(light RID.Light, texture RID.Texture)

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

func LightSetReverseCullFaceMode

func LightSetReverseCullFaceMode(light RID.Light, enabled bool)

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 InstanceGeometrySetCastShadowsSetting. Equivalent to Light3D.ShadowReverseCullFace.

func LightSetShadow

func LightSetShadow(light RID.Light, enabled bool)

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

func LightSetShadowCasterMask

func LightSetShadowCasterMask(light RID.Light, mask int)

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

func LightmapCreate

func LightmapCreate() RID.Lightmap

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 FreeRid method.

Note: The equivalent node is LightmapGI.

func LightmapGetProbeCaptureBspTree

func LightmapGetProbeCaptureBspTree(lightmap RID.Lightmap) []int32

func LightmapGetProbeCapturePoints

func LightmapGetProbeCapturePoints(lightmap RID.Lightmap) []Vector3.XYZ

func LightmapGetProbeCaptureSh

func LightmapGetProbeCaptureSh(lightmap RID.Lightmap) []Color.RGBA

func LightmapGetProbeCaptureTetrahedra

func LightmapGetProbeCaptureTetrahedra(lightmap RID.Lightmap) []int32

func LightmapSetBakedExposureNormalization

func LightmapSetBakedExposureNormalization(lightmap RID.Lightmap, baked_exposure Float.X)

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 CameraAttributesSetExposure.

func LightmapSetProbeBounds

func LightmapSetProbeBounds(lightmap RID.Lightmap, bounds AABB.PositionSize)

func LightmapSetProbeCaptureData

func LightmapSetProbeCaptureData(lightmap RID.Lightmap, points []Vector3.XYZ, point_sh []Color.RGBA, tetrahedra []int32, bsp_tree []int32)

func LightmapSetProbeCaptureUpdateSpeed

func LightmapSetProbeCaptureUpdateSpeed(speed Float.X)

func LightmapSetProbeInterior

func LightmapSetProbeInterior(lightmap RID.Lightmap, interior bool)

func LightmapSetTextures

func LightmapSetTextures(lightmap RID.Lightmap, light RID.Light, uses_sh bool)

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.

func LightmapsSetBicubicFilter

func LightmapsSetBicubicFilter(enable bool)

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

func MakeSphereMesh

func MakeSphereMesh(latitudes int, longitudes int, radius Float.X) RID.Mesh

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

func MaterialCreate

func MaterialCreate() RID.Material

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 FreeRid method.

Note: The equivalent resource is Material.

func MaterialGetParam

func MaterialGetParam(material RID.Material, parameter string) any

Returns the value of a certain material's parameter.

func MaterialSetNextPass

func MaterialSetNextPass(material RID.Material, next_material RID.Material)

Sets an object's next material.

func MaterialSetParam

func MaterialSetParam(material RID.Material, parameter string, value any)

Sets a material's parameter.

func MaterialSetRenderPriority

func MaterialSetRenderPriority(material RID.Material, priority int)

Sets a material's render priority.

func MaterialSetShader

func MaterialSetShader(shader_material RID.Material, shader RID.Shader)

Sets a shader material's shader.

func MeshAddSurface

func MeshAddSurface(mesh RID.Mesh, surface Surface)

func MeshAddSurfaceFromArrays

func MeshAddSurfaceFromArrays(mesh RID.Mesh, primitive PrimitiveType, arrays []any, blend_shapes [][]interface{}, lods map[float32][]int32, compress_format ArrayFormat)

func MeshClear

func MeshClear(mesh RID.Mesh)

Removes all surfaces from a mesh.

func MeshCreate

func MeshCreate() RID.Mesh

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 FreeRid method.

To place in a scene, attach this mesh to an instance using InstanceSetBase using the returned RID.

Note: The equivalent resource is Mesh.

func MeshCreateFromSurfaces

func MeshCreateFromSurfaces(surfaces []Surface, blend_shape_count int) RID.Mesh

func MeshGetBlendShapeCount

func MeshGetBlendShapeCount(mesh RID.Mesh) int

Returns a mesh's blend shape count.

func MeshGetCustomAabb

func MeshGetCustomAabb(mesh RID.Mesh) AABB.PositionSize

Returns a mesh's custom aabb.

func MeshGetSurfaceCount

func MeshGetSurfaceCount(mesh RID.Mesh) int

Returns a mesh's number of surfaces.

func MeshSetBlendShapeMode

func MeshSetBlendShapeMode(mesh RID.Mesh, mode BlendShapeMode)

Sets a mesh's blend shape mode.

func MeshSetCustomAabb

func MeshSetCustomAabb(mesh RID.Mesh, aabb AABB.PositionSize)

Sets a mesh's custom aabb.

func MeshSetShadowMesh

func MeshSetShadowMesh(mesh RID.Mesh, shadow_mesh RID.Mesh)

func MeshSurfaceGetArrays

func MeshSurfaceGetArrays(mesh RID.Mesh, surface int) []any

Returns a mesh's surface's buffer arrays.

func MeshSurfaceGetBlendShapeArrays

func MeshSurfaceGetBlendShapeArrays(mesh RID.Mesh, surface int) [][][]interface{}

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

func MeshSurfaceGetFormatAttributeStride

func MeshSurfaceGetFormatAttributeStride(format ArrayFormat, vertex_count int) int

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

func MeshSurfaceGetFormatIndexStride

func MeshSurfaceGetFormatIndexStride(format ArrayFormat, vertex_count int) int

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

func MeshSurfaceGetFormatNormalTangentStride

func MeshSurfaceGetFormatNormalTangentStride(format ArrayFormat, vertex_count int) int

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.

func MeshSurfaceGetFormatOffset

func MeshSurfaceGetFormatOffset(format ArrayFormat, vertex_count int, array_index int) int

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

func MeshSurfaceGetFormatSkinStride

func MeshSurfaceGetFormatSkinStride(format ArrayFormat, vertex_count int) int

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

func MeshSurfaceGetFormatVertexStride

func MeshSurfaceGetFormatVertexStride(format ArrayFormat, vertex_count int) int

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).

func MeshSurfaceGetMaterial

func MeshSurfaceGetMaterial(mesh RID.Mesh, surface int) RID.Material

Returns a mesh's surface's material.

func MeshSurfaceRemove

func MeshSurfaceRemove(mesh RID.Mesh, surface int)

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

func MeshSurfaceSetMaterial

func MeshSurfaceSetMaterial(mesh RID.Mesh, surface int, material RID.Material)

Sets a mesh's surface's material.

func MeshSurfaceUpdateAttributeRegion

func MeshSurfaceUpdateAttributeRegion(mesh RID.Mesh, surface int, offset int, data []byte)

func MeshSurfaceUpdateIndexRegion

func MeshSurfaceUpdateIndexRegion(mesh RID.Mesh, surface int, offset int, data []byte)

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 MeshSurfaceGetFormatIndexStride.

func MeshSurfaceUpdateSkinRegion

func MeshSurfaceUpdateSkinRegion(mesh RID.Mesh, surface int, offset int, data []byte)

func MeshSurfaceUpdateVertexRegion

func MeshSurfaceUpdateVertexRegion(mesh RID.Mesh, surface int, offset int, data []byte)

func MultimeshAllocateData

func MultimeshAllocateData(multimesh RID.MultiMesh, instances int, transform_format MultimeshTransformFormat, color_format bool, custom_data_format bool, use_indirect bool)

func MultimeshCreate

func MultimeshCreate() RID.MultiMesh

Creates a new multimesh on the RenderingServer and returns an Resource.ID 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 FreeRid method.

To place in a scene, attach this multimesh to an instance using InstanceSetBase using the returned RID.

Note: The equivalent resource is MultiMesh.

func MultimeshGetAabb

func MultimeshGetAabb(multimesh RID.MultiMesh) AABB.PositionSize

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

func MultimeshGetBuffer

func MultimeshGetBuffer(multimesh RID.MultiMesh) []float32

Returns the MultiMesh data (such as instance transforms, colors, etc.). See 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 MultimeshGetBuffer is potentially a slow operation and should be avoided whenever possible.

func MultimeshGetBufferRdRid

func MultimeshGetBufferRdRid(multimesh RID.MultiMesh) RID.Buffer

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

func MultimeshGetCommandBufferRdRid

func MultimeshGetCommandBufferRdRid(multimesh RID.MultiMesh) RID.Buffer

Returns the RenderingDevice Resource.ID handle of the MultiMesh command buffer. This Resource.ID is only valid if use_indirect is set to true when allocating data through 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:

func MultimeshGetCustomAabb

func MultimeshGetCustomAabb(multimesh RID.MultiMesh) AABB.PositionSize

Returns the custom AABB defined for this MultiMesh resource.

func MultimeshGetInstanceCount

func MultimeshGetInstanceCount(multimesh RID.MultiMesh) int

Returns the number of instances allocated for this multimesh.

func MultimeshGetMesh

func MultimeshGetMesh(multimesh RID.MultiMesh) RID.Mesh

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

func MultimeshGetVisibleInstances

func MultimeshGetVisibleInstances(multimesh RID.MultiMesh) int

Returns the number of visible instances for this multimesh.

func MultimeshInstanceGetColor

func MultimeshInstanceGetColor(multimesh RID.MultiMesh, index int) Color.RGBA

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

func MultimeshInstanceGetCustomData

func MultimeshInstanceGetCustomData(multimesh RID.MultiMesh, index int) Color.RGBA

Returns the custom data associated with the specified instance.

func MultimeshInstanceGetTransform

func MultimeshInstanceGetTransform(multimesh RID.MultiMesh, index int) Transform3D.BasisOrigin

Returns the Transform3D.BasisOrigin of the specified instance.

func MultimeshInstanceGetTransform2d

func MultimeshInstanceGetTransform2d(multimesh RID.MultiMesh, index int) Transform2D.OriginXY

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

func MultimeshInstanceResetPhysicsInterpolation

func MultimeshInstanceResetPhysicsInterpolation(multimesh RID.MultiMesh, index int)

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.

func MultimeshInstanceSetColor

func MultimeshInstanceSetColor(multimesh RID.MultiMesh, index int, color Color.RGBA)

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

func MultimeshInstanceSetCustomData

func MultimeshInstanceSetCustomData(multimesh RID.MultiMesh, index int, custom_data Color.RGBA)

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

func MultimeshInstanceSetTransform

func MultimeshInstanceSetTransform(multimesh RID.MultiMesh, index int, transform Transform3D.BasisOrigin)

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

func MultimeshInstanceSetTransform2d

func MultimeshInstanceSetTransform2d(multimesh RID.MultiMesh, index int, transform Transform2D.OriginXY)

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

func MultimeshSetBuffer

func MultimeshSetBuffer(multimesh RID.MultiMesh, buffer []float32)

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 MultimeshGetBuffer.

The per-instance data size and expected data order is:

Instance transforms are in row-major order. Specifically:

- For Transform2D.OriginXY the float-order is: (x.x, y.x, padding_float, origin.x, x.y, y.y, padding_float, origin.y).

- For Transform3D.BasisOrigin 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).

func MultimeshSetBufferInterpolated

func MultimeshSetBufferInterpolated(multimesh RID.MultiMesh, buffer []float32, buffer_previous []float32)

Alternative version of MultimeshSetBuffer for use with physics interpolation.

Takes both an array of current data and an array of data for the previous physics tick.

func MultimeshSetCustomAabb

func MultimeshSetCustomAabb(multimesh RID.MultiMesh, aabb AABB.PositionSize)

Sets the custom AABB for this MultiMesh resource.

func MultimeshSetMesh

func MultimeshSetMesh(multimesh RID.MultiMesh, mesh RID.Mesh)

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

func MultimeshSetPhysicsInterpolated

func MultimeshSetPhysicsInterpolated(multimesh RID.MultiMesh, interpolated bool)

Turns on and off physics interpolation for this MultiMesh resource.

func MultimeshSetPhysicsInterpolationQuality

func MultimeshSetPhysicsInterpolationQuality(multimesh RID.MultiMesh, quality MultimeshPhysicsInterpolationQuality)

Sets the physics interpolation quality for the MultiMesh.

A value of MultimeshInterpQualityFast gives fast but low quality interpolation, a value of MultimeshInterpQualityHigh gives slower but higher quality interpolation.

func MultimeshSetVisibleInstances

func MultimeshSetVisibleInstances(multimesh RID.MultiMesh, visible int)

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

func OccluderCreate

func OccluderCreate() RID.Occluder

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 FreeRid method.

Note: The equivalent resource is Occluder3D (not to be confused with the OccluderInstance3D node).

func OccluderSetMesh

func OccluderSetMesh(occluder RID.Occluder, vertices []Vector3.XYZ, indices []int32)

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

func OmniLightCreate

func OmniLightCreate() RID.Light

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 FreeRid method.

To place in a scene, attach this omni light to an instance using InstanceSetBase using the returned RID.

Note: The equivalent node is OmniLight3D.

func OnFramePostDraw

func OnFramePostDraw(cb func(), flags ...Signal.Flags)

Emitted at the end of the frame, after the RenderingServer has finished updating all the Viewports.

func OnFramePreDraw

func OnFramePreDraw(cb func(), flags ...Signal.Flags)

Emitted at the beginning of the frame, before the RenderingServer updates all the Viewports.

func ParticlesCollisionCreate

func ParticlesCollisionCreate() RID.ParticlesCollision

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.

func ParticlesCollisionHeightFieldUpdate

func ParticlesCollisionHeightFieldUpdate(particles_collision 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.

func ParticlesCollisionSetAttractorAttenuation

func ParticlesCollisionSetAttractorAttenuation(particles_collision RID.ParticlesCollision, curve Float.X)

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.

func ParticlesCollisionSetAttractorDirectionality

func ParticlesCollisionSetAttractorDirectionality(particles_collision RID.ParticlesCollision, amount Float.X)

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.

func ParticlesCollisionSetAttractorStrength

func ParticlesCollisionSetAttractorStrength(particles_collision RID.ParticlesCollision, strength Float.X)

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.

func ParticlesCollisionSetBoxExtents

func ParticlesCollisionSetBoxExtents(particles_collision RID.ParticlesCollision, extents Vector3.XYZ)

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.

func ParticlesCollisionSetCollisionType

func ParticlesCollisionSetCollisionType(particles_collision RID.ParticlesCollision, atype ParticlesCollisionType)

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

func ParticlesCollisionSetCullMask

func ParticlesCollisionSetCullMask(particles_collision RID.ParticlesCollision, mask int)

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.

func ParticlesCollisionSetFieldTexture

func ParticlesCollisionSetFieldTexture(particles_collision RID.ParticlesCollision, texture 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.

func ParticlesCollisionSetHeightFieldMask

func ParticlesCollisionSetHeightFieldMask(particles_collision RID.ParticlesCollision, mask int)

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

func ParticlesCollisionSetHeightFieldResolution

func ParticlesCollisionSetHeightFieldResolution(particles_collision RID.ParticlesCollision, resolution ParticlesCollisionHeightfieldResolution)

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

func ParticlesCollisionSetSphereRadius

func ParticlesCollisionSetSphereRadius(particles_collision RID.ParticlesCollision, radius Float.X)

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.

func ParticlesCreate

func ParticlesCreate() RID.Particles

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 FreeRid method.

To place in a scene, attach these particles to an instance using 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).

func ParticlesEmit

func ParticlesEmit(particles RID.Particles, transform Transform3D.BasisOrigin, velocity Vector3.XYZ, color Color.RGBA, custom Color.RGBA, emit_flags ParticlesEmitFlag)

Manually emits particles from the 'particles' instance.

func ParticlesGetCurrentAabb

func ParticlesGetCurrentAabb(particles RID.Particles) AABB.PositionSize

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

func ParticlesGetEmitting

func ParticlesGetEmitting(particles RID.Particles) bool

Returns true if particles are currently set to emitting.

func ParticlesIsInactive

func ParticlesIsInactive(particles RID.Particles) bool

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

func ParticlesRequestProcess

func ParticlesRequestProcess(particles 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 InstancesCullAabb, InstancesCullConvex, or InstancesCullRay.

func ParticlesRequestProcessTime

func ParticlesRequestProcessTime(particles RID.Particles, time Float.X)

Requests particles to process for extra process time during a single frame.

func ParticlesRestart

func ParticlesRestart(particles RID.Particles)

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

func ParticlesSetAmount

func ParticlesSetAmount(particles RID.Particles, amount int)

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

func ParticlesSetAmountRatio

func ParticlesSetAmountRatio(particles RID.Particles, ratio Float.X)

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

func ParticlesSetCollisionBaseSize

func ParticlesSetCollisionBaseSize(particles RID.Particles, size Float.X)

func ParticlesSetCustomAabb

func ParticlesSetCustomAabb(particles RID.Particles, aabb AABB.PositionSize)

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

func ParticlesSetDrawOrder

func ParticlesSetDrawOrder(particles RID.Particles, order ParticlesDrawOrder)

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

func ParticlesSetDrawPassMesh

func ParticlesSetDrawPassMesh(particles RID.Particles, pass int, mesh RID.Mesh)

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

func ParticlesSetDrawPasses

func ParticlesSetDrawPasses(particles RID.Particles, count int)

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

func ParticlesSetEmissionTransform

func ParticlesSetEmissionTransform(particles RID.Particles, transform Transform3D.BasisOrigin)

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

func ParticlesSetEmitterVelocity

func ParticlesSetEmitterVelocity(particles RID.Particles, velocity Vector3.XYZ)

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

func ParticlesSetEmitting

func ParticlesSetEmitting(particles RID.Particles, emitting bool)

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

func ParticlesSetExplosivenessRatio

func ParticlesSetExplosivenessRatio(particles RID.Particles, ratio Float.X)

Sets the explosiveness ratio. Equivalent to GPUParticles3D.Explosiveness.

func ParticlesSetFixedFps

func ParticlesSetFixedFps(particles RID.Particles, fps int)

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

func ParticlesSetFractionalDelta

func ParticlesSetFractionalDelta(particles RID.Particles, enable bool)

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

func ParticlesSetInterpToEnd

func ParticlesSetInterpToEnd(particles RID.Particles, factor Float.X)

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

func ParticlesSetInterpolate

func ParticlesSetInterpolate(particles RID.Particles, enable bool)

func ParticlesSetLifetime

func ParticlesSetLifetime(particles RID.Particles, lifetime Float.X)

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

func ParticlesSetMode

func ParticlesSetMode(particles RID.Particles, mode ParticlesMode)

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

func ParticlesSetOneShot

func ParticlesSetOneShot(particles RID.Particles, one_shot bool)

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

func ParticlesSetPreProcessTime

func ParticlesSetPreProcessTime(particles RID.Particles, time Float.X)

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.

func ParticlesSetProcessMaterial

func ParticlesSetProcessMaterial(particles RID.Particles, material RID.Material)

Sets the material for processing the particles.

Note: This is not the material used to draw the materials. Equivalent to GPUParticles3D.ProcessMaterial.

func ParticlesSetRandomnessRatio

func ParticlesSetRandomnessRatio(particles RID.Particles, ratio Float.X)

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

func ParticlesSetSpeedScale

func ParticlesSetSpeedScale(particles RID.Particles, scale Float.X)

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

func ParticlesSetSubemitter

func ParticlesSetSubemitter(particles RID.Particles, subemitter_particles RID.Particles)

func ParticlesSetTrailBindPoses

func ParticlesSetTrailBindPoses(particles RID.Particles, bind_poses []Transform3D.BasisOrigin)

func ParticlesSetTrails

func ParticlesSetTrails(particles RID.Particles, enable bool, length_sec Float.X)

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

func ParticlesSetTransformAlign

func ParticlesSetTransformAlign(particles RID.Particles, align ParticlesTransformAlign)

func ParticlesSetUseLocalCoordinates

func ParticlesSetUseLocalCoordinates(particles RID.Particles, enable bool)

If true, particles use local coordinates. If false they use global coordinates. Equivalent to GPUParticles3D.LocalCoords.

func PositionalSoftShadowFilterSetQuality

func PositionalSoftShadowFilterSetQuality(quality ShadowQuality)

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.

func ReflectionProbeCreate

func ReflectionProbeCreate() RID.ReflectionProbe

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 FreeRid method.

To place in a scene, attach this reflection probe to an instance using InstanceSetBase using the returned RID.

Note: The equivalent node is ReflectionProbe.

func ReflectionProbeSetAmbientColor

func ReflectionProbeSetAmbientColor(probe RID.ReflectionProbe, color Color.RGBA)

Sets the reflection probe's custom ambient light color. Equivalent to ReflectionProbe.AmbientColor.

func ReflectionProbeSetAmbientEnergy

func ReflectionProbeSetAmbientEnergy(probe RID.ReflectionProbe, energy Float.X)

Sets the reflection probe's custom ambient light energy. Equivalent to ReflectionProbe.AmbientColorEnergy.

func ReflectionProbeSetAmbientMode

func ReflectionProbeSetAmbientMode(probe RID.ReflectionProbe, mode ReflectionProbeAmbientMode)

Sets the reflection probe's ambient light mode. Equivalent to ReflectionProbe.AmbientMode.

func ReflectionProbeSetAsInterior

func ReflectionProbeSetAsInterior(probe RID.ReflectionProbe, enable bool)

If true, reflections will ignore sky contribution. Equivalent to ReflectionProbe.Interior.

func ReflectionProbeSetBlendDistance

func ReflectionProbeSetBlendDistance(probe RID.ReflectionProbe, blend_distance Float.X)

Sets the distance in meters over which a probe blends into the scene.

func ReflectionProbeSetCullMask

func ReflectionProbeSetCullMask(probe RID.ReflectionProbe, layers int)

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.

func ReflectionProbeSetEnableBoxProjection

func ReflectionProbeSetEnableBoxProjection(probe RID.ReflectionProbe, enable bool)

If true, uses box projection. This can make reflections look more correct in certain situations. Equivalent to ReflectionProbe.BoxProjection.

func ReflectionProbeSetEnableShadows

func ReflectionProbeSetEnableShadows(probe RID.ReflectionProbe, enable bool)

If true, computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to ReflectionProbe.EnableShadows.

func ReflectionProbeSetIntensity

func ReflectionProbeSetIntensity(probe RID.ReflectionProbe, intensity Float.X)

Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to ReflectionProbe.Intensity.

func ReflectionProbeSetMaxDistance

func ReflectionProbeSetMaxDistance(probe RID.ReflectionProbe, distance Float.X)

Sets the max distance away from the probe an object can be before it is culled. Equivalent to ReflectionProbe.MaxDistance.

func ReflectionProbeSetMeshLodThreshold

func ReflectionProbeSetMeshLodThreshold(probe RID.ReflectionProbe, pixels Float.X)

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.

func ReflectionProbeSetOriginOffset

func ReflectionProbeSetOriginOffset(probe RID.ReflectionProbe, offset Vector3.XYZ)

Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to ReflectionProbe.OriginOffset.

func ReflectionProbeSetReflectionMask

func ReflectionProbeSetReflectionMask(probe RID.ReflectionProbe, layers int)

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.

func ReflectionProbeSetResolution

func ReflectionProbeSetResolution(probe RID.ReflectionProbe, resolution int)

Sets the resolution to use when rendering the specified reflection probe. The 'resolution' is specified for each cubemap face: for instance, specifying 512 will allocate 6 faces of 512×512 each (plus mipmaps for roughness levels).

func ReflectionProbeSetSize

func ReflectionProbeSetSize(probe RID.ReflectionProbe, size Vector3.XYZ)

Sets the size of the area that the reflection probe will capture. Equivalent to ReflectionProbe.Size.

func ReflectionProbeSetUpdateMode

func ReflectionProbeSetUpdateMode(probe RID.ReflectionProbe, mode ReflectionProbeUpdateMode)

Sets how often the reflection probe updates. Can either be once or every frame.

func RenderLoopEnabled

func RenderLoopEnabled() bool

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

func RequestFrameDrawnCallback

func RequestFrameDrawnCallback(callable func())

Schedules a callback to the given callable after a frame has been drawn.

func ScenarioCreate

func ScenarioCreate() RID.Scenario

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 FreeRid method.

The scenario is the 3D world that all the visual instances exist in.

func ScenarioSetCameraAttributes

func ScenarioSetCameraAttributes(scenario RID.Scenario, effects RID.CameraAttributes)

Sets the camera attributes ('effects') that will be used with this scenario. See also CameraAttributes.

func ScenarioSetCompositor

func ScenarioSetCompositor(scenario RID.Scenario, compositor RID.Compositor)

Sets the compositor ('compositor') that will be used with this scenario. See also Compositor.

func ScenarioSetEnvironment

func ScenarioSetEnvironment(scenario RID.Scenario, environment RID.Environment)

Sets the environment that will be used with this scenario. See also Environment.

func ScenarioSetFallbackEnvironment

func ScenarioSetFallbackEnvironment(scenario RID.Scenario, environment 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.

func ScreenSpaceRoughnessLimiterSetActive

func ScreenSpaceRoughnessLimiterSetActive(enable bool, amount Float.X, limit Float.X)

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".

func SetBootImage

func SetBootImage(image Image.Instance, color Color.RGBA, scale bool)

Sets a boot image. The color defines the background color. If 'scale' is true, 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.

func SetBootImageOptions

func SetBootImageOptions(image Image.Instance, color Color.RGBA, scale bool, use_filter bool)

Sets a boot image. The color defines the background color. If 'scale' is true, 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.

func SetDebugGenerateWireframes

func SetDebugGenerateWireframes(generate bool)

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.

func SetDefaultClearColor

func SetDefaultClearColor(color Color.RGBA)

Sets the default clear color which is used when a specific clear color has not been selected. See also GetDefaultClearColor.

func SetRenderLoopEnabled

func SetRenderLoopEnabled(value bool)

SetRenderLoopEnabled sets the property returned by [IsRenderLoopEnabled].

func ShaderCreate

func ShaderCreate() RID.Shader

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 FreeRid method.

Note: The equivalent resource is Shader.

func ShaderGetCode

func ShaderGetCode(shader RID.Shader) string

Returns a shader's source code as a string.

func ShaderGetDefaultTextureParameter

func ShaderGetDefaultTextureParameter(shader RID.Shader, name string, index int) RID.Texture

Returns a default texture from a shader searched by name.

Note: If the sampler array is used use 'index' to access the specified texture.

func ShaderGetParameterDefault

func ShaderGetParameterDefault(shader RID.Shader, name string) any

Returns the default value for the specified shader uniform. This is usually the value written in the shader source code.

func ShaderSetCode

func ShaderSetCode(shader RID.Shader, code string)

Sets the shader's source code (which triggers recompilation after being changed).

func ShaderSetDefaultTextureParameter

func ShaderSetDefaultTextureParameter(shader RID.Shader, name string, texture RID.Texture, index int)

Sets a shader's default texture. Overwrites the texture given by name.

Note: If the sampler array is used use 'index' to access the specified texture.

func ShaderSetPathHint

func ShaderSetPathHint(shader RID.Shader, path string)

Sets the path hint for the specified shader. This should generally match the Shader resource's Resource.ResourcePath.

func SkeletonAllocateData

func SkeletonAllocateData(skeleton RID.Skeleton, bones int, is_2d_skeleton bool)

func SkeletonBoneGetTransform

func SkeletonBoneGetTransform(skeleton RID.Skeleton, bone int) Transform3D.BasisOrigin

Returns the Transform3D.BasisOrigin set for a specific bone of this skeleton.

func SkeletonBoneGetTransform2d

func SkeletonBoneGetTransform2d(skeleton RID.Skeleton, bone int) Transform2D.OriginXY

Returns the Transform2D.OriginXY set for a specific bone of this skeleton.

func SkeletonBoneSetTransform

func SkeletonBoneSetTransform(skeleton RID.Skeleton, bone int, transform Transform3D.BasisOrigin)

Sets the Transform3D.BasisOrigin for a specific bone of this skeleton.

func SkeletonBoneSetTransform2d

func SkeletonBoneSetTransform2d(skeleton RID.Skeleton, bone int, transform Transform2D.OriginXY)

Sets the Transform2D.OriginXY for a specific bone of this skeleton.

func SkeletonCreate

func SkeletonCreate() RID.Skeleton

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 FreeRid method.

func SkeletonGetBoneCount

func SkeletonGetBoneCount(skeleton RID.Skeleton) int

Returns the number of bones allocated for this skeleton.

func SkeletonSetBaseTransform2d

func SkeletonSetBaseTransform2d(skeleton RID.Skeleton, base_transform Transform2D.OriginXY)

func SkyBakePanorama

func SkyBakePanorama(sky RID.Sky, energy Float.X, bake_irradiance bool, size Vector2i.XY) Image.Instance

Generates and returns an Image containing the radiance map for the specified 'sky' RID. 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 EnvironmentBakePanorama.

Note: The image is saved in linear color space without any tonemapping performed, which means it will look too dark if viewed directly in an image editor. 'energy' values above 1.0 can be used to brighten the resulting image.

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.

func SkyCreate

func SkyCreate() RID.Sky

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 FreeRid method.

func SkySetMaterial

func SkySetMaterial(sky RID.Sky, material RID.Material)

Sets the material that the sky uses to render the background, ambient and reflection maps.

func SkySetMode

func SkySetMode(sky RID.Sky, mode SkyMode)

Sets the process 'mode' of the sky specified by the 'sky' RID. Equivalent to Sky.ProcessMode.

func SkySetRadianceSize

func SkySetRadianceSize(sky RID.Sky, radiance_size int)

Sets the 'radiance_size' of the sky specified by the 'sky' RID (in pixels). Equivalent to Sky.RadianceSize.

func SpotLightCreate

func SpotLightCreate() RID.Light

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 FreeRid method.

To place in a scene, attach this spot light to an instance using InstanceSetBase using the returned RID.

func SubSurfaceScatteringSetQuality

func SubSurfaceScatteringSetQuality(quality SubSurfaceScatteringQuality)

Sets ProjectSettings "rendering/environment/subsurface_scattering/subsurface_scattering_quality" to use when rendering materials that have subsurface scattering enabled.

func SubSurfaceScatteringSetScale

func SubSurfaceScatteringSetScale(scale Float.X, depth_scale Float.X)

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.

func Texture2dCreate

func Texture2dCreate(image Image.Instance) RID.Texture2D

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 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 Godot-specific Texture2D resource.

func Texture2dGet

func Texture2dGet(texture RID.Texture2D) Image.Instance

Returns an Image instance from the given 'texture' Resource.ID.

Example: Get the test texture from GetTestTexture and apply it to a Sprite2D node:

var texture_rid = RenderingServer.GetTestTexture()
var texture = ImageTexture.CreateFromImage(RenderingServer.Texture2dGet(RID.Texture2D(texture_rid)))
sprite.SetTexture(texture.AsTexture2D())

func Texture2dLayerGet

func Texture2dLayerGet(texture RID.Texture2D, layer int) Image.Instance

Returns an Image instance from the given 'texture' Resource.ID and 'layer'.

func Texture2dLayeredCreate

func Texture2dLayeredCreate(layers []Image.Instance, layered_type TextureLayeredType) RID.Texture2D

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 FreeRid method.

Note: The equivalent resource is TextureLayered.

func Texture2dLayeredPlaceholderCreate

func Texture2dLayeredPlaceholderCreate(layered_type TextureLayeredType) RID.Texture2D

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 Texture2dPlaceholderCreate.

Note: The equivalent resource is PlaceholderTextureLayered.

func Texture2dPlaceholderCreate

func Texture2dPlaceholderCreate() RID.Texture2D

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 Texture2dLayeredPlaceholderCreate.

Once finished with your RID, you will want to free the RID using the RenderingServer's FreeRid method.

Note: The equivalent resource is PlaceholderTexture2D.

func Texture2dUpdate

func Texture2dUpdate(texture RID.Texture2D, image Image.Instance, layer int)

Updates the texture specified by the 'texture' Resource.ID 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 TextureReplace instead.

func Texture3dCreate

func Texture3dCreate(format Image.Format, width int, height int, depth int, mipmaps bool, data []Image.Instance) RID.Texture3D

Note: The equivalent resource is Texture3D.

func Texture3dGet

func Texture3dGet(texture RID.Texture3D) []Image.Instance

Returns 3D texture data as an array of Images for the specified texture Resource.ID.

func Texture3dPlaceholderCreate

func Texture3dPlaceholderCreate() RID.Texture3D

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 FreeRid method.

Note: The equivalent resource is PlaceholderTexture3D.

func Texture3dUpdate

func Texture3dUpdate(texture RID.Texture3D, data []Image.Instance)

Updates the texture specified by the 'texture' Resource.ID'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 TextureReplace instead.

func TextureCreateFromNativeHandle

func TextureCreateFromNativeHandle(atype TextureType, format Image.Format, native_handle int, width int, height int, depth int, layered_type TextureLayeredType) RID.Texture

Creates a texture based on a native handle that was created outside of Godot'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. It will give you much more control over the texture's format and usage.

func TextureCreateFromNativeHandleOptions

func TextureCreateFromNativeHandleOptions(atype TextureType, format Image.Format, native_handle int, width int, height int, depth int, layers int, layered_type TextureLayeredType) RID.Texture

Creates a texture based on a native handle that was created outside of Godot'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. It will give you much more control over the texture's format and usage.

func TextureGetFormat

func TextureGetFormat(texture RID.Texture) Image.Format

Returns the format for the texture.

func TextureGetNativeHandle

func TextureGetNativeHandle(texture RID.Texture, srgb bool) int

Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension.

Note: This function returns a uint64_t which internally maps to a GLuint (OpenGL) or VkImage (Vulkan).

func TextureGetPath

func TextureGetPath(texture RID.Texture) string

func TextureGetRdTexture

func TextureGetRdTexture(texture RID.Texture, srgb bool) RID.Texture

Returns a texture Resource.ID that can be used with RenderingDevice.

func TextureProxyCreate

func TextureProxyCreate(base RID.TextureProxy) RID.TextureProxy

This method does nothing and always returns an invalid Resource.ID.

func TextureProxyUpdate

func TextureProxyUpdate(texture RID.TextureProxy, proxy_to RID.Texture)

This method does nothing.

func TextureRdCreate

func TextureRdCreate(rd_texture RID.Texture, layer_type TextureLayeredType) RID.Texture

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.

func TextureReplace

func TextureReplace(texture RID.Texture, by_texture RID.Texture)

Replaces 'texture”s texture data by the texture specified by the 'by_texture' RID, without changing 'texture”s RID.

func TextureSetForceRedrawIfVisible

func TextureSetForceRedrawIfVisible(texture RID.Texture, enable bool)

func TextureSetPath

func TextureSetPath(texture RID.Texture, path string)

func TextureSetSizeOverride

func TextureSetSizeOverride(texture RID.Texture, width int, height int)

func ViewportAttachCamera

func ViewportAttachCamera(viewport RID.Viewport, camera RID.Camera)

Sets a viewport's camera.

func ViewportAttachCanvas

func ViewportAttachCanvas(viewport RID.Viewport, canvas RID.Canvas)

Sets a viewport's canvas.

func ViewportAttachToScreen

func ViewportAttachToScreen(viewport RID.Viewport, rect Rect2.PositionSize, screen int)

Copies the viewport to a region of the screen specified by 'rect'. If 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:

RenderingServer.ViewportAttachToScreen(Viewport.Get(node).GetViewportRid(), Rect2.PositionSize{}, 0)
RenderingServer.ViewportAttachToScreen(viewport.GetViewportRid(), Rect2.New(0, 0, 600, 600), 0)

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 ViewportSetRenderDirectToScreen.

func ViewportCreate

func ViewportCreate() RID.Viewport

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 FreeRid method.

Note: The equivalent node is Viewport.

func ViewportGetMeasuredRenderTimeCpu

func ViewportGetMeasuredRenderTimeCpu(viewport RID.Viewport) Float.X

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 GetFrameSetupTimeCpu. Unlike Engine.GetFramesPerSecond, this method will accurately reflect CPU utilization even if framerate is capped via V-Sync or Engine.MaxFps. See also ViewportGetMeasuredRenderTimeGpu.

Note: Requires measurements to be enabled on the specified 'viewport' using ViewportSetMeasureRenderTime. Otherwise, this method returns 0.0.

func ViewportGetMeasuredRenderTimeGpu

func ViewportGetMeasuredRenderTimeGpu(viewport RID.Viewport) Float.X

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 ViewportGetMeasuredRenderTimeCpu.

Note: Requires measurements to be enabled on the specified 'viewport' using 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 ViewportGetMeasuredRenderTimeGpu. This behavior can be overridden in the graphics driver settings at the cost of higher power usage.

func ViewportGetRenderInfo

func ViewportGetRenderInfo(viewport RID.Viewport, atype ViewportRenderInfoType, info ViewportRenderInfo) int

Returns a statistic about the rendering engine which can be used for performance profiling. This is separated into render pass 'type's, each of them having the same 'info's you can query (different passes will return different values).

See also 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, ViewportGetRenderInfo returns 0. To print rendering information in _ready() successfully, use the following:

if Engine.GetFramesDrawn() == 2 {
	fmt.Println(RenderingServer.ViewportGetRenderInfo(Viewport.Get(node).GetViewportRid(),
		RenderingServer.ViewportRenderInfoTypeVisible,
		RenderingServer.ViewportRenderInfoDrawCallsInFrame))
}

func ViewportGetRenderTarget

func ViewportGetRenderTarget(viewport RID.Viewport) RID.Framebuffer

Returns the render target for the viewport.

func ViewportGetTexture

func ViewportGetTexture(viewport RID.Viewport) RID.Texture

Returns the viewport's last rendered frame.

func ViewportRemoveCanvas

func ViewportRemoveCanvas(viewport RID.Viewport, canvas RID.Canvas)

Detaches a viewport from a canvas.

func ViewportSetActive

func ViewportSetActive(viewport RID.Viewport, active bool)

If true, sets the viewport active, else sets it inactive.

func ViewportSetAnisotropicFilteringLevel

func ViewportSetAnisotropicFilteringLevel(viewport RID.Viewport, anisotropic_filtering_level ViewportAnisotropicFiltering)

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.TextureFilterLinearWithMipmapsAnisotropic] or [Basematerial3d.TextureFilterNearestWithMipmapsAnisotropic] on materials.

Note: In 2D, for this setting to have an effect, set CanvasItem.TextureFilter to [Canvasitem.TextureFilterLinearWithMipmapsAnisotropic] or [Canvasitem.TextureFilterNearestWithMipmapsAnisotropic] 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.

func ViewportSetCanvasCullMask

func ViewportSetCanvasCullMask(viewport RID.Viewport, canvas_cull_mask int)

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

func ViewportSetCanvasStacking

func ViewportSetCanvasStacking(viewport RID.Viewport, canvas RID.Canvas, layer int, sublayer int)

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 CanvasLayerMin and CanvasLayerMax (inclusive). Any other value will wrap around.

func ViewportSetCanvasTransform

func ViewportSetCanvasTransform(viewport RID.Viewport, canvas RID.Canvas, offset Transform2D.OriginXY)

Sets the transformation of a viewport's canvas.

func ViewportSetClearMode

func ViewportSetClearMode(viewport RID.Viewport, clear_mode ViewportClearMode)

Sets the clear mode of a viewport.

func ViewportSetDebugDraw

func ViewportSetDebugDraw(viewport RID.Viewport, draw ViewportDebugDraw)

Sets the debug draw mode of a viewport.

func ViewportSetDefaultCanvasItemTextureFilter

func ViewportSetDefaultCanvasItemTextureFilter(viewport RID.Viewport, filter CanvasItemTextureFilter)

Sets the default texture filtering mode for the specified 'viewport' RID.

func ViewportSetDefaultCanvasItemTextureRepeat

func ViewportSetDefaultCanvasItemTextureRepeat(viewport RID.Viewport, repeat CanvasItemTextureRepeat)

Sets the default texture repeat mode for the specified 'viewport' RID.

func ViewportSetDisable2d

func ViewportSetDisable2d(viewport RID.Viewport, disable bool)

If true, the viewport's canvas (i.e. 2D and GUI elements) is not rendered.

func ViewportSetDisable3d

func ViewportSetDisable3d(viewport RID.Viewport, disable bool)

If true, the viewport's 3D elements are not rendered.

func ViewportSetEnvironmentMode

func ViewportSetEnvironmentMode(viewport RID.Viewport, mode ViewportEnvironmentMode)

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 EnvBgCanvas. The default behavior is to inherit the setting from the viewport's parent. If the topmost parent is also set to ViewportEnvironmentInherit, then the behavior will be the same as if it was set to ViewportEnvironmentEnabled.

func ViewportSetFsrSharpness

func ViewportSetFsrSharpness(viewport RID.Viewport, sharpness Float.X)

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.

func ViewportSetGlobalCanvasTransform

func ViewportSetGlobalCanvasTransform(viewport RID.Viewport, transform Transform2D.OriginXY)

Sets the viewport's global transformation matrix.

func ViewportSetMeasureRenderTime

func ViewportSetMeasureRenderTime(viewport RID.Viewport, enable bool)

Sets the measurement for the given 'viewport' RID (obtained using Viewport.GetViewportRid). Once enabled, ViewportGetMeasuredRenderTimeCpu and ViewportGetMeasuredRenderTimeGpu will return values greater than 0.0 when queried with the given 'viewport'.

func ViewportSetMsaa2d

func ViewportSetMsaa2d(viewport RID.Viewport, msaa ViewportMSAA)

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.

func ViewportSetMsaa3d

func ViewportSetMsaa3d(viewport RID.Viewport, msaa ViewportMSAA)

Sets the multisample antialiasing mode for 3D on the specified 'viewport' RID. Equivalent to ProjectSettings "rendering/anti_aliasing/quality/msaa_3d" or Viewport.Msaa3d.

func ViewportSetOcclusionCullingBuildQuality

func ViewportSetOcclusionCullingBuildQuality(quality ViewportOcclusionCullingBuildQuality)

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.

func ViewportSetOcclusionRaysPerThread

func ViewportSetOcclusionRaysPerThread(rays_per_thread int)

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.

func ViewportSetParentViewport

func ViewportSetParentViewport(viewport RID.Viewport, parent_viewport RID.Viewport)

Sets the viewport's parent to the viewport specified by the 'parent_viewport' RID.

func ViewportSetPositionalShadowAtlasQuadrantSubdivision

func ViewportSetPositionalShadowAtlasQuadrantSubdivision(viewport RID.Viewport, quadrant int, subdivision int)

Sets the number of subdivisions to use in the specified shadow atlas 'quadrant' for omni and spot shadows. See also Viewport.SetPositionalShadowAtlasQuadrantSubdiv.

func ViewportSetPositionalShadowAtlasSize

func ViewportSetPositionalShadowAtlasSize(viewport RID.Viewport, size int, use_16_bits bool)

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).

func ViewportSetRenderDirectToScreen

func ViewportSetRenderDirectToScreen(viewport RID.Viewport, enabled bool)

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.

func ViewportSetScaling3dMode

func ViewportSetScaling3dMode(viewport RID.Viewport, scaling_3d_mode ViewportScaling3DMode)

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.

func ViewportSetScaling3dScale

func ViewportSetScaling3dScale(viewport RID.Viewport, scale Float.X)

Scales the 3D render buffer based on the viewport size uses an image filter specified in 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 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.

func ViewportSetScenario

func ViewportSetScenario(viewport RID.Viewport, scenario RID.Scenario)

Sets a viewport's scenario. The scenario contains information about environment information, reflection atlas, etc.

func ViewportSetScreenSpaceAa

func ViewportSetScreenSpaceAa(viewport RID.Viewport, mode ViewportScreenSpaceAA)

Sets the viewport's screen-space antialiasing mode. Equivalent to ProjectSettings "rendering/anti_aliasing/quality/screen_space_aa" or Viewport.ScreenSpaceAa.

func ViewportSetSdfOversizeAndScale

func ViewportSetSdfOversizeAndScale(viewport RID.Viewport, oversize ViewportSDFOversize, scale ViewportSDFScale)

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.

func ViewportSetSize

func ViewportSetSize(viewport RID.Viewport, width int, height int)

Sets the viewport's width and height in pixels.

func ViewportSetSnap2dTransformsToPixel

func ViewportSetSnap2dTransformsToPixel(viewport RID.Viewport, enabled bool)

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".

func ViewportSetSnap2dVerticesToPixel

func ViewportSetSnap2dVerticesToPixel(viewport RID.Viewport, enabled bool)

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".

func ViewportSetTextureMipmapBias

func ViewportSetTextureMipmapBias(viewport RID.Viewport, mipmap_bias Float.X)

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.

func ViewportSetTransparentBackground

func ViewportSetTransparentBackground(viewport RID.Viewport, enabled bool)

If true, the viewport renders its background as transparent.

func ViewportSetUpdateMode

func ViewportSetUpdateMode(viewport RID.Viewport, update_mode ViewportUpdateMode)

Sets when the viewport should be updated.

func ViewportSetUseDebanding

func ViewportSetUseDebanding(viewport RID.Viewport, enable bool)

Equivalent to Viewport.UseDebanding. See also ProjectSettings "rendering/anti_aliasing/quality/use_debanding".

func ViewportSetUseHdr2d

func ViewportSetUseHdr2d(viewport RID.Viewport, enabled bool)

If true, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ or Compatibility renderer, this will be an RGBA16 framebuffer. When using the Mobile renderer, it will be an RGB10_A2 framebuffer.

Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space 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 space 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.

func ViewportSetUseOcclusionCulling

func ViewportSetUseOcclusionCulling(viewport RID.Viewport, enable bool)

If true, enables occlusion culling on the specified viewport. Equivalent to ProjectSettings "rendering/occlusion_culling/use_occlusion_culling".

func ViewportSetUseTaa

func ViewportSetUseTaa(viewport RID.Viewport, enable bool)

If true, use temporal antialiasing. Equivalent to ProjectSettings "rendering/anti_aliasing/quality/use_taa" or Viewport.UseTaa.

func ViewportSetUseXr

func ViewportSetUseXr(viewport RID.Viewport, use_xr bool)

If true, the viewport uses augmented or virtual reality technologies. See XRInterface.

func ViewportSetVrsMode

func ViewportSetVrsMode(viewport RID.Viewport, mode ViewportVRSMode)

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".

func ViewportSetVrsTexture

func ViewportSetVrsTexture(viewport RID.Viewport, texture RID.Texture)

The texture to use when the VRS mode is set to [Renderingserver.ViewportVrsTexture]. Equivalent to ProjectSettings "rendering/vrs/texture".

func ViewportSetVrsUpdateMode

func ViewportSetVrsUpdateMode(viewport RID.Viewport, mode ViewportVRSUpdateMode)

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.ViewportVrsUpdateOnce], the input texture is copied once and the mode is changed to [Renderingserver.ViewportVrsUpdateDisabled].

func VisibilityNotifierCreate

func VisibilityNotifierCreate() RID.VisibilityNotifier

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 FreeRid method.

To place in a scene, attach this notifier to an instance using InstanceSetBase using the returned RID.

Note: The equivalent node is VisibleOnScreenNotifier3D.

func VisibilityNotifierSetAabb

func VisibilityNotifierSetAabb(notifier RID.VisibilityNotifier, aabb AABB.PositionSize)

func VisibilityNotifierSetCallbacks

func VisibilityNotifierSetCallbacks(notifier RID.VisibilityNotifier, enter_callable func(), exit_callable func())

func VoxelGiAllocateData

func VoxelGiAllocateData(voxel_gi RID.VoxelGI, to_cell_xform Transform3D.BasisOrigin, aabb AABB.PositionSize, octree_size Vector3i.XYZ, octree_cells []byte, data_cells []byte, distance_field []byte, level_counts []int32)

func VoxelGiCreate

func VoxelGiCreate() RID.VoxelGI

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 FreeRid method.

Note: The equivalent node is VoxelGI.

func VoxelGiGetDataCells

func VoxelGiGetDataCells(voxel_gi RID.VoxelGI) []byte

func VoxelGiGetDistanceField

func VoxelGiGetDistanceField(voxel_gi RID.VoxelGI) []byte

func VoxelGiGetLevelCounts

func VoxelGiGetLevelCounts(voxel_gi RID.VoxelGI) []int32

func VoxelGiGetOctreeCells

func VoxelGiGetOctreeCells(voxel_gi RID.VoxelGI) []byte

func VoxelGiGetOctreeSize

func VoxelGiGetOctreeSize(voxel_gi RID.VoxelGI) Vector3i.XYZ

func VoxelGiGetToCellXform

func VoxelGiGetToCellXform(voxel_gi RID.VoxelGI) Transform3D.BasisOrigin

func VoxelGiSetBakedExposureNormalization

func VoxelGiSetBakedExposureNormalization(voxel_gi RID.VoxelGI, baked_exposure Float.X)

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 CameraAttributesSetExposure.

func VoxelGiSetBias

func VoxelGiSetBias(voxel_gi RID.VoxelGI, bias Float.X)

Sets the VoxelGIData.Bias value to use on the specified 'voxel_gi”s Resource.ID.

func VoxelGiSetDynamicRange

func VoxelGiSetDynamicRange(voxel_gi RID.VoxelGI, arange Float.X)

Sets the VoxelGIData.DynamicRange value to use on the specified 'voxel_gi”s Resource.ID.

func VoxelGiSetEnergy

func VoxelGiSetEnergy(voxel_gi RID.VoxelGI, energy Float.X)

Sets the VoxelGIData.Energy value to use on the specified 'voxel_gi”s Resource.ID.

func VoxelGiSetInterior

func VoxelGiSetInterior(voxel_gi RID.VoxelGI, enable bool)

Sets the VoxelGIData.Interior value to use on the specified 'voxel_gi”s Resource.ID.

func VoxelGiSetNormalBias

func VoxelGiSetNormalBias(voxel_gi RID.VoxelGI, bias Float.X)

Sets the VoxelGIData.NormalBias value to use on the specified 'voxel_gi”s Resource.ID.

func VoxelGiSetPropagation

func VoxelGiSetPropagation(voxel_gi RID.VoxelGI, amount Float.X)

Sets the VoxelGIData.Propagation value to use on the specified 'voxel_gi”s Resource.ID.

func VoxelGiSetQuality

func VoxelGiSetQuality(quality VoxelGIQuality)

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.

func VoxelGiSetUseTwoBounces

func VoxelGiSetUseTwoBounces(voxel_gi RID.VoxelGI, enable bool)

Sets the VoxelGIData.UseTwoBounces value to use on the specified 'voxel_gi”s Resource.ID.

Types

type ArrayCustomFormat

type ArrayCustomFormat int //gd:RenderingServer.ArrayCustomFormat
const (
	// 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.
	ArrayCustomRgba8Unorm ArrayCustomFormat = 0
	// 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.
	ArrayCustomRgba8Snorm ArrayCustomFormat = 1
	// Custom data array contains 16-bit-per-channel red/green color data. Values are floating-point in half precision.
	ArrayCustomRgHalf ArrayCustomFormat = 2
	// Custom data array contains 16-bit-per-channel red/green/blue/alpha color data. Values are floating-point in half precision.
	ArrayCustomRgbaHalf ArrayCustomFormat = 3
	// Custom data array contains 32-bit-per-channel red color data. Values are floating-point in single precision.
	ArrayCustomRFloat ArrayCustomFormat = 4
	// Custom data array contains 32-bit-per-channel red/green color data. Values are floating-point in single precision.
	ArrayCustomRgFloat ArrayCustomFormat = 5
	// Custom data array contains 32-bit-per-channel red/green/blue color data. Values are floating-point in single precision.
	ArrayCustomRgbFloat ArrayCustomFormat = 6
	// Custom data array contains 32-bit-per-channel red/green/blue/alpha color data. Values are floating-point in single precision.
	ArrayCustomRgbaFloat ArrayCustomFormat = 7
	// Represents the size of the [ArrayCustomFormat] enum.
	ArrayCustomMax ArrayCustomFormat = 8
)

type ArrayFormat

type ArrayFormat int //gd:RenderingServer.ArrayFormat
const (
	// Flag used to mark a vertex position array.
	ArrayFormatVertex ArrayFormat = 1
	// Flag used to mark a normal array.
	ArrayFormatNormal ArrayFormat = 2
	// Flag used to mark a tangent array.
	ArrayFormatTangent ArrayFormat = 4
	// Flag used to mark a vertex color array.
	ArrayFormatColor ArrayFormat = 8
	// Flag used to mark a UV coordinates array.
	ArrayFormatTexUv ArrayFormat = 16
	// Flag used to mark a UV coordinates array for the second UV coordinates.
	ArrayFormatTexUv2 ArrayFormat = 32
	// Flag used to mark an array of custom per-vertex data for the first set of custom data.
	ArrayFormatCustom0 ArrayFormat = 64
	// Flag used to mark an array of custom per-vertex data for the second set of custom data.
	ArrayFormatCustom1 ArrayFormat = 128
	// Flag used to mark an array of custom per-vertex data for the third set of custom data.
	ArrayFormatCustom2 ArrayFormat = 256
	// Flag used to mark an array of custom per-vertex data for the fourth set of custom data.
	ArrayFormatCustom3 ArrayFormat = 512
	// Flag used to mark a bone information array.
	ArrayFormatBones ArrayFormat = 1024
	// Flag used to mark a weights array.
	ArrayFormatWeights ArrayFormat = 2048
	// Flag used to mark an index array.
	ArrayFormatIndex ArrayFormat = 4096
	// Mask of mesh channels permitted in blend shapes.
	ArrayFormatBlendShapeMask ArrayFormat = 7
	// Shift of first custom channel.
	ArrayFormatCustomBase ArrayFormat = 13
	// Number of format bits per custom channel. See [ArrayCustomFormat].
	ArrayFormatCustomBits ArrayFormat = 3
	// Amount to shift [ArrayCustomFormat] for custom channel index 0.
	ArrayFormatCustom0Shift ArrayFormat = 13
	// Amount to shift [ArrayCustomFormat] for custom channel index 1.
	ArrayFormatCustom1Shift ArrayFormat = 16
	// Amount to shift [ArrayCustomFormat] for custom channel index 2.
	ArrayFormatCustom2Shift ArrayFormat = 19
	// Amount to shift [ArrayCustomFormat] for custom channel index 3.
	ArrayFormatCustom3Shift ArrayFormat = 22
	// Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See [ArrayCustomFormat].
	ArrayFormatCustomMask ArrayFormat = 7
	// Shift of first compress flag. Compress flags should be passed to [ArrayMesh.AddSurfaceFromArrays] and [SurfaceTool.Commit].
	//
	// [ArrayMesh.AddSurfaceFromArrays]: https://pkg.go.dev/graphics.gd/classdb/ArrayMesh#Instance.AddSurfaceFromArrays
	// [SurfaceTool.Commit]: https://pkg.go.dev/graphics.gd/classdb/SurfaceTool#Instance.Commit
	ArrayCompressFlagsBase ArrayFormat = 25
	// Flag used to mark that the array contains 2D vertices.
	ArrayFlagUse2dVertices ArrayFormat = 33554432
	// Flag used to mark that the mesh data will use GL_DYNAMIC_DRAW on GLES. Unused on Vulkan.
	ArrayFlagUseDynamicUpdate ArrayFormat = 67108864
	// Flag used to mark that the array uses 8 bone weights instead of 4.
	ArrayFlagUse8BoneWeights ArrayFormat = 134217728
	// 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.
	ArrayFlagUsesEmptyVertexArray ArrayFormat = 268435456
	// 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.
	ArrayFlagCompressAttributes ArrayFormat = 536870912
	// Flag used to mark the start of the bits used to store the mesh version.
	ArrayFlagFormatVersionBase ArrayFormat = 35
	// Flag used to shift a mesh format int to bring the version into the lowest digits.
	ArrayFlagFormatVersionShift ArrayFormat = 35
	// Flag used to record the format used by prior mesh versions before the introduction of a version.
	ArrayFlagFormatVersion1 ArrayFormat = 0
	// Flag used to record the second iteration of the mesh version flag. The primary difference between this and [ArrayFlagFormatVersion1] is that this version supports [ArrayFlagCompressAttributes] and in this version vertex positions are de-interleaved from normals and tangents.
	ArrayFlagFormatVersion2 ArrayFormat = 34359738368
	// Flag used to record the current version that the engine expects. Currently this is the same as [ArrayFlagFormatVersion2].
	ArrayFlagFormatCurrentVersion ArrayFormat = 34359738368
	// Flag used to isolate the bits used for mesh version after using [ArrayFlagFormatVersionShift] to shift them into place.
	ArrayFlagFormatVersionMask ArrayFormat = 255
)

type ArrayType

type ArrayType int //gd:RenderingServer.ArrayType
const (
	// Array is a vertex position array.
	ArrayVertex ArrayType = 0
	// Array is a normal array.
	ArrayNormal ArrayType = 1
	// Array is a tangent array.
	ArrayTangent ArrayType = 2
	// Array is a vertex color array.
	ArrayColor ArrayType = 3
	// Array is a UV coordinates array.
	ArrayTexUv ArrayType = 4
	// Array is a UV coordinates array for the second set of UV coordinates.
	ArrayTexUv2 ArrayType = 5
	// Array is a custom data array for the first set of custom data.
	ArrayCustom0 ArrayType = 6
	// Array is a custom data array for the second set of custom data.
	ArrayCustom1 ArrayType = 7
	// Array is a custom data array for the third set of custom data.
	ArrayCustom2 ArrayType = 8
	// Array is a custom data array for the fourth set of custom data.
	ArrayCustom3 ArrayType = 9
	// Array contains bone information.
	ArrayBones ArrayType = 10
	// Array is weight information.
	ArrayWeights ArrayType = 11
	// Array is an index array.
	ArrayIndex ArrayType = 12
	// Represents the size of the [ArrayType] enum.
	ArrayMax ArrayType = 13
)

type BakeChannels

type BakeChannels int //gd:RenderingServer.BakeChannels
const (
	// Index of [Image] in array of [Image]s returned by [BakeRenderUv2]. Image uses [Image.FormatRgba8] and contains albedo color in the .rgb channels and alpha in the .a channel.
	//
	// [BakeRenderUv2]: https://pkg.go.dev/graphics.gd/classdb/#Instance.BakeRenderUv2
	// [Image]: https://pkg.go.dev/graphics.gd/classdb/Image
	BakeChannelAlbedoAlpha BakeChannels = 0
	// Index of [Image] in array of [Image]s returned by [BakeRenderUv2]. Image uses [Image.FormatRgba8] 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.
	//
	// [BakeRenderUv2]: https://pkg.go.dev/graphics.gd/classdb/#Instance.BakeRenderUv2
	// [Image]: https://pkg.go.dev/graphics.gd/classdb/Image
	BakeChannelNormal BakeChannels = 1
	// Index of [Image] in array of [Image]s returned by [BakeRenderUv2]. Image uses [Image.FormatRgba8] 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.
	//
	// [BakeRenderUv2]: https://pkg.go.dev/graphics.gd/classdb/#Instance.BakeRenderUv2
	// [Image]: https://pkg.go.dev/graphics.gd/classdb/Image
	BakeChannelOrm BakeChannels = 2
	// Index of [Image] in array of [Image]s returned by [BakeRenderUv2]. Image uses [Image.FormatRgbah] and contains emission color in the .rgb channels and nothing in the .a channel.
	//
	// [BakeRenderUv2]: https://pkg.go.dev/graphics.gd/classdb/#Instance.BakeRenderUv2
	// [Image]: https://pkg.go.dev/graphics.gd/classdb/Image
	BakeChannelEmission BakeChannels = 3
)

type BlendShapeMode

type BlendShapeMode int //gd:RenderingServer.BlendShapeMode
const (
	// Blend shapes are normalized.
	BlendShapeModeNormalized BlendShapeMode = 0
	// Blend shapes are relative to base weight.
	BlendShapeModeRelative BlendShapeMode = 1
)

func MeshGetBlendShapeMode

func MeshGetBlendShapeMode(mesh RID.Mesh) BlendShapeMode

Returns a mesh's blend shape mode.

type CanvasGroupMode

type CanvasGroupMode int //gd:RenderingServer.CanvasGroupMode
const (
	// Child draws over parent and is not clipped.
	CanvasGroupModeDisabled CanvasGroupMode = 0
	// Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn.
	CanvasGroupModeClipOnly CanvasGroupMode = 1
	// Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area.
	CanvasGroupModeClipAndDraw CanvasGroupMode = 2
	CanvasGroupModeTransparent CanvasGroupMode = 3
)

type CanvasItemTextureFilter

type CanvasItemTextureFilter int //gd:RenderingServer.CanvasItemTextureFilter
const (
	// Uses the default filter mode for this [Viewport].
	//
	// [Viewport]: https://pkg.go.dev/graphics.gd/classdb/Viewport
	CanvasItemTextureFilterDefault CanvasItemTextureFilter = 0
	// 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).
	CanvasItemTextureFilterNearest CanvasItemTextureFilter = 1
	// 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).
	CanvasItemTextureFilterLinear CanvasItemTextureFilter = 2
	// 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.
	//
	// [Camera2D]: https://pkg.go.dev/graphics.gd/classdb/Camera2D
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	CanvasItemTextureFilterNearestWithMipmaps CanvasItemTextureFilter = 3
	// 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.
	//
	// [Camera2D]: https://pkg.go.dev/graphics.gd/classdb/Camera2D
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	CanvasItemTextureFilterLinearWithMipmaps CanvasItemTextureFilter = 4
	// 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. [CanvasItemTextureFilterNearestWithMipmaps] is usually more appropriate in this case.
	//
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	CanvasItemTextureFilterNearestWithMipmapsAnisotropic CanvasItemTextureFilter = 5
	// 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. [CanvasItemTextureFilterLinearWithMipmaps] is usually more appropriate in this case.
	//
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	CanvasItemTextureFilterLinearWithMipmapsAnisotropic CanvasItemTextureFilter = 6
	// Max value for [CanvasItemTextureFilter] enum.
	CanvasItemTextureFilterMax CanvasItemTextureFilter = 7
)

type CanvasItemTextureRepeat

type CanvasItemTextureRepeat int //gd:RenderingServer.CanvasItemTextureRepeat
const (
	// Uses the default repeat mode for this [Viewport].
	//
	// [Viewport]: https://pkg.go.dev/graphics.gd/classdb/Viewport
	CanvasItemTextureRepeatDefault CanvasItemTextureRepeat = 0
	// 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.
	CanvasItemTextureRepeatDisabled CanvasItemTextureRepeat = 1
	// 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.
	CanvasItemTextureRepeatEnabled CanvasItemTextureRepeat = 2
	// Flip the texture when repeating so that the edge lines up instead of abruptly changing.
	CanvasItemTextureRepeatMirror CanvasItemTextureRepeat = 3
	// Max value for [CanvasItemTextureRepeat] enum.
	CanvasItemTextureRepeatMax CanvasItemTextureRepeat = 4
)

type CanvasLightBlendMode

type CanvasLightBlendMode int //gd:RenderingServer.CanvasLightBlendMode
const (
	// Adds light color additive to the canvas.
	CanvasLightBlendModeAdd CanvasLightBlendMode = 0
	// Adds light color subtractive to the canvas.
	CanvasLightBlendModeSub CanvasLightBlendMode = 1
	// The light adds color depending on transparency.
	CanvasLightBlendModeMix CanvasLightBlendMode = 2
)

type CanvasLightMode

type CanvasLightMode int //gd:RenderingServer.CanvasLightMode
const (
	// 2D point light (see [PointLight2D]).
	//
	// [PointLight2D]: https://pkg.go.dev/graphics.gd/classdb/PointLight2D
	CanvasLightModePoint CanvasLightMode = 0
	// 2D directional (sun/moon) light (see [DirectionalLight2D]).
	//
	// [DirectionalLight2D]: https://pkg.go.dev/graphics.gd/classdb/DirectionalLight2D
	CanvasLightModeDirectional CanvasLightMode = 1
)

type CanvasLightShadowFilter

type CanvasLightShadowFilter int //gd:RenderingServer.CanvasLightShadowFilter
const (
	// Do not apply a filter to canvas light shadows.
	CanvasLightFilterNone CanvasLightShadowFilter = 0
	// Use PCF5 filtering to filter canvas light shadows.
	CanvasLightFilterPcf5 CanvasLightShadowFilter = 1
	// Use PCF13 filtering to filter canvas light shadows.
	CanvasLightFilterPcf13 CanvasLightShadowFilter = 2
	// Max value of the [CanvasLightShadowFilter] enum.
	CanvasLightFilterMax CanvasLightShadowFilter = 3
)

type CanvasOccluderPolygonCullMode

type CanvasOccluderPolygonCullMode int //gd:RenderingServer.CanvasOccluderPolygonCullMode
const (
	// Culling of the canvas occluder is disabled.
	CanvasOccluderPolygonCullDisabled CanvasOccluderPolygonCullMode = 0
	// Culling of the canvas occluder is clockwise.
	CanvasOccluderPolygonCullClockwise CanvasOccluderPolygonCullMode = 1
	// Culling of the canvas occluder is counterclockwise.
	CanvasOccluderPolygonCullCounterClockwise CanvasOccluderPolygonCullMode = 2
)

type CanvasTextureChannel

type CanvasTextureChannel int //gd:RenderingServer.CanvasTextureChannel
const (
	// Diffuse canvas texture ([CanvasTexture.DiffuseTexture]).
	//
	// [CanvasTexture.DiffuseTexture]: https://pkg.go.dev/graphics.gd/classdb/CanvasTexture#Instance.DiffuseTexture
	CanvasTextureChannelDiffuse CanvasTextureChannel = 0
	// Normal map canvas texture ([CanvasTexture.NormalTexture]).
	//
	// [CanvasTexture.NormalTexture]: https://pkg.go.dev/graphics.gd/classdb/CanvasTexture#Instance.NormalTexture
	CanvasTextureChannelNormal CanvasTextureChannel = 1
	// Specular map canvas texture ([CanvasTexture.SpecularTexture]).
	//
	// [CanvasTexture.SpecularTexture]: https://pkg.go.dev/graphics.gd/classdb/CanvasTexture#Instance.SpecularTexture
	CanvasTextureChannelSpecular CanvasTextureChannel = 2
)

type CompositorEffectCallbackType

type CompositorEffectCallbackType int //gd:RenderingServer.CompositorEffectCallbackType
const (
	// The callback is called before our opaque rendering pass, but after depth prepass (if applicable).
	CompositorEffectCallbackTypePreOpaque CompositorEffectCallbackType = 0
	// The callback is called after our opaque rendering pass, but before our sky is rendered.
	CompositorEffectCallbackTypePostOpaque CompositorEffectCallbackType = 1
	// 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).
	CompositorEffectCallbackTypePostSky CompositorEffectCallbackType = 2
	// The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers.
	CompositorEffectCallbackTypePreTransparent CompositorEffectCallbackType = 3
	// The callback is called after our transparent rendering pass, but before any built-in post-processing effects and output to our render target.
	CompositorEffectCallbackTypePostTransparent CompositorEffectCallbackType = 4
	CompositorEffectCallbackTypeAny             CompositorEffectCallbackType = -1
)

type CompositorEffectFlags

type CompositorEffectFlags int //gd:RenderingServer.CompositorEffectFlags
const (
	// The rendering effect requires the color buffer to be resolved if MSAA is enabled.
	CompositorEffectFlagAccessResolvedColor CompositorEffectFlags = 1
	// The rendering effect requires the depth buffer to be resolved if MSAA is enabled.
	CompositorEffectFlagAccessResolvedDepth CompositorEffectFlags = 2
	// The rendering effect requires motion vectors to be produced.
	CompositorEffectFlagNeedsMotionVectors CompositorEffectFlags = 4
	// The rendering effect requires normals and roughness g-buffer to be produced (Forward+ only).
	CompositorEffectFlagNeedsRoughness CompositorEffectFlags = 8
	// The rendering effect requires specular data to be separated out (Forward+ only).
	CompositorEffectFlagNeedsSeparateSpecular CompositorEffectFlags = 16
)

type CubeMapLayer

type CubeMapLayer int //gd:RenderingServer.CubeMapLayer
const (
	// Left face of a [Cubemap].
	//
	// [Cubemap]: https://pkg.go.dev/graphics.gd/classdb/Cubemap
	CubemapLayerLeft CubeMapLayer = 0
	// Right face of a [Cubemap].
	//
	// [Cubemap]: https://pkg.go.dev/graphics.gd/classdb/Cubemap
	CubemapLayerRight CubeMapLayer = 1
	// Bottom face of a [Cubemap].
	//
	// [Cubemap]: https://pkg.go.dev/graphics.gd/classdb/Cubemap
	CubemapLayerBottom CubeMapLayer = 2
	// Top face of a [Cubemap].
	//
	// [Cubemap]: https://pkg.go.dev/graphics.gd/classdb/Cubemap
	CubemapLayerTop CubeMapLayer = 3
	// Front face of a [Cubemap].
	//
	// [Cubemap]: https://pkg.go.dev/graphics.gd/classdb/Cubemap
	CubemapLayerFront CubeMapLayer = 4
	// Back face of a [Cubemap].
	//
	// [Cubemap]: https://pkg.go.dev/graphics.gd/classdb/Cubemap
	CubemapLayerBack CubeMapLayer = 5
)

type DOFBlurQuality

type DOFBlurQuality int //gd:RenderingServer.DOFBlurQuality
const (
	// Lowest quality DOF blur. This is the fastest setting, but you may be able to see filtering artifacts.
	DofBlurQualityVeryLow DOFBlurQuality = 0
	// Low quality DOF blur.
	DofBlurQualityLow DOFBlurQuality = 1
	// Medium quality DOF blur.
	DofBlurQualityMedium DOFBlurQuality = 2
	// Highest quality DOF blur. Results in the smoothest looking blur by taking the most samples, but is also significantly slower.
	DofBlurQualityHigh DOFBlurQuality = 3
)

type DOFBokehShape

type DOFBokehShape int //gd:RenderingServer.DOFBokehShape
const (
	// Calculate the DOF blur using a box filter. The fastest option, but results in obvious lines in blur pattern.
	DofBokehBox DOFBokehShape = 0
	// Calculates DOF blur using a hexagon shaped filter.
	DofBokehHexagon DOFBokehShape = 1
	// 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).
	DofBokehCircle DOFBokehShape = 2
)

type DecalFilter

type DecalFilter int //gd:RenderingServer.DecalFilter
const (
	// 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.
	DecalFilterNearest DecalFilter = 0
	// 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.
	DecalFilterLinear DecalFilter = 1
	// 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.
	DecalFilterNearestMipmaps DecalFilter = 2
	// 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.
	DecalFilterLinearMipmaps DecalFilter = 3
	// 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".
	//
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	DecalFilterNearestMipmapsAnisotropic DecalFilter = 4
	// 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".
	//
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	DecalFilterLinearMipmapsAnisotropic DecalFilter = 5
)

type DecalTexture

type DecalTexture int //gd:RenderingServer.DecalTexture
const (
	// Albedo texture slot in a decal ([Decal.TextureAlbedo]).
	//
	// [Decal.TextureAlbedo]: https://pkg.go.dev/graphics.gd/classdb/Decal#Instance.TextureAlbedo
	DecalTextureAlbedo DecalTexture = 0
	// Normal map texture slot in a decal ([Decal.TextureNormal]).
	//
	// [Decal.TextureNormal]: https://pkg.go.dev/graphics.gd/classdb/Decal#Instance.TextureNormal
	DecalTextureNormal DecalTexture = 1
	// Occlusion/Roughness/Metallic texture slot in a decal ([Decal.TextureOrm]).
	//
	// [Decal.TextureOrm]: https://pkg.go.dev/graphics.gd/classdb/Decal#Instance.TextureOrm
	DecalTextureOrm DecalTexture = 2
	// Emission texture slot in a decal ([Decal.TextureEmission]).
	//
	// [Decal.TextureEmission]: https://pkg.go.dev/graphics.gd/classdb/Decal#Instance.TextureEmission
	DecalTextureEmission DecalTexture = 3
	// Represents the size of the [DecalTexture] enum.
	DecalTextureMax DecalTexture = 4
)

type EnvironmentAmbientSource

type EnvironmentAmbientSource int //gd:RenderingServer.EnvironmentAmbientSource
const (
	// Gather ambient light from whichever source is specified as the background.
	EnvAmbientSourceBg EnvironmentAmbientSource = 0
	// Disable ambient light.
	EnvAmbientSourceDisabled EnvironmentAmbientSource = 1
	// Specify a specific [Color.RGBA] for ambient light.
	//
	// [Color.RGBA]: https://pkg.go.dev/graphics.gd/variant/Color#RGBA
	EnvAmbientSourceColor EnvironmentAmbientSource = 2
	// Gather ambient light from the [Sky] regardless of what the background is.
	//
	// [Sky]: https://pkg.go.dev/graphics.gd/classdb/Sky
	EnvAmbientSourceSky EnvironmentAmbientSource = 3
)

type EnvironmentBG

type EnvironmentBG int //gd:RenderingServer.EnvironmentBG
const (
	// Use the clear color as background.
	EnvBgClearColor EnvironmentBG = 0
	// Use a specified color as the background.
	EnvBgColor EnvironmentBG = 1
	// Use a sky resource for the background.
	EnvBgSky EnvironmentBG = 2
	// Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world.
	EnvBgCanvas EnvironmentBG = 3
	// Do not clear the background, use whatever was rendered last frame as the background.
	EnvBgKeep EnvironmentBG = 4
	// Displays a camera feed in the background.
	EnvBgCameraFeed EnvironmentBG = 5
	// Represents the size of the [EnvironmentBG] enum.
	EnvBgMax EnvironmentBG = 6
)

type EnvironmentFogMode

type EnvironmentFogMode int //gd:RenderingServer.EnvironmentFogMode
const (
	// Use a physically-based fog model defined primarily by fog density.
	EnvFogModeExponential EnvironmentFogMode = 0
	// 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.
	EnvFogModeDepth EnvironmentFogMode = 1
)

type EnvironmentGlowBlendMode

type EnvironmentGlowBlendMode int //gd:RenderingServer.EnvironmentGlowBlendMode
const (
	// Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources.
	EnvGlowBlendModeAdditive EnvironmentGlowBlendMode = 0
	// Screen glow blending mode. Increases brightness, used frequently with bloom.
	EnvGlowBlendModeScreen EnvironmentGlowBlendMode = 1
	// Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom).
	EnvGlowBlendModeSoftlight EnvironmentGlowBlendMode = 2
	// Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness.
	EnvGlowBlendModeReplace EnvironmentGlowBlendMode = 3
	// Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
	EnvGlowBlendModeMix EnvironmentGlowBlendMode = 4
)

type EnvironmentReflectionSource

type EnvironmentReflectionSource int //gd:RenderingServer.EnvironmentReflectionSource
const (
	// Use the background for reflections.
	EnvReflectionSourceBg EnvironmentReflectionSource = 0
	// Disable reflections.
	EnvReflectionSourceDisabled EnvironmentReflectionSource = 1
	// Use the [Sky] for reflections regardless of what the background is.
	//
	// [Sky]: https://pkg.go.dev/graphics.gd/classdb/Sky
	EnvReflectionSourceSky EnvironmentReflectionSource = 2
)

type EnvironmentSDFGIFramesToConverge

type EnvironmentSDFGIFramesToConverge int //gd:RenderingServer.EnvironmentSDFGIFramesToConverge
const (
	// Converge SDFGI over 5 frames. This is the most responsive, but creates the most noisy result with a given ray count.
	EnvSdfgiConvergeIn5Frames EnvironmentSDFGIFramesToConverge = 0
	// Configure SDFGI to fully converge over 10 frames.
	EnvSdfgiConvergeIn10Frames EnvironmentSDFGIFramesToConverge = 1
	// Configure SDFGI to fully converge over 15 frames.
	EnvSdfgiConvergeIn15Frames EnvironmentSDFGIFramesToConverge = 2
	// Configure SDFGI to fully converge over 20 frames.
	EnvSdfgiConvergeIn20Frames EnvironmentSDFGIFramesToConverge = 3
	// Configure SDFGI to fully converge over 25 frames.
	EnvSdfgiConvergeIn25Frames EnvironmentSDFGIFramesToConverge = 4
	// Configure SDFGI to fully converge over 30 frames. This is the least responsive, but creates the least noisy result with a given ray count.
	EnvSdfgiConvergeIn30Frames EnvironmentSDFGIFramesToConverge = 5
	// Represents the size of the [EnvironmentSDFGIFramesToConverge] enum.
	EnvSdfgiConvergeMax EnvironmentSDFGIFramesToConverge = 6
)

type EnvironmentSDFGIFramesToUpdateLight

type EnvironmentSDFGIFramesToUpdateLight int //gd:RenderingServer.EnvironmentSDFGIFramesToUpdateLight
const (
	// Update indirect light from dynamic lights in SDFGI over 1 frame. This is the most responsive, but has the highest GPU requirements.
	EnvSdfgiUpdateLightIn1Frame EnvironmentSDFGIFramesToUpdateLight = 0
	// Update indirect light from dynamic lights in SDFGI over 2 frames.
	EnvSdfgiUpdateLightIn2Frames EnvironmentSDFGIFramesToUpdateLight = 1
	// Update indirect light from dynamic lights in SDFGI over 4 frames.
	EnvSdfgiUpdateLightIn4Frames EnvironmentSDFGIFramesToUpdateLight = 2
	// Update indirect light from dynamic lights in SDFGI over 8 frames.
	EnvSdfgiUpdateLightIn8Frames EnvironmentSDFGIFramesToUpdateLight = 3
	// Update indirect light from dynamic lights in SDFGI over 16 frames. This is the least responsive, but has the lowest GPU requirements.
	EnvSdfgiUpdateLightIn16Frames EnvironmentSDFGIFramesToUpdateLight = 4
	// Represents the size of the [EnvironmentSDFGIFramesToUpdateLight] enum.
	EnvSdfgiUpdateLightMax EnvironmentSDFGIFramesToUpdateLight = 5
)

type EnvironmentSDFGIRayCount

type EnvironmentSDFGIRayCount int //gd:RenderingServer.EnvironmentSDFGIRayCount
const (
	// Throw 4 rays per frame when converging SDFGI. This has the lowest GPU requirements, but creates the most noisy result.
	EnvSdfgiRayCount4 EnvironmentSDFGIRayCount = 0
	// Throw 8 rays per frame when converging SDFGI.
	EnvSdfgiRayCount8 EnvironmentSDFGIRayCount = 1
	// Throw 16 rays per frame when converging SDFGI.
	EnvSdfgiRayCount16 EnvironmentSDFGIRayCount = 2
	// Throw 32 rays per frame when converging SDFGI.
	EnvSdfgiRayCount32 EnvironmentSDFGIRayCount = 3
	// Throw 64 rays per frame when converging SDFGI.
	EnvSdfgiRayCount64 EnvironmentSDFGIRayCount = 4
	// Throw 96 rays per frame when converging SDFGI. This has high GPU requirements.
	EnvSdfgiRayCount96 EnvironmentSDFGIRayCount = 5
	// Throw 128 rays per frame when converging SDFGI. This has very high GPU requirements, but creates the least noisy result.
	EnvSdfgiRayCount128 EnvironmentSDFGIRayCount = 6
	// Represents the size of the [EnvironmentSDFGIRayCount] enum.
	EnvSdfgiRayCountMax EnvironmentSDFGIRayCount = 7
)

type EnvironmentSDFGIYScale

type EnvironmentSDFGIYScale int //gd:RenderingServer.EnvironmentSDFGIYScale
const (
	// 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.
	EnvSdfgiYScale50Percent EnvironmentSDFGIYScale = 0
	// Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales.
	EnvSdfgiYScale75Percent EnvironmentSDFGIYScale = 1
	// 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.
	EnvSdfgiYScale100Percent EnvironmentSDFGIYScale = 2
)

type EnvironmentSSAOQuality

type EnvironmentSSAOQuality int //gd:RenderingServer.EnvironmentSSAOQuality
const (
	// Lowest quality of screen-space ambient occlusion.
	EnvSsaoQualityVeryLow EnvironmentSSAOQuality = 0
	// Low quality screen-space ambient occlusion.
	EnvSsaoQualityLow EnvironmentSSAOQuality = 1
	// Medium quality screen-space ambient occlusion.
	EnvSsaoQualityMedium EnvironmentSSAOQuality = 2
	// High quality screen-space ambient occlusion.
	EnvSsaoQualityHigh EnvironmentSSAOQuality = 3
	// Highest quality screen-space ambient occlusion. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
	EnvSsaoQualityUltra EnvironmentSSAOQuality = 4
)

type EnvironmentSSILQuality

type EnvironmentSSILQuality int //gd:RenderingServer.EnvironmentSSILQuality
const (
	// Lowest quality of screen-space indirect lighting.
	EnvSsilQualityVeryLow EnvironmentSSILQuality = 0
	// Low quality screen-space indirect lighting.
	EnvSsilQualityLow EnvironmentSSILQuality = 1
	// High quality screen-space indirect lighting.
	EnvSsilQualityMedium EnvironmentSSILQuality = 2
	// High quality screen-space indirect lighting.
	EnvSsilQualityHigh EnvironmentSSILQuality = 3
	// Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
	EnvSsilQualityUltra EnvironmentSSILQuality = 4
)

type EnvironmentSSRRoughnessQuality

type EnvironmentSSRRoughnessQuality int //gd:RenderingServer.EnvironmentSSRRoughnessQuality
const (
	// 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.
	EnvSsrRoughnessQualityDisabled EnvironmentSSRRoughnessQuality = 0
	// Low quality of roughness filter for screen-space reflections.
	EnvSsrRoughnessQualityLow EnvironmentSSRRoughnessQuality = 1
	// Medium quality of roughness filter for screen-space reflections.
	EnvSsrRoughnessQualityMedium EnvironmentSSRRoughnessQuality = 2
	// High quality of roughness filter for screen-space reflections. This is the slowest option.
	EnvSsrRoughnessQualityHigh EnvironmentSSRRoughnessQuality = 3
)

type EnvironmentToneMapper

type EnvironmentToneMapper int //gd:RenderingServer.EnvironmentToneMapper
const (
	// 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.
	EnvToneMapperLinear EnvironmentToneMapper = 0
	// 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 [EnvToneMapperLinear].
	//
	// Note: When [Environment.TonemapWhite] is left at the default value of 1.0, [EnvToneMapperReinhard] produces an identical image to [EnvToneMapperLinear].
	//
	// [Environment.TonemapWhite]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.TonemapWhite
	EnvToneMapperReinhard EnvironmentToneMapper = 1
	// Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than [EnvToneMapperReinhard]. Slightly slower than [EnvToneMapperReinhard].
	EnvToneMapperFilmic EnvironmentToneMapper = 2
	// Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than [EnvToneMapperFilmic].
	//
	// Note: This tonemapping operator is called "ACES Fitted" in Godot 3.x.
	EnvToneMapperAces EnvironmentToneMapper = 3
	// Uses a 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.
	//
	// Note: [Environment.TonemapWhite] is fixed at a value of 16.29, which makes [EnvToneMapperAgx] unsuitable for use with the Mobile rendering method.
	//
	// [Environment.TonemapWhite]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.TonemapWhite
	EnvToneMapperAgx EnvironmentToneMapper = 4
)

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

type Features

type Features int //gd:RenderingServer.Features
const (
	FeatureShaders       Features = 0
	FeatureMultithreaded Features = 1
)

type FogVolumeShape

type FogVolumeShape int //gd:RenderingServer.FogVolumeShape
const (
	// [FogVolume] will be shaped like an ellipsoid (stretched sphere).
	//
	// [FogVolume]: https://pkg.go.dev/graphics.gd/classdb/FogVolume
	FogVolumeShapeEllipsoid FogVolumeShape = 0
	// [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).
	//
	// [FogVolume]: https://pkg.go.dev/graphics.gd/classdb/FogVolume
	FogVolumeShapeCone FogVolumeShape = 1
	// [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).
	//
	// [FogVolume]: https://pkg.go.dev/graphics.gd/classdb/FogVolume
	FogVolumeShapeCylinder FogVolumeShape = 2
	// [FogVolume] will be shaped like a box.
	//
	// [FogVolume]: https://pkg.go.dev/graphics.gd/classdb/FogVolume
	FogVolumeShapeBox FogVolumeShape = 3
	// [FogVolume] will have no shape, will cover the whole world and will not be culled.
	//
	// [FogVolume]: https://pkg.go.dev/graphics.gd/classdb/FogVolume
	FogVolumeShapeWorld FogVolumeShape = 4
	// Represents the size of the [FogVolumeShape] enum.
	FogVolumeShapeMax FogVolumeShape = 5
)

type GlobalShaderParameterType

type GlobalShaderParameterType int //gd:RenderingServer.GlobalShaderParameterType
const (
	// Boolean global shader parameter (global uniform bool ...).
	GlobalVarTypeBool GlobalShaderParameterType = 0
	// 2-dimensional boolean vector global shader parameter (global uniform bvec2 ...).
	GlobalVarTypeBvec2 GlobalShaderParameterType = 1
	// 3-dimensional boolean vector global shader parameter (global uniform bvec3 ...).
	GlobalVarTypeBvec3 GlobalShaderParameterType = 2
	// 4-dimensional boolean vector global shader parameter (global uniform bvec4 ...).
	GlobalVarTypeBvec4 GlobalShaderParameterType = 3
	// Integer global shader parameter (global uniform int ...).
	GlobalVarTypeInt GlobalShaderParameterType = 4
	// 2-dimensional integer vector global shader parameter (global uniform ivec2 ...).
	GlobalVarTypeIvec2 GlobalShaderParameterType = 5
	// 3-dimensional integer vector global shader parameter (global uniform ivec3 ...).
	GlobalVarTypeIvec3 GlobalShaderParameterType = 6
	// 4-dimensional integer vector global shader parameter (global uniform ivec4 ...).
	GlobalVarTypeIvec4 GlobalShaderParameterType = 7
	// 2-dimensional integer rectangle global shader parameter (global uniform ivec4 ...). Equivalent to [GlobalVarTypeIvec4] in shader code, but exposed as a [Rect2i.PositionSize] in the editor UI.
	//
	// [Rect2i.PositionSize]: https://pkg.go.dev/graphics.gd/variant/Rect2i#PositionSize
	GlobalVarTypeRect2i GlobalShaderParameterType = 8
	// Unsigned integer global shader parameter (global uniform uint ...).
	GlobalVarTypeUint GlobalShaderParameterType = 9
	// 2-dimensional unsigned integer vector global shader parameter (global uniform uvec2 ...).
	GlobalVarTypeUvec2 GlobalShaderParameterType = 10
	// 3-dimensional unsigned integer vector global shader parameter (global uniform uvec3 ...).
	GlobalVarTypeUvec3 GlobalShaderParameterType = 11
	// 4-dimensional unsigned integer vector global shader parameter (global uniform uvec4 ...).
	GlobalVarTypeUvec4 GlobalShaderParameterType = 12
	// Single-precision floating-point global shader parameter (global uniform float ...).
	GlobalVarTypeFloat GlobalShaderParameterType = 13
	// 2-dimensional floating-point vector global shader parameter (global uniform vec2 ...).
	GlobalVarTypeVec2 GlobalShaderParameterType = 14
	// 3-dimensional floating-point vector global shader parameter (global uniform vec3 ...).
	GlobalVarTypeVec3 GlobalShaderParameterType = 15
	// 4-dimensional floating-point vector global shader parameter (global uniform vec4 ...).
	GlobalVarTypeVec4 GlobalShaderParameterType = 16
	// Color global shader parameter (global uniform vec4 ...). Equivalent to [GlobalVarTypeVec4] in shader code, but exposed as a [Color.RGBA] in the editor UI.
	//
	// [Color.RGBA]: https://pkg.go.dev/graphics.gd/variant/Color#RGBA
	GlobalVarTypeColor GlobalShaderParameterType = 17
	// 2-dimensional floating-point rectangle global shader parameter (global uniform vec4 ...). Equivalent to [GlobalVarTypeVec4] in shader code, but exposed as a [Rect2.PositionSize] in the editor UI.
	//
	// [Rect2.PositionSize]: https://pkg.go.dev/graphics.gd/variant/Rect2#PositionSize
	GlobalVarTypeRect2 GlobalShaderParameterType = 18
	// 2×2 matrix global shader parameter (global uniform mat2 ...). Exposed as a []int32 in the editor UI.
	GlobalVarTypeMat2 GlobalShaderParameterType = 19
	// 3×3 matrix global shader parameter (global uniform mat3 ...). Exposed as a [Basis.XYZ] in the editor UI.
	//
	// [Basis.XYZ]: https://pkg.go.dev/graphics.gd/variant/Basis#XYZ
	GlobalVarTypeMat3 GlobalShaderParameterType = 20
	// 4×4 matrix global shader parameter (global uniform mat4 ...). Exposed as a [Projection.XYZW] in the editor UI.
	//
	// [Projection.XYZW]: https://pkg.go.dev/graphics.gd/variant/Projection#XYZW
	GlobalVarTypeMat4 GlobalShaderParameterType = 21
	// 2-dimensional transform global shader parameter (global uniform mat2x3 ...). Exposed as a [Transform2D.OriginXY] in the editor UI.
	//
	// [Transform2D.OriginXY]: https://pkg.go.dev/graphics.gd/variant/Transform2D#OriginXY
	GlobalVarTypeTransform2d GlobalShaderParameterType = 22
	// 3-dimensional transform global shader parameter (global uniform mat3x4 ...). Exposed as a [Transform3D.BasisOrigin] in the editor UI.
	//
	// [Transform3D.BasisOrigin]: https://pkg.go.dev/graphics.gd/variant/Transform3D#BasisOrigin
	GlobalVarTypeTransform GlobalShaderParameterType = 23
	// 2D sampler global shader parameter (global uniform sampler2D ...). Exposed as a [Texture2D] in the editor UI.
	//
	// [Texture2D]: https://pkg.go.dev/graphics.gd/classdb/Texture2D
	GlobalVarTypeSampler2d GlobalShaderParameterType = 24
	// 2D sampler array global shader parameter (global uniform sampler2DArray ...). Exposed as a [Texture2DArray] in the editor UI.
	//
	// [Texture2DArray]: https://pkg.go.dev/graphics.gd/classdb/Texture2DArray
	GlobalVarTypeSampler2darray GlobalShaderParameterType = 25
	// 3D sampler global shader parameter (global uniform sampler3D ...). Exposed as a [Texture3D] in the editor UI.
	//
	// [Texture3D]: https://pkg.go.dev/graphics.gd/classdb/Texture3D
	GlobalVarTypeSampler3d GlobalShaderParameterType = 26
	// Cubemap sampler global shader parameter (global uniform samplerCube ...). Exposed as a [Cubemap] in the editor UI.
	//
	// [Cubemap]: https://pkg.go.dev/graphics.gd/classdb/Cubemap
	GlobalVarTypeSamplercube GlobalShaderParameterType = 27
	// External sampler global shader parameter (global uniform samplerExternalOES ...). Exposed as an [ExternalTexture] in the editor UI.
	//
	// [ExternalTexture]: https://pkg.go.dev/graphics.gd/classdb/ExternalTexture
	GlobalVarTypeSamplerext GlobalShaderParameterType = 28
	// Represents the size of the [GlobalShaderParameterType] enum.
	GlobalVarTypeMax GlobalShaderParameterType = 29
)

func GlobalShaderParameterGetType

func GlobalShaderParameterGetType(name string) GlobalShaderParameterType

Returns the type associated to the global shader uniform specified by 'name'.

Note: GlobalShaderParameterGet has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters.

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.RenderingServer

Instance of the class with convieniently typed arguments and results.

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) ID

func (self Instance) ID() ID

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type InstanceFlags

type InstanceFlags int //gd:RenderingServer.InstanceFlags
const (
	// Allows the instance to be used in baked lighting.
	InstanceFlagUseBakedLight InstanceFlags = 0
	// Allows the instance to be used with dynamic global illumination.
	InstanceFlagUseDynamicGi InstanceFlags = 1
	// When set, manually requests to draw geometry on next frame.
	InstanceFlagDrawNextFrameIfVisible InstanceFlags = 2
	// Always draw, even if the instance would be culled by occlusion culling. Does not affect view frustum culling.
	InstanceFlagIgnoreOcclusionCulling InstanceFlags = 3
	// Represents the size of the [InstanceFlags] enum.
	InstanceFlagMax InstanceFlags = 4
)

type InstanceType

type InstanceType int //gd:RenderingServer.InstanceType
const (
	// The instance does not have a type.
	InstanceNone InstanceType = 0
	// The instance is a mesh.
	InstanceMesh InstanceType = 1
	// The instance is a multimesh.
	InstanceMultimesh InstanceType = 2
	// The instance is a particle emitter.
	InstanceParticles InstanceType = 3
	// The instance is a GPUParticles collision shape.
	InstanceParticlesCollision InstanceType = 4
	// The instance is a light.
	InstanceLight InstanceType = 5
	// The instance is a reflection probe.
	InstanceReflectionProbe InstanceType = 6
	// The instance is a decal.
	InstanceDecal InstanceType = 7
	// The instance is a VoxelGI.
	InstanceVoxelGi InstanceType = 8
	// The instance is a lightmap.
	InstanceLightmap InstanceType = 9
	// The instance is an occlusion culling occluder.
	InstanceOccluder InstanceType = 10
	// The instance is a visible on-screen notifier.
	InstanceVisiblityNotifier InstanceType = 11
	// The instance is a fog volume.
	InstanceFogVolume InstanceType = 12
	// Represents the size of the [InstanceType] enum.
	InstanceMax InstanceType = 13
	// A combination of the flags of geometry instances (mesh, multimesh, immediate and particles).
	InstanceGeometryMask InstanceType = 14
)

type LightBakeMode

type LightBakeMode int //gd:RenderingServer.LightBakeMode
const (
	// 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.
	LightBakeDisabled LightBakeMode = 0
	// 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.
	//
	// [Environment.SdfgiEnabled]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.SdfgiEnabled
	// [LightmapGI]: https://pkg.go.dev/graphics.gd/classdb/LightmapGI
	// [VoxelGI]: https://pkg.go.dev/graphics.gd/classdb/VoxelGI
	LightBakeStatic LightBakeMode = 1
	// 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 [LightBakeStatic]. This has a greater performance cost compared to [LightBakeStatic]. When using SDFGI, the update speed of dynamic lights is affected by [ProjectSettings] "rendering/global_illumination/sdfgi/frames_to_update_lights".
	//
	// [Environment.SdfgiEnabled]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.SdfgiEnabled
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	// [VoxelGI]: https://pkg.go.dev/graphics.gd/classdb/VoxelGI
	LightBakeDynamic LightBakeMode = 2
)

type LightDirectionalShadowMode

type LightDirectionalShadowMode int //gd:RenderingServer.LightDirectionalShadowMode
const (
	// Use orthogonal shadow projection for directional light.
	LightDirectionalShadowOrthogonal LightDirectionalShadowMode = 0
	// Use 2 splits for shadow projection when using directional light.
	LightDirectionalShadowParallel2Splits LightDirectionalShadowMode = 1
	// Use 4 splits for shadow projection when using directional light.
	LightDirectionalShadowParallel4Splits LightDirectionalShadowMode = 2
)

type LightDirectionalSkyMode

type LightDirectionalSkyMode int //gd:RenderingServer.LightDirectionalSkyMode
const (
	// Use DirectionalLight3D in both sky rendering and scene lighting.
	LightDirectionalSkyModeLightAndSky LightDirectionalSkyMode = 0
	// Only use DirectionalLight3D in scene lighting.
	LightDirectionalSkyModeLightOnly LightDirectionalSkyMode = 1
	// Only use DirectionalLight3D in sky rendering.
	LightDirectionalSkyModeSkyOnly LightDirectionalSkyMode = 2
)

type LightOmniShadowMode

type LightOmniShadowMode int //gd:RenderingServer.LightOmniShadowMode
const (
	// Use a dual paraboloid shadow map for omni lights.
	LightOmniShadowDualParaboloid LightOmniShadowMode = 0
	// Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid.
	LightOmniShadowCube LightOmniShadowMode = 1
)

type LightParam

type LightParam int //gd:RenderingServer.LightParam
const (
	// The light's energy multiplier.
	LightParamEnergy LightParam = 0
	// The light's indirect energy multiplier (final indirect energy is [LightParamEnergy] * [LightParamIndirectEnergy]).
	LightParamIndirectEnergy LightParam = 1
	// The light's volumetric fog energy multiplier (final volumetric fog energy is [LightParamEnergy] * [LightParamVolumetricFogEnergy]).
	LightParamVolumetricFogEnergy LightParam = 2
	// The light's influence on specularity.
	LightParamSpecular LightParam = 3
	// The light's range.
	LightParamRange LightParam = 4
	// The size of the light when using spot light or omni light. The angular size of the light when using directional light.
	LightParamSize LightParam = 5
	// The light's attenuation.
	LightParamAttenuation LightParam = 6
	// The spotlight's angle.
	LightParamSpotAngle LightParam = 7
	// The spotlight's attenuation.
	LightParamSpotAttenuation LightParam = 8
	// 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).
	LightParamShadowMaxDistance LightParam = 9
	// Proportion of shadow atlas occupied by the first split.
	LightParamShadowSplit1Offset LightParam = 10
	// Proportion of shadow atlas occupied by the second split.
	LightParamShadowSplit2Offset LightParam = 11
	// Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest.
	LightParamShadowSplit3Offset LightParam = 12
	// Proportion of shadow max distance where the shadow will start to fade out.
	LightParamShadowFadeStart LightParam = 13
	// Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts.
	LightParamShadowNormalBias LightParam = 14
	// Bias for the shadow lookup to fix self-shadowing artifacts.
	LightParamShadowBias LightParam = 15
	// 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.
	LightParamShadowPancakeSize LightParam = 16
	// 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.
	LightParamShadowOpacity LightParam = 17
	// 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.
	LightParamShadowBlur        LightParam = 18
	LightParamTransmittanceBias LightParam = 19
	// 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.
	//
	// [DirectionalLight3D]: https://pkg.go.dev/graphics.gd/classdb/DirectionalLight3D
	// [OmniLight3D]: https://pkg.go.dev/graphics.gd/classdb/OmniLight3D
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	// [SpotLight3D]: https://pkg.go.dev/graphics.gd/classdb/SpotLight3D
	LightParamIntensity LightParam = 20
	// Represents the size of the [LightParam] enum.
	LightParamMax LightParam = 21
)

type LightProjectorFilter

type LightProjectorFilter int //gd:RenderingServer.LightProjectorFilter
const (
	// 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.
	LightProjectorFilterNearest LightProjectorFilter = 0
	// 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.
	LightProjectorFilterLinear LightProjectorFilter = 1
	// 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.
	LightProjectorFilterNearestMipmaps LightProjectorFilter = 2
	// 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.
	LightProjectorFilterLinearMipmaps LightProjectorFilter = 3
	// 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".
	//
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	LightProjectorFilterNearestMipmapsAnisotropic LightProjectorFilter = 4
	// 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".
	//
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	LightProjectorFilterLinearMipmapsAnisotropic LightProjectorFilter = 5
)

type LightType

type LightType int //gd:RenderingServer.LightType
const (
	// Directional (sun/moon) light (see [DirectionalLight3D]).
	//
	// [DirectionalLight3D]: https://pkg.go.dev/graphics.gd/classdb/DirectionalLight3D
	LightDirectional LightType = 0
	// Omni light (see [OmniLight3D]).
	//
	// [OmniLight3D]: https://pkg.go.dev/graphics.gd/classdb/OmniLight3D
	LightOmni LightType = 1
	// Spot light (see [SpotLight3D]).
	//
	// [SpotLight3D]: https://pkg.go.dev/graphics.gd/classdb/SpotLight3D
	LightSpot LightType = 2
)

type MultimeshPhysicsInterpolationQuality

type MultimeshPhysicsInterpolationQuality int //gd:RenderingServer.MultimeshPhysicsInterpolationQuality
const (
	// MultiMesh physics interpolation favors speed over quality.
	MultimeshInterpQualityFast MultimeshPhysicsInterpolationQuality = 0
	// MultiMesh physics interpolation favors quality over speed.
	MultimeshInterpQualityHigh MultimeshPhysicsInterpolationQuality = 1
)

type MultimeshTransformFormat

type MultimeshTransformFormat int //gd:RenderingServer.MultimeshTransformFormat
const (
	// Use [Transform2D.OriginXY] to store MultiMesh transform.
	//
	// [Transform2D.OriginXY]: https://pkg.go.dev/graphics.gd/variant/Transform2D#OriginXY
	MultimeshTransform2d MultimeshTransformFormat = 0
	// Use [Transform3D.BasisOrigin] to store MultiMesh transform.
	//
	// [Transform3D.BasisOrigin]: https://pkg.go.dev/graphics.gd/variant/Transform3D#BasisOrigin
	MultimeshTransform3d MultimeshTransformFormat = 1
)

type NinePatchAxisMode

type NinePatchAxisMode int //gd:RenderingServer.NinePatchAxisMode
const (
	// The nine patch gets stretched where needed.
	NinePatchStretch NinePatchAxisMode = 0
	// The nine patch gets filled with tiles where needed.
	NinePatchTile NinePatchAxisMode = 1
	// The nine patch gets filled with tiles where needed and stretches them a bit if needed.
	NinePatchTileFit NinePatchAxisMode = 2
)

type ParticlesCollisionHeightfieldResolution

type ParticlesCollisionHeightfieldResolution int //gd:RenderingServer.ParticlesCollisionHeightfieldResolution
const (
	ParticlesCollisionHeightfieldResolution256  ParticlesCollisionHeightfieldResolution = 0
	ParticlesCollisionHeightfieldResolution512  ParticlesCollisionHeightfieldResolution = 1
	ParticlesCollisionHeightfieldResolution1024 ParticlesCollisionHeightfieldResolution = 2
	ParticlesCollisionHeightfieldResolution2048 ParticlesCollisionHeightfieldResolution = 3
	ParticlesCollisionHeightfieldResolution4096 ParticlesCollisionHeightfieldResolution = 4
	ParticlesCollisionHeightfieldResolution8192 ParticlesCollisionHeightfieldResolution = 5
	// Represents the size of the [ParticlesCollisionHeightfieldResolution] enum.
	ParticlesCollisionHeightfieldResolutionMax ParticlesCollisionHeightfieldResolution = 6
)

type ParticlesCollisionType

type ParticlesCollisionType int //gd:RenderingServer.ParticlesCollisionType
const (
	ParticlesCollisionTypeSphereAttract      ParticlesCollisionType = 0
	ParticlesCollisionTypeBoxAttract         ParticlesCollisionType = 1
	ParticlesCollisionTypeVectorFieldAttract ParticlesCollisionType = 2
	ParticlesCollisionTypeSphereCollide      ParticlesCollisionType = 3
	ParticlesCollisionTypeBoxCollide         ParticlesCollisionType = 4
	ParticlesCollisionTypeSdfCollide         ParticlesCollisionType = 5
	ParticlesCollisionTypeHeightfieldCollide ParticlesCollisionType = 6
)

type ParticlesDrawOrder

type ParticlesDrawOrder int //gd:RenderingServer.ParticlesDrawOrder
const (
	// Draw particles in the order that they appear in the particles array.
	ParticlesDrawOrderIndex ParticlesDrawOrder = 0
	// Sort particles based on their lifetime. In other words, the particle with the highest lifetime is drawn at the front.
	ParticlesDrawOrderLifetime ParticlesDrawOrder = 1
	// Sort particles based on the inverse of their lifetime. In other words, the particle with the lowest lifetime is drawn at the front.
	ParticlesDrawOrderReverseLifetime ParticlesDrawOrder = 2
	// Sort particles based on their distance to the camera.
	ParticlesDrawOrderViewDepth ParticlesDrawOrder = 3
)

type ParticlesEmitFlag

type ParticlesEmitFlag int
const ParticlesEmitFlagColor ParticlesEmitFlag = 8 //gd:RenderingServer.PARTICLES_EMIT_FLAG_COLOR
const ParticlesEmitFlagCustom ParticlesEmitFlag = 16 //gd:RenderingServer.PARTICLES_EMIT_FLAG_CUSTOM
const ParticlesEmitFlagPosition ParticlesEmitFlag = 1 //gd:RenderingServer.PARTICLES_EMIT_FLAG_POSITION
const ParticlesEmitFlagRotationScale ParticlesEmitFlag = 2 //gd:RenderingServer.PARTICLES_EMIT_FLAG_ROTATION_SCALE
const ParticlesEmitFlagVelocity ParticlesEmitFlag = 4 //gd:RenderingServer.PARTICLES_EMIT_FLAG_VELOCITY

type ParticlesMode

type ParticlesMode int //gd:RenderingServer.ParticlesMode
const (
	// 2D particles.
	ParticlesMode2d ParticlesMode = 0
	// 3D particles.
	ParticlesMode3d ParticlesMode = 1
)

type ParticlesTransformAlign

type ParticlesTransformAlign int //gd:RenderingServer.ParticlesTransformAlign
const (
	ParticlesTransformAlignDisabled              ParticlesTransformAlign = 0
	ParticlesTransformAlignZBillboard            ParticlesTransformAlign = 1
	ParticlesTransformAlignYToVelocity           ParticlesTransformAlign = 2
	ParticlesTransformAlignZBillboardYToVelocity ParticlesTransformAlign = 3
)

type PipelineSource

type PipelineSource int //gd:RenderingServer.PipelineSource
const (
	// Pipeline compilation that was triggered by the 2D canvas renderer.
	PipelineSourceCanvas PipelineSource = 0
	// Pipeline compilation that was triggered by loading a mesh.
	PipelineSourceMesh PipelineSource = 1
	// Pipeline compilation that was triggered by building the surface cache before rendering the scene.
	PipelineSourceSurface PipelineSource = 2
	// Pipeline compilation that was triggered while drawing the scene.
	PipelineSourceDraw PipelineSource = 3
	// Pipeline compilation that was triggered to optimize the current scene.
	PipelineSourceSpecialization PipelineSource = 4
	// Represents the size of the [PipelineSource] enum.
	PipelineSourceMax PipelineSource = 5
)

type PrimitiveType

type PrimitiveType int //gd:RenderingServer.PrimitiveType
const (
	// Primitive to draw consists of points.
	PrimitivePoints PrimitiveType = 0
	// Primitive to draw consists of lines.
	PrimitiveLines PrimitiveType = 1
	// Primitive to draw consists of a line strip from start to end.
	PrimitiveLineStrip PrimitiveType = 2
	// Primitive to draw consists of triangles.
	PrimitiveTriangles PrimitiveType = 3
	// Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle).
	PrimitiveTriangleStrip PrimitiveType = 4
	// Represents the size of the [PrimitiveType] enum.
	PrimitiveMax PrimitiveType = 5
)

type ReflectionProbeAmbientMode

type ReflectionProbeAmbientMode int //gd:RenderingServer.ReflectionProbeAmbientMode
const (
	// Do not apply any ambient lighting inside the reflection probe's box defined by its size.
	ReflectionProbeAmbientDisabled ReflectionProbeAmbientMode = 0
	// Apply automatically-sourced environment lighting inside the reflection probe's box defined by its size.
	ReflectionProbeAmbientEnvironment ReflectionProbeAmbientMode = 1
	// Apply custom ambient lighting inside the reflection probe's box defined by its size. See [ReflectionProbeSetAmbientColor] and [ReflectionProbeSetAmbientEnergy].
	//
	// [ReflectionProbeSetAmbientColor]: https://pkg.go.dev/graphics.gd/classdb/#Instance.ReflectionProbeSetAmbientColor
	// [ReflectionProbeSetAmbientEnergy]: https://pkg.go.dev/graphics.gd/classdb/#Instance.ReflectionProbeSetAmbientEnergy
	ReflectionProbeAmbientColor ReflectionProbeAmbientMode = 2
)

type ReflectionProbeUpdateMode

type ReflectionProbeUpdateMode int //gd:RenderingServer.ReflectionProbeUpdateMode
const (
	// Reflection probe will update reflections once and then stop.
	ReflectionProbeUpdateOnce ReflectionProbeUpdateMode = 0
	// Reflection probe will update each frame. This mode is necessary to capture moving objects.
	ReflectionProbeUpdateAlways ReflectionProbeUpdateMode = 1
)

type RenderingInfo

type RenderingInfo int //gd:RenderingServer.RenderingInfo
const (
	// Number of objects rendered in the current 3D scene. This varies depending on camera position and rotation.
	RenderingInfoTotalObjectsInFrame RenderingInfo = 0
	// Number of points, lines, or triangles rendered in the current 3D scene. This varies depending on camera position and rotation.
	RenderingInfoTotalPrimitivesInFrame RenderingInfo = 1
	// Number of draw calls performed to render in the current 3D scene. This varies depending on camera position and rotation.
	RenderingInfoTotalDrawCallsInFrame RenderingInfo = 2
	// Texture memory used (in bytes).
	RenderingInfoTextureMemUsed RenderingInfo = 3
	// Buffer memory used (in bytes). This includes vertex data, uniform buffers, and many miscellaneous buffer types used internally.
	RenderingInfoBufferMemUsed RenderingInfo = 4
	// Video memory used (in bytes). When using the Forward+ or Mobile renderers, this is always greater than the sum of [RenderingInfoTextureMemUsed] and [RenderingInfoBufferMemUsed], since there is miscellaneous data not accounted for by those two metrics. When using the Compatibility renderer, this is equal to the sum of [RenderingInfoTextureMemUsed] and [RenderingInfoBufferMemUsed].
	RenderingInfoVideoMemUsed RenderingInfo = 5
	// Number of pipeline compilations that were triggered by the 2D canvas renderer.
	RenderingInfoPipelineCompilationsCanvas RenderingInfo = 6
	// 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.
	RenderingInfoPipelineCompilationsMesh RenderingInfo = 7
	// 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.
	RenderingInfoPipelineCompilationsSurface RenderingInfo = 8
	// 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.
	RenderingInfoPipelineCompilationsDraw RenderingInfo = 9
	// 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.
	RenderingInfoPipelineCompilationsSpecialization RenderingInfo = 10
)

type ShaderMode

type ShaderMode int //gd:RenderingServer.ShaderMode
const (
	// Shader is a 3D shader.
	ShaderSpatial ShaderMode = 0
	// Shader is a 2D shader.
	ShaderCanvasItem ShaderMode = 1
	// Shader is a particle shader (can be used in both 2D and 3D).
	ShaderParticles ShaderMode = 2
	// Shader is a 3D sky shader.
	ShaderSky ShaderMode = 3
	// Shader is a 3D fog shader.
	ShaderFog ShaderMode = 4
	// Represents the size of the [ShaderMode] enum.
	ShaderMax ShaderMode = 5
)

type ShadowCastingSetting

type ShadowCastingSetting int //gd:RenderingServer.ShadowCastingSetting
const (
	// Disable shadows from this instance.
	ShadowCastingSettingOff ShadowCastingSetting = 0
	// Cast shadows from this instance.
	ShadowCastingSettingOn ShadowCastingSetting = 1
	// Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows.
	ShadowCastingSettingDoubleSided ShadowCastingSetting = 2
	// Only render the shadows from the object. The object itself will not be drawn.
	ShadowCastingSettingShadowsOnly ShadowCastingSetting = 3
)

type ShadowQuality

type ShadowQuality int //gd:RenderingServer.ShadowQuality
const (
	// 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.
	//
	// [Light3D.LightAngularDistance]: https://pkg.go.dev/graphics.gd/classdb/Light3D#Instance.LightAngularDistance
	// [Light3D.LightSize]: https://pkg.go.dev/graphics.gd/classdb/Light3D#Instance.LightSize
	// [Light3D.ShadowBlur]: https://pkg.go.dev/graphics.gd/classdb/Light3D#Instance.ShadowBlur
	ShadowQualityHard ShadowQuality = 0
	// 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).
	//
	// [Light3D.LightAngularDistance]: https://pkg.go.dev/graphics.gd/classdb/Light3D#Instance.LightAngularDistance
	// [Light3D.LightSize]: https://pkg.go.dev/graphics.gd/classdb/Light3D#Instance.LightSize
	// [Light3D.ShadowBlur]: https://pkg.go.dev/graphics.gd/classdb/Light3D#Instance.ShadowBlur
	ShadowQualitySoftVeryLow ShadowQuality = 1
	// Low shadow filtering quality (fast).
	ShadowQualitySoftLow ShadowQuality = 2
	// Medium low shadow filtering quality (average).
	ShadowQualitySoftMedium ShadowQuality = 3
	// 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).
	//
	// [Light3D.LightAngularDistance]: https://pkg.go.dev/graphics.gd/classdb/Light3D#Instance.LightAngularDistance
	// [Light3D.LightSize]: https://pkg.go.dev/graphics.gd/classdb/Light3D#Instance.LightSize
	// [Light3D.ShadowBlur]: https://pkg.go.dev/graphics.gd/classdb/Light3D#Instance.ShadowBlur
	ShadowQualitySoftHigh ShadowQuality = 4
	// 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).
	//
	// [Light3D.LightAngularDistance]: https://pkg.go.dev/graphics.gd/classdb/Light3D#Instance.LightAngularDistance
	// [Light3D.LightSize]: https://pkg.go.dev/graphics.gd/classdb/Light3D#Instance.LightSize
	// [Light3D.ShadowBlur]: https://pkg.go.dev/graphics.gd/classdb/Light3D#Instance.ShadowBlur
	ShadowQualitySoftUltra ShadowQuality = 5
	// Represents the size of the [ShadowQuality] enum.
	ShadowQualityMax ShadowQuality = 6
)

type SkyMode

type SkyMode int //gd:RenderingServer.SkyMode
const (
	// Automatically selects the appropriate process mode based on your sky shader. If your shader uses TIME or POSITION, this will use [SkyModeRealtime]. If your shader uses any of the LIGHT_* variables or any custom uniforms, this uses [SkyModeIncremental]. Otherwise, this defaults to [SkyModeQuality].
	SkyModeAutomatic SkyMode = 0
	// Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [SkyModeRealtime] 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".
	//
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	SkyModeQuality SkyMode = 1
	// Uses the same high quality importance sampling to process the radiance map as [SkyModeQuality], 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.
	//
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	SkyModeIncremental SkyMode = 2
	// 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 [SkySetRadianceSize] must be set to 256. Otherwise, a warning is printed and the overridden radiance size is ignored.
	//
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	// [SkySetRadianceSize]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SkySetRadianceSize
	SkyModeRealtime SkyMode = 3
)

type SubSurfaceScatteringQuality

type SubSurfaceScatteringQuality int //gd:RenderingServer.SubSurfaceScatteringQuality
const (
	// Disables subsurface scattering entirely, even on materials that have [BaseMaterial3D.SubsurfScatterEnabled] set to true. This has the lowest GPU requirements.
	//
	// [BaseMaterial3D.SubsurfScatterEnabled]: https://pkg.go.dev/graphics.gd/classdb/BaseMaterial3D#Instance.SubsurfScatterEnabled
	SubSurfaceScatteringQualityDisabled SubSurfaceScatteringQuality = 0
	// Low subsurface scattering quality.
	SubSurfaceScatteringQualityLow SubSurfaceScatteringQuality = 1
	// Medium subsurface scattering quality.
	SubSurfaceScatteringQualityMedium SubSurfaceScatteringQuality = 2
	// High subsurface scattering quality. This has the highest GPU requirements.
	SubSurfaceScatteringQualityHigh SubSurfaceScatteringQuality = 3
)

type Surface

type Surface map[interface{}]interface{}

func MeshGetSurface

func MeshGetSurface(mesh RID.Mesh, surface int) Surface

type TextureLayeredType

type TextureLayeredType int //gd:RenderingServer.TextureLayeredType
const (
	// Array of 2-dimensional textures (see [Texture2DArray]).
	//
	// [Texture2DArray]: https://pkg.go.dev/graphics.gd/classdb/Texture2DArray
	TextureLayered2dArray TextureLayeredType = 0
	// Cubemap texture (see [Cubemap]).
	//
	// [Cubemap]: https://pkg.go.dev/graphics.gd/classdb/Cubemap
	TextureLayeredCubemap TextureLayeredType = 1
	// Array of cubemap textures (see [CubemapArray]).
	//
	// [CubemapArray]: https://pkg.go.dev/graphics.gd/classdb/CubemapArray
	TextureLayeredCubemapArray TextureLayeredType = 2
)

type TextureType

type TextureType int //gd:RenderingServer.TextureType
const (
	// 2D texture.
	TextureType2d TextureType = 0
	// Layered texture.
	TextureTypeLayered TextureType = 1
	// 3D texture.
	TextureType3d TextureType = 2
)

type ViewportAnisotropicFiltering

type ViewportAnisotropicFiltering int //gd:RenderingServer.ViewportAnisotropicFiltering
const (
	// Anisotropic filtering is disabled.
	ViewportAnisotropyDisabled ViewportAnisotropicFiltering = 0
	// Use 2× anisotropic filtering.
	ViewportAnisotropy2x ViewportAnisotropicFiltering = 1
	// Use 4× anisotropic filtering. This is the default value.
	ViewportAnisotropy4x ViewportAnisotropicFiltering = 2
	// Use 8× anisotropic filtering.
	ViewportAnisotropy8x ViewportAnisotropicFiltering = 3
	// Use 16× anisotropic filtering.
	ViewportAnisotropy16x ViewportAnisotropicFiltering = 4
	// Represents the size of the [ViewportAnisotropicFiltering] enum.
	ViewportAnisotropyMax ViewportAnisotropicFiltering = 5
)

type ViewportClearMode

type ViewportClearMode int //gd:RenderingServer.ViewportClearMode
const (
	// Always clear the viewport's render target before drawing.
	ViewportClearAlways ViewportClearMode = 0
	// Never clear the viewport's render target.
	ViewportClearNever ViewportClearMode = 1
	// Clear the viewport's render target on the next frame, then switch to [ViewportClearNever].
	ViewportClearOnlyNextFrame ViewportClearMode = 2
)

type ViewportDebugDraw

type ViewportDebugDraw int //gd:RenderingServer.ViewportDebugDraw
const (
	// Debug draw is disabled. Default setting.
	ViewportDebugDrawDisabled ViewportDebugDraw = 0
	// Objects are displayed without light information.
	ViewportDebugDrawUnshaded ViewportDebugDraw = 1
	// 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.
	ViewportDebugDrawLighting ViewportDebugDraw = 2
	// 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.
	ViewportDebugDrawOverdraw ViewportDebugDraw = 3
	// Debug draw draws objects in wireframe.
	//
	// Note: [SetDebugGenerateWireframes] must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer.
	//
	// [SetDebugGenerateWireframes]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetDebugGenerateWireframes
	ViewportDebugDrawWireframe ViewportDebugDraw = 4
	// Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects.
	ViewportDebugDrawNormalBuffer ViewportDebugDraw = 5
	// Objects are displayed with only the albedo value from [VoxelGI]s. 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.
	//
	// [VoxelGI]: https://pkg.go.dev/graphics.gd/classdb/VoxelGI
	ViewportDebugDrawVoxelGiAlbedo ViewportDebugDraw = 6
	// Objects are displayed with only the lighting value from [VoxelGI]s. 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.
	//
	// [VoxelGI]: https://pkg.go.dev/graphics.gd/classdb/VoxelGI
	ViewportDebugDrawVoxelGiLighting ViewportDebugDraw = 7
	// Objects are displayed with only the emission color from [VoxelGI]s. 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.
	//
	// [VoxelGI]: https://pkg.go.dev/graphics.gd/classdb/VoxelGI
	ViewportDebugDrawVoxelGiEmission ViewportDebugDraw = 8
	// Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport].
	//
	// [OmniLight3D]: https://pkg.go.dev/graphics.gd/classdb/OmniLight3D
	// [SpotLight3D]: https://pkg.go.dev/graphics.gd/classdb/SpotLight3D
	// [Viewport]: https://pkg.go.dev/graphics.gd/classdb/Viewport
	ViewportDebugDrawShadowAtlas ViewportDebugDraw = 9
	// Draws the shadow atlas that stores shadows from [DirectionalLight3D]s 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 [ViewportDebugDrawPssmSplits]. 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.
	//
	// [DirectionalLight3D]: https://pkg.go.dev/graphics.gd/classdb/DirectionalLight3D
	// [Viewport]: https://pkg.go.dev/graphics.gd/classdb/Viewport
	ViewportDebugDrawDirectionalShadowAtlas ViewportDebugDraw = 10
	// 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.
	ViewportDebugDrawSceneLuminance ViewportDebugDraw = 11
	// 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.
	//
	// [Environment.SsaoEnabled]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.SsaoEnabled
	// [WorldEnvironment]: https://pkg.go.dev/graphics.gd/classdb/WorldEnvironment
	ViewportDebugDrawSsao ViewportDebugDraw = 12
	// 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.
	//
	// [Environment.SsilEnabled]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.SsilEnabled
	// [WorldEnvironment]: https://pkg.go.dev/graphics.gd/classdb/WorldEnvironment
	ViewportDebugDrawSsil ViewportDebugDraw = 13
	// Colors each PSSM split for the [DirectionalLight3D]s 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.
	//
	// [DirectionalLight3D]: https://pkg.go.dev/graphics.gd/classdb/DirectionalLight3D
	ViewportDebugDrawPssmSplits ViewportDebugDraw = 14
	// Draws the decal atlas that stores decal textures from [Decal]s.
	//
	// Note: Only supported when using the Forward+ or Mobile rendering methods.
	//
	// [Decal]: https://pkg.go.dev/graphics.gd/classdb/Decal
	ViewportDebugDrawDecalAtlas ViewportDebugDraw = 15
	// 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.
	ViewportDebugDrawSdfgi ViewportDebugDraw = 16
	// Draws SDFGI probe data. This is the data structure that is used to give indirect lighting dynamic objects moving within the scene.
	//
	// Note: Only supported when using the Forward+ rendering method.
	ViewportDebugDrawSdfgiProbes ViewportDebugDraw = 17
	// 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.
	//
	// [Environment.SdfgiEnabled]: https://pkg.go.dev/graphics.gd/classdb/Environment#Instance.SdfgiEnabled
	// [VoxelGI]: https://pkg.go.dev/graphics.gd/classdb/VoxelGI
	ViewportDebugDrawGiBuffer ViewportDebugDraw = 18
	// Disable mesh LOD. All meshes are drawn with full detail, which can be used to compare performance.
	ViewportDebugDrawDisableLod ViewportDebugDraw = 19
	// 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.
	//
	// [OmniLight3D]: https://pkg.go.dev/graphics.gd/classdb/OmniLight3D
	ViewportDebugDrawClusterOmniLights ViewportDebugDraw = 20
	// 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.
	//
	// [SpotLight3D]: https://pkg.go.dev/graphics.gd/classdb/SpotLight3D
	ViewportDebugDrawClusterSpotLights ViewportDebugDraw = 21
	// 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.
	//
	// [Decal]: https://pkg.go.dev/graphics.gd/classdb/Decal
	ViewportDebugDrawClusterDecals ViewportDebugDraw = 22
	// 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.
	//
	// [ReflectionProbe]: https://pkg.go.dev/graphics.gd/classdb/ReflectionProbe
	ViewportDebugDrawClusterReflectionProbes ViewportDebugDraw = 23
	// 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.
	ViewportDebugDrawOccluders ViewportDebugDraw = 24
	// 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.
	ViewportDebugDrawMotionVectors ViewportDebugDraw = 25
	// 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.
	ViewportDebugDrawInternalBuffer ViewportDebugDraw = 26
)

type ViewportEnvironmentMode

type ViewportEnvironmentMode int //gd:RenderingServer.ViewportEnvironmentMode
const (
	// Disable rendering of 3D environment over 2D canvas.
	ViewportEnvironmentDisabled ViewportEnvironmentMode = 0
	// Enable rendering of 3D environment over 2D canvas.
	ViewportEnvironmentEnabled ViewportEnvironmentMode = 1
	// Inherit enable/disable value from parent. If the topmost parent is also set to [ViewportEnvironmentInherit], then this has the same behavior as [ViewportEnvironmentEnabled].
	ViewportEnvironmentInherit ViewportEnvironmentMode = 2
	// Represents the size of the [ViewportEnvironmentMode] enum.
	ViewportEnvironmentMax ViewportEnvironmentMode = 3
)

type ViewportMSAA

type ViewportMSAA int //gd:RenderingServer.ViewportMSAA
const (
	// Multisample antialiasing for 3D is disabled. This is the default value, and also the fastest setting.
	ViewportMsaaDisabled ViewportMSAA = 0
	// Multisample antialiasing uses 2 samples per pixel for 3D. This has a moderate impact on performance.
	ViewportMsaa2x ViewportMSAA = 1
	// Multisample antialiasing uses 4 samples per pixel for 3D. This has a high impact on performance.
	ViewportMsaa4x ViewportMSAA = 2
	// 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.
	ViewportMsaa8x ViewportMSAA = 3
	// Represents the size of the [ViewportMSAA] enum.
	ViewportMsaaMax ViewportMSAA = 4
)

type ViewportOcclusionCullingBuildQuality

type ViewportOcclusionCullingBuildQuality int //gd:RenderingServer.ViewportOcclusionCullingBuildQuality
const (
	// Low occlusion culling BVH build quality (as defined by Embree). Results in the lowest CPU usage, but least effective culling.
	ViewportOcclusionBuildQualityLow ViewportOcclusionCullingBuildQuality = 0
	// Medium occlusion culling BVH build quality (as defined by Embree).
	ViewportOcclusionBuildQualityMedium ViewportOcclusionCullingBuildQuality = 1
	// High occlusion culling BVH build quality (as defined by Embree). Results in the highest CPU usage, but most effective culling.
	ViewportOcclusionBuildQualityHigh ViewportOcclusionCullingBuildQuality = 2
)

type ViewportRenderInfo

type ViewportRenderInfo int //gd:RenderingServer.ViewportRenderInfo
const (
	// Number of objects drawn in a single frame.
	ViewportRenderInfoObjectsInFrame ViewportRenderInfo = 0
	// Number of points, lines, or triangles drawn in a single frame.
	ViewportRenderInfoPrimitivesInFrame ViewportRenderInfo = 1
	// Number of draw calls during this frame.
	ViewportRenderInfoDrawCallsInFrame ViewportRenderInfo = 2
	// Represents the size of the [ViewportRenderInfo] enum.
	ViewportRenderInfoMax ViewportRenderInfo = 3
)

type ViewportRenderInfoType

type ViewportRenderInfoType int //gd:RenderingServer.ViewportRenderInfoType
const (
	// Visible render pass (excluding shadows).
	ViewportRenderInfoTypeVisible ViewportRenderInfoType = 0
	// 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.
	ViewportRenderInfoTypeShadow ViewportRenderInfoType = 1
	// Canvas item rendering. This includes all 2D rendering.
	ViewportRenderInfoTypeCanvas ViewportRenderInfoType = 2
	// Represents the size of the [ViewportRenderInfoType] enum.
	ViewportRenderInfoTypeMax ViewportRenderInfoType = 3
)

type ViewportSDFOversize

type ViewportSDFOversize int //gd:RenderingServer.ViewportSDFOversize
const (
	// 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.
	//
	// [GPUParticles3D]: https://pkg.go.dev/graphics.gd/classdb/GPUParticles3D
	ViewportSdfOversize100Percent ViewportSDFOversize = 0
	// 2D signed distance field covers 20% of the viewport's size outside the viewport on each side (top, right, bottom, left).
	ViewportSdfOversize120Percent ViewportSDFOversize = 1
	// 2D signed distance field covers 50% of the viewport's size outside the viewport on each side (top, right, bottom, left).
	ViewportSdfOversize150Percent ViewportSDFOversize = 2
	// 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.
	ViewportSdfOversize200Percent ViewportSDFOversize = 3
	// Represents the size of the [ViewportSDFOversize] enum.
	ViewportSdfOversizeMax ViewportSDFOversize = 4
)

type ViewportSDFScale

type ViewportSDFScale int //gd:RenderingServer.ViewportSDFScale
const (
	// Full resolution 2D signed distance field scale. This has the highest GPU requirements.
	ViewportSdfScale100Percent ViewportSDFScale = 0
	// Half resolution 2D signed distance field scale on each axis (25% of the viewport pixel count).
	ViewportSdfScale50Percent ViewportSDFScale = 1
	// Quarter resolution 2D signed distance field scale on each axis (6.25% of the viewport pixel count). This has the lowest GPU requirements.
	ViewportSdfScale25Percent ViewportSDFScale = 2
	// Represents the size of the [ViewportSDFScale] enum.
	ViewportSdfScaleMax ViewportSDFScale = 3
)

type ViewportScaling3DMode

type ViewportScaling3DMode int //gd:RenderingServer.ViewportScaling3DMode
const (
	// 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.
	//
	// [Viewport.Scaling3dScale]: https://pkg.go.dev/graphics.gd/classdb/Viewport#Instance.Scaling3dScale
	ViewportScaling3dModeBilinear ViewportScaling3DMode = 0
	// 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.
	//
	// [Viewport.Scaling3dScale]: https://pkg.go.dev/graphics.gd/classdb/Viewport#Instance.Scaling3dScale
	ViewportScaling3dModeFsr ViewportScaling3DMode = 1
	// 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.
	//
	// [Viewport.Scaling3dScale]: https://pkg.go.dev/graphics.gd/classdb/Viewport#Instance.Scaling3dScale
	ViewportScaling3dModeFsr2 ViewportScaling3DMode = 2
	// 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.
	//
	// [Viewport.Scaling3dScale]: https://pkg.go.dev/graphics.gd/classdb/Viewport#Instance.Scaling3dScale
	ViewportScaling3dModeMetalfxSpatial ViewportScaling3DMode = 3
	// 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.
	//
	// [Viewport.Scaling3dScale]: https://pkg.go.dev/graphics.gd/classdb/Viewport#Instance.Scaling3dScale
	ViewportScaling3dModeMetalfxTemporal ViewportScaling3DMode = 4
	// Represents the size of the [ViewportScaling3DMode] enum.
	ViewportScaling3dModeMax ViewportScaling3DMode = 5
)

type ViewportScreenSpaceAA

type ViewportScreenSpaceAA int //gd:RenderingServer.ViewportScreenSpaceAA
const (
	// Do not perform any antialiasing in the full screen post-process.
	ViewportScreenSpaceAaDisabled ViewportScreenSpaceAA = 0
	// 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.
	ViewportScreenSpaceAaFxaa ViewportScreenSpaceAA = 1
	// Use subpixel morphological antialiasing. SMAA may produce clearer results than FXAA, but at a slightly higher performance cost.
	ViewportScreenSpaceAaSmaa ViewportScreenSpaceAA = 2
	// Represents the size of the [ViewportScreenSpaceAA] enum.
	ViewportScreenSpaceAaMax ViewportScreenSpaceAA = 3
)

type ViewportUpdateMode

type ViewportUpdateMode int //gd:RenderingServer.ViewportUpdateMode
const (
	// Do not update the viewport's render target.
	ViewportUpdateDisabled ViewportUpdateMode = 0
	// Update the viewport's render target once, then switch to [ViewportUpdateDisabled].
	ViewportUpdateOnce ViewportUpdateMode = 1
	// Update the viewport's render target only when it is visible. This is the default value.
	ViewportUpdateWhenVisible ViewportUpdateMode = 2
	// Update the viewport's render target only when its parent is visible.
	ViewportUpdateWhenParentVisible ViewportUpdateMode = 3
	// Always update the viewport's render target.
	ViewportUpdateAlways ViewportUpdateMode = 4
)

func ViewportGetUpdateMode

func ViewportGetUpdateMode(viewport RID.Viewport) ViewportUpdateMode

Returns the viewport's update mode.

Warning: Calling this from any thread other than the rendering thread will be detrimental to performance.

type ViewportVRSMode

type ViewportVRSMode int //gd:RenderingServer.ViewportVRSMode
const (
	// Variable rate shading is disabled.
	ViewportVrsDisabled ViewportVRSMode = 0
	// Variable rate shading uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view.
	ViewportVrsTexture ViewportVRSMode = 1
	// Variable rate shading texture is supplied by the primary [XRInterface]. Note that this may override the update mode.
	//
	// [XRInterface]: https://pkg.go.dev/graphics.gd/classdb/XRInterface
	ViewportVrsXr ViewportVRSMode = 2
	// Represents the size of the [ViewportVRSMode] enum.
	ViewportVrsMax ViewportVRSMode = 3
)

type ViewportVRSUpdateMode

type ViewportVRSUpdateMode int //gd:RenderingServer.ViewportVRSUpdateMode
const (
	// The input texture for variable rate shading will not be processed.
	ViewportVrsUpdateDisabled ViewportVRSUpdateMode = 0
	// The input texture for variable rate shading will be processed once.
	ViewportVrsUpdateOnce ViewportVRSUpdateMode = 1
	// The input texture for variable rate shading will be processed each frame.
	ViewportVrsUpdateAlways ViewportVRSUpdateMode = 2
	// Represents the size of the [ViewportVRSUpdateMode] enum.
	ViewportVrsUpdateMax ViewportVRSUpdateMode = 3
)

type VisibilityRangeFadeMode

type VisibilityRangeFadeMode int //gd:RenderingServer.VisibilityRangeFadeMode
const (
	// Disable visibility range fading for the given instance.
	VisibilityRangeFadeDisabled VisibilityRangeFadeMode = 0
	// Fade-out the given instance when it approaches its visibility range limits.
	VisibilityRangeFadeSelf VisibilityRangeFadeMode = 1
	// Fade-in the given instance's dependencies when reaching its visibility range limits.
	VisibilityRangeFadeDependencies VisibilityRangeFadeMode = 2
)

type VoxelGIQuality

type VoxelGIQuality int //gd:RenderingServer.VoxelGIQuality
const (
	// Low [VoxelGI] rendering quality using 4 cones.
	//
	// [VoxelGI]: https://pkg.go.dev/graphics.gd/classdb/VoxelGI
	VoxelGiQualityLow VoxelGIQuality = 0
	// High [VoxelGI] rendering quality using 6 cones.
	//
	// [VoxelGI]: https://pkg.go.dev/graphics.gd/classdb/VoxelGI
	VoxelGiQualityHigh VoxelGIQuality = 1
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL