Documentation
¶
Overview ¶
Package RenderingServer provides methods for working with RenderingServer object instances.
Index ¶
- func Advanced() class
- func BakeRenderUv2(base RID.Mesh, material_overrides [][]RID.Material, image_size Vector2i.XY) [][1]gdclass.Image
- func CallOnRenderThread(callable func())
- func CameraAttributesCreate() RID.CameraAttributes
- func CameraAttributesSetAutoExposure(camera_attributes RID.CameraAttributes, enable bool, min_sensitivity Float.X, ...)
- func CameraAttributesSetDofBlur(camera_attributes RID.CameraAttributes, far_enable bool, far_distance Float.X, ...)
- func CameraAttributesSetDofBlurBokehShape(shape gdclass.RenderingServerDOFBokehShape)
- func CameraAttributesSetDofBlurQuality(quality gdclass.RenderingServerDOFBlurQuality, use_jitter bool)
- func CameraAttributesSetExposure(camera_attributes RID.CameraAttributes, multiplier Float.X, ...)
- func CameraCreate() RID.Camera
- func CameraSetCameraAttributes(camera RID.Camera, effects RID.CameraAttributes)
- func CameraSetCompositor(camera RID.Camera, compositor RID.Compositor)
- func CameraSetCullMask(camera RID.Camera, layers int)
- func CameraSetEnvironment(camera RID.Camera, env RID.Environment)
- func CameraSetFrustum(camera RID.Camera, size Float.X, offset Vector2.XY, z_near Float.X, ...)
- func CameraSetOrthogonal(camera RID.Camera, size Float.X, z_near Float.X, z_far Float.X)
- func CameraSetPerspective(camera RID.Camera, fovy_degrees Float.X, z_near Float.X, z_far Float.X)
- func CameraSetTransform(camera RID.Camera, transform Transform3D.BasisOrigin)
- func CameraSetUseVerticalAspect(camera RID.Camera, enable bool)
- func CanvasCreate() RID.Canvas
- func CanvasItemAddAnimationSlice(item RID.CanvasItem, animation_length Float.X, slice_begin Float.X, ...)
- func CanvasItemAddCircle(item RID.CanvasItem, pos Vector2.XY, radius Float.X, color Color.RGBA)
- func CanvasItemAddClipIgnore(item RID.CanvasItem, ignore bool)
- func CanvasItemAddLcdTextureRectRegion(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture, ...)
- func CanvasItemAddLine(item RID.CanvasItem, from Vector2.XY, to Vector2.XY, color Color.RGBA)
- func CanvasItemAddMesh(item RID.CanvasItem, mesh RID.Mesh)
- func CanvasItemAddMsdfTextureRectRegion(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture, ...)
- func CanvasItemAddMultiline(item RID.CanvasItem, points []Vector2.XY, colors []Color.RGBA)
- func CanvasItemAddMultimesh(item RID.CanvasItem, mesh RID.MultiMesh)
- func CanvasItemAddNinePatch(item RID.CanvasItem, rect Rect2.PositionSize, source Rect2.PositionSize, ...)
- func CanvasItemAddParticles(item RID.CanvasItem, particles RID.Particles, texture RID.Texture)
- func CanvasItemAddPolygon(item RID.CanvasItem, points []Vector2.XY, colors []Color.RGBA)
- func CanvasItemAddPolyline(item RID.CanvasItem, points []Vector2.XY, colors []Color.RGBA)
- func CanvasItemAddPrimitive(item RID.CanvasItem, points []Vector2.XY, colors []Color.RGBA, ...)
- func CanvasItemAddRect(item RID.CanvasItem, rect Rect2.PositionSize, color Color.RGBA)
- func CanvasItemAddSetTransform(item RID.CanvasItem, transform Transform2D.OriginXY)
- func CanvasItemAddTextureRect(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture)
- func CanvasItemAddTextureRectRegion(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture, ...)
- func CanvasItemAddTriangleArray(item RID.CanvasItem, indices []int32, points []Vector2.XY, colors []Color.RGBA)
- func CanvasItemClear(item RID.CanvasItem)
- func CanvasItemCreate() RID.CanvasItem
- func CanvasItemResetPhysicsInterpolation(item RID.CanvasItem)
- func CanvasItemSetCanvasGroupMode(item RID.CanvasItem, mode gdclass.RenderingServerCanvasGroupMode)
- func CanvasItemSetClip(item RID.CanvasItem, clip bool)
- func CanvasItemSetCopyToBackbuffer(item RID.CanvasItem, enabled bool, rect Rect2.PositionSize)
- func CanvasItemSetCustomRect(item RID.CanvasItem, use_custom_rect bool)
- func CanvasItemSetDefaultTextureFilter(item RID.CanvasItem, filter gdclass.RenderingServerCanvasItemTextureFilter)
- func CanvasItemSetDefaultTextureRepeat(item RID.CanvasItem, repeat gdclass.RenderingServerCanvasItemTextureRepeat)
- func CanvasItemSetDistanceFieldMode(item RID.CanvasItem, enabled bool)
- func CanvasItemSetDrawBehindParent(item RID.CanvasItem, enabled bool)
- func CanvasItemSetDrawIndex(item RID.CanvasItem, index int)
- func CanvasItemSetInterpolated(item RID.CanvasItem, interpolated bool)
- func CanvasItemSetLightMask(item RID.CanvasItem, mask int)
- func CanvasItemSetMaterial(item RID.CanvasItem, material RID.Material)
- func CanvasItemSetModulate(item RID.CanvasItem, color Color.RGBA)
- func CanvasItemSetParent(item RID.CanvasItem, parent RID.CanvasItem)
- func CanvasItemSetSelfModulate(item RID.CanvasItem, color Color.RGBA)
- func CanvasItemSetSortChildrenByY(item RID.CanvasItem, enabled bool)
- func CanvasItemSetTransform(item RID.CanvasItem, transform Transform2D.OriginXY)
- func CanvasItemSetUseParentMaterial(item RID.CanvasItem, enabled bool)
- func CanvasItemSetVisibilityLayer(item RID.CanvasItem, visibility_layer int)
- func CanvasItemSetVisibilityNotifier(item RID.CanvasItem, enable bool, area Rect2.PositionSize, ...)
- func CanvasItemSetVisible(item RID.CanvasItem, visible bool)
- func CanvasItemSetZAsRelativeToParent(item RID.CanvasItem, enabled bool)
- func CanvasItemSetZIndex(item RID.CanvasItem, z_index int)
- func CanvasItemTransformPhysicsInterpolation(item RID.CanvasItem, transform Transform2D.OriginXY)
- func CanvasLightAttachToCanvas(light RID.CanvasLight, canvas RID.Canvas)
- func CanvasLightCreate() RID.CanvasLight
- func CanvasLightOccluderAttachToCanvas(occluder RID.CanvasLightOccluder, canvas RID.Canvas)
- func CanvasLightOccluderCreate() RID.CanvasLightOccluder
- func CanvasLightOccluderResetPhysicsInterpolation(occluder RID.CanvasLightOccluder)
- func CanvasLightOccluderSetAsSdfCollision(occluder RID.CanvasLightOccluder, enable bool)
- func CanvasLightOccluderSetEnabled(occluder RID.CanvasLightOccluder, enabled bool)
- func CanvasLightOccluderSetInterpolated(occluder RID.CanvasLightOccluder, interpolated bool)
- func CanvasLightOccluderSetLightMask(occluder RID.CanvasLightOccluder, mask int)
- func CanvasLightOccluderSetPolygon(occluder RID.CanvasLightOccluder, polygon RID.CanvasLightOccluderPolygon)
- func CanvasLightOccluderSetTransform(occluder RID.CanvasLightOccluder, transform Transform2D.OriginXY)
- func CanvasLightOccluderTransformPhysicsInterpolation(occluder RID.CanvasLightOccluder, transform Transform2D.OriginXY)
- func CanvasLightResetPhysicsInterpolation(light RID.CanvasLight)
- func CanvasLightSetBlendMode(light RID.CanvasLight, mode gdclass.RenderingServerCanvasLightBlendMode)
- func CanvasLightSetColor(light RID.CanvasLight, color Color.RGBA)
- func CanvasLightSetEnabled(light RID.CanvasLight, enabled bool)
- func CanvasLightSetEnergy(light RID.CanvasLight, energy Float.X)
- func CanvasLightSetHeight(light RID.CanvasLight, height Float.X)
- func CanvasLightSetInterpolated(light RID.CanvasLight, interpolated bool)
- func CanvasLightSetItemCullMask(light RID.CanvasLight, mask int)
- func CanvasLightSetItemShadowCullMask(light RID.CanvasLight, mask int)
- func CanvasLightSetLayerRange(light RID.CanvasLight, min_layer int, max_layer int)
- func CanvasLightSetMode(light RID.CanvasLight, mode gdclass.RenderingServerCanvasLightMode)
- func CanvasLightSetShadowColor(light RID.CanvasLight, color Color.RGBA)
- func CanvasLightSetShadowEnabled(light RID.CanvasLight, enabled bool)
- func CanvasLightSetShadowFilter(light RID.CanvasLight, filter gdclass.RenderingServerCanvasLightShadowFilter)
- func CanvasLightSetShadowSmooth(light RID.CanvasLight, smooth Float.X)
- func CanvasLightSetTexture(light RID.CanvasLight, texture RID.CanvasTexture)
- func CanvasLightSetTextureOffset(light RID.CanvasLight, offset Vector2.XY)
- func CanvasLightSetTextureScale(light RID.CanvasLight, scale Float.X)
- func CanvasLightSetTransform(light RID.CanvasLight, transform Transform2D.OriginXY)
- func CanvasLightSetZRange(light RID.CanvasLight, min_z int, max_z int)
- func CanvasLightTransformPhysicsInterpolation(light RID.CanvasLight, transform Transform2D.OriginXY)
- func CanvasOccluderPolygonCreate() RID.CanvasLightOccluderPolygon
- func CanvasOccluderPolygonSetCullMode(occluder_polygon RID.CanvasLightOccluderPolygon, ...)
- func CanvasOccluderPolygonSetShape(occluder_polygon RID.CanvasLightOccluderPolygon, shape []Vector2.XY, ...)
- func CanvasSetDisableScale(disable bool)
- func CanvasSetItemMirroring(canvas RID.Canvas, item RID.CanvasItem, mirroring Vector2.XY)
- func CanvasSetItemRepeat(item RID.CanvasItem, repeat_size Vector2.XY, repeat_times int)
- func CanvasSetModulate(canvas RID.Canvas, color Color.RGBA)
- func CanvasSetShadowTextureSize(size int)
- func CanvasTextureCreate() RID.CanvasTexture
- func CanvasTextureSetChannel(canvas_texture RID.CanvasTexture, ...)
- func CanvasTextureSetShadingParameters(canvas_texture RID.CanvasTexture, base_color Color.RGBA, shininess Float.X)
- func CanvasTextureSetTextureFilter(canvas_texture RID.CanvasTexture, ...)
- func CanvasTextureSetTextureRepeat(canvas_texture RID.CanvasTexture, ...)
- func CompositorCreate() RID.Compositor
- func CompositorEffectCreate() RID.CompositorEffect
- func CompositorEffectSetCallback(effect RID.CompositorEffect, ...)
- func CompositorEffectSetEnabled(effect RID.CompositorEffect, enabled bool)
- func CompositorEffectSetFlag(effect RID.CompositorEffect, flag gdclass.RenderingServerCompositorEffectFlags, ...)
- func CompositorSetCompositorEffects(compositor RID.Compositor, effects [][]RID.CompositorEffect)
- func CreateLocalRenderingDevice() [1]gdclass.RenderingDevice
- func DebugCanvasItemGetRect(item RID.CanvasItem) Rect2.PositionSize
- func DecalCreate() RID.Decal
- func DecalSetAlbedoMix(decal RID.Decal, albedo_mix Float.X)
- func DecalSetCullMask(decal RID.Decal, mask int)
- func DecalSetDistanceFade(decal RID.Decal, enabled bool, begin Float.X, length Float.X)
- func DecalSetEmissionEnergy(decal RID.Decal, energy Float.X)
- func DecalSetFade(decal RID.Decal, above Float.X, below Float.X)
- func DecalSetModulate(decal RID.Decal, color Color.RGBA)
- func DecalSetNormalFade(decal RID.Decal, fade Float.X)
- func DecalSetSize(decal RID.Decal, size Vector3.XYZ)
- func DecalSetTexture(decal RID.Decal, atype gdclass.RenderingServerDecalTexture, ...)
- func DecalsSetFilter(filter gdclass.RenderingServerDecalFilter)
- func DirectionalLightCreate() RID.Light
- func DirectionalShadowAtlasSetSize(size int, is_16bits bool)
- func DirectionalSoftShadowFilterSetQuality(quality gdclass.RenderingServerShadowQuality)
- func EnvironmentBakePanorama(environment RID.Environment, bake_irradiance bool, size Vector2i.XY) [1]gdclass.Image
- func EnvironmentCreate() RID.Environment
- func EnvironmentGlowSetUseBicubicUpscale(enable bool)
- func EnvironmentSetAdjustment(env RID.Environment, enable bool, brightness Float.X, contrast Float.X, ...)
- func EnvironmentSetAmbientLight(env RID.Environment, color Color.RGBA)
- func EnvironmentSetBackground(env RID.Environment, bg gdclass.RenderingServerEnvironmentBG)
- func EnvironmentSetBgColor(env RID.Environment, color Color.RGBA)
- func EnvironmentSetBgEnergy(env RID.Environment, multiplier Float.X, exposure_value Float.X)
- func EnvironmentSetCanvasMaxLayer(env RID.Environment, max_layer int)
- func EnvironmentSetFog(env RID.Environment, enable bool, light_color Color.RGBA, light_energy Float.X, ...)
- func EnvironmentSetGlow(env RID.Environment, enable bool, levels []float32, intensity Float.X, ...)
- func EnvironmentSetSdfgi(env RID.Environment, enable bool, cascades int, min_cell_size Float.X, ...)
- func EnvironmentSetSdfgiFramesToConverge(frames gdclass.RenderingServerEnvironmentSDFGIFramesToConverge)
- func EnvironmentSetSdfgiFramesToUpdateLight(frames gdclass.RenderingServerEnvironmentSDFGIFramesToUpdateLight)
- func EnvironmentSetSdfgiRayCount(ray_count gdclass.RenderingServerEnvironmentSDFGIRayCount)
- func EnvironmentSetSky(env RID.Environment, sky RID.Sky)
- func EnvironmentSetSkyCustomFov(env RID.Environment, scale Float.X)
- func EnvironmentSetSkyOrientation(env RID.Environment, orientation Basis.XYZ)
- func EnvironmentSetSsao(env RID.Environment, enable bool, radius Float.X, intensity Float.X, ...)
- func EnvironmentSetSsaoQuality(quality gdclass.RenderingServerEnvironmentSSAOQuality, half_size bool, ...)
- func EnvironmentSetSsilQuality(quality gdclass.RenderingServerEnvironmentSSILQuality, half_size bool, ...)
- func EnvironmentSetSsr(env RID.Environment, enable bool, max_steps int, fade_in Float.X, ...)
- func EnvironmentSetSsrRoughnessQuality(quality gdclass.RenderingServerEnvironmentSSRRoughnessQuality)
- func EnvironmentSetTonemap(env RID.Environment, tone_mapper gdclass.RenderingServerEnvironmentToneMapper, ...)
- func EnvironmentSetVolumetricFog(env RID.Environment, enable bool, density Float.X, albedo Color.RGBA, ...)
- func EnvironmentSetVolumetricFogFilterActive(active bool)
- func EnvironmentSetVolumetricFogVolumeSize(size int, depth int)
- func FogVolumeCreate() RID.FogVolume
- func FogVolumeSetMaterial(fog_volume RID.FogVolume, material RID.Material)
- func FogVolumeSetShape(fog_volume RID.FogVolume, shape gdclass.RenderingServerFogVolumeShape)
- func FogVolumeSetSize(fog_volume RID.FogVolume, size Vector3.XYZ)
- func ForceDraw()
- func ForceSync()
- func FreeRid(rid RID.Any)
- func GetDefaultClearColor() Color.RGBA
- func GetFrameSetupTimeCpu() Float.X
- func GetRenderingDevice() [1]gdclass.RenderingDevice
- func GetRenderingInfo(info gdclass.RenderingServerRenderingInfo) int
- func GetShaderParameterList(shader RID.Shader) []map[string]interface{}
- func GetTestCube() RID.Mesh
- func GetTestTexture() RID.Texture
- func GetVideoAdapterApiVersion() string
- func GetVideoAdapterName() string
- func GetVideoAdapterType() gdclass.RenderingDeviceDeviceType
- func GetVideoAdapterVendor() string
- func GetWhiteTexture() RID.Texture
- func GiSetUseHalfResolution(half_resolution bool)
- func GlobalShaderParameterAdd(name string, atype gdclass.RenderingServerGlobalShaderParameterType, ...)
- func GlobalShaderParameterGet(name string) any
- func GlobalShaderParameterGetList() []string
- func GlobalShaderParameterGetType(name string) gdclass.RenderingServerGlobalShaderParameterType
- func GlobalShaderParameterRemove(name string)
- func GlobalShaderParameterSet(name string, value any)
- func GlobalShaderParameterSetOverride(name string, value any)
- func HasChanged() bool
- func HasFeature(feature gdclass.RenderingServerFeatures) bool
- func HasOsFeature(feature string) bool
- func InstanceAttachObjectInstanceId(instance RID.VisualInstance, id int)
- func InstanceAttachSkeleton(instance RID.VisualInstance, skeleton RID.Skeleton)
- func InstanceCreate() RID.VisualInstance
- func InstanceCreate2(base RID.VisualInstance, scenario RID.Scenario) RID.VisualInstance
- func InstanceGeometryGetShaderParameter(instance RID.VisualInstance, parameter string) any
- func InstanceGeometryGetShaderParameterDefaultValue(instance RID.VisualInstance, parameter string) any
- func InstanceGeometryGetShaderParameterList(instance RID.VisualInstance) []map[string]interface{}
- func InstanceGeometrySetCastShadowsSetting(instance RID.VisualInstance, ...)
- func InstanceGeometrySetFlag(instance RID.VisualInstance, flag gdclass.RenderingServerInstanceFlags, ...)
- func InstanceGeometrySetLightmap(instance RID.VisualInstance, lightmap RID.Lightmap, ...)
- func InstanceGeometrySetLodBias(instance RID.VisualInstance, lod_bias Float.X)
- func InstanceGeometrySetMaterialOverlay(instance RID.VisualInstance, material RID.Material)
- func InstanceGeometrySetMaterialOverride(instance RID.VisualInstance, material RID.Material)
- func InstanceGeometrySetShaderParameter(instance RID.VisualInstance, parameter string, value any)
- func InstanceGeometrySetTransparency(instance RID.VisualInstance, transparency Float.X)
- func InstanceGeometrySetVisibilityRange(instance RID.VisualInstance, min Float.X, max Float.X, min_margin Float.X, ...)
- func InstanceSetBase(instance RID.VisualInstance, base RID.VisualInstance)
- func InstanceSetBlendShapeWeight(instance RID.VisualInstance, shape int, weight Float.X)
- func InstanceSetCustomAabb(instance RID.VisualInstance, aabb AABB.PositionSize)
- func InstanceSetExtraVisibilityMargin(instance RID.VisualInstance, margin Float.X)
- func InstanceSetIgnoreCulling(instance RID.VisualInstance, enabled bool)
- func InstanceSetLayerMask(instance RID.VisualInstance, mask int)
- func InstanceSetPivotData(instance RID.VisualInstance, sorting_offset Float.X, use_aabb_center bool)
- func InstanceSetScenario(instance RID.VisualInstance, scenario RID.Scenario)
- func InstanceSetSurfaceOverrideMaterial(instance RID.VisualInstance, surface int, material RID.Material)
- func InstanceSetTransform(instance RID.VisualInstance, transform Transform3D.BasisOrigin)
- func InstanceSetVisibilityParent(instance RID.VisualInstance, parent RID.VisualInstance)
- func InstanceSetVisible(instance RID.VisualInstance, visible bool)
- func InstancesCullAabb(aabb AABB.PositionSize) []int64
- func InstancesCullConvex(convex []Plane.NormalD) []int64
- func InstancesCullRay(from Vector3.XYZ, to Vector3.XYZ) []int64
- func IsOnRenderThread() bool
- func LightDirectionalSetBlendSplits(light RID.Light, enable bool)
- func LightDirectionalSetShadowMode(light RID.Light, mode gdclass.RenderingServerLightDirectionalShadowMode)
- func LightDirectionalSetSkyMode(light RID.Light, mode gdclass.RenderingServerLightDirectionalSkyMode)
- func LightOmniSetShadowMode(light RID.Light, mode gdclass.RenderingServerLightOmniShadowMode)
- func LightProjectorsSetFilter(filter gdclass.RenderingServerLightProjectorFilter)
- func LightSetBakeMode(light RID.Light, bake_mode gdclass.RenderingServerLightBakeMode)
- func LightSetColor(light RID.Light, color Color.RGBA)
- func LightSetCullMask(light RID.Light, mask int)
- func LightSetDistanceFade(decal RID.Light, enabled bool, begin Float.X, shadow Float.X, length Float.X)
- func LightSetMaxSdfgiCascade(light RID.Light, cascade int)
- func LightSetNegative(light RID.Light, enable bool)
- func LightSetParam(light RID.Light, param gdclass.RenderingServerLightParam, value Float.X)
- func LightSetProjector(light RID.Light, texture RID.Texture)
- func LightSetReverseCullFaceMode(light RID.Light, enabled bool)
- func LightSetShadow(light RID.Light, enabled bool)
- func LightmapCreate() RID.Lightmap
- func LightmapGetProbeCaptureBspTree(lightmap RID.Lightmap) []int32
- func LightmapGetProbeCapturePoints(lightmap RID.Lightmap) []Vector3.XYZ
- func LightmapGetProbeCaptureSh(lightmap RID.Lightmap) []Color.RGBA
- func LightmapGetProbeCaptureTetrahedra(lightmap RID.Lightmap) []int32
- func LightmapSetBakedExposureNormalization(lightmap RID.Lightmap, baked_exposure Float.X)
- func LightmapSetProbeBounds(lightmap RID.Lightmap, bounds AABB.PositionSize)
- func LightmapSetProbeCaptureData(lightmap RID.Lightmap, points []Vector3.XYZ, point_sh []Color.RGBA, ...)
- func LightmapSetProbeCaptureUpdateSpeed(speed Float.X)
- func LightmapSetProbeInterior(lightmap RID.Lightmap, interior bool)
- func LightmapSetTextures(lightmap RID.Lightmap, light RID.Light, uses_sh bool)
- func MakeSphereMesh(latitudes int, longitudes int, radius Float.X) RID.Mesh
- func MaterialCreate() RID.Material
- func MaterialGetParam(material RID.Material, parameter string) any
- func MaterialSetNextPass(material RID.Material, next_material RID.Material)
- func MaterialSetParam(material RID.Material, parameter string, value any)
- func MaterialSetRenderPriority(material RID.Material, priority int)
- func MaterialSetShader(shader_material RID.Material, shader RID.Shader)
- func MeshAddSurface(mesh RID.Mesh, surface Surface)
- func MeshAddSurfaceFromArrays(mesh RID.Mesh, primitive gdclass.RenderingServerPrimitiveType, arrays []any)
- func MeshClear(mesh RID.Mesh)
- func MeshCreate() RID.Mesh
- func MeshCreateFromSurfaces(surfaces []Surface) RID.Mesh
- func MeshGetBlendShapeCount(mesh RID.Mesh) int
- func MeshGetBlendShapeMode(mesh RID.Mesh) gdclass.RenderingServerBlendShapeMode
- func MeshGetCustomAabb(mesh RID.Mesh) AABB.PositionSize
- func MeshGetSurfaceCount(mesh RID.Mesh) int
- func MeshSetBlendShapeMode(mesh RID.Mesh, mode gdclass.RenderingServerBlendShapeMode)
- func MeshSetCustomAabb(mesh RID.Mesh, aabb AABB.PositionSize)
- func MeshSetShadowMesh(mesh RID.Mesh, shadow_mesh RID.Mesh)
- func MeshSurfaceGetArrays(mesh RID.Mesh, surface int) []any
- func MeshSurfaceGetBlendShapeArrays(mesh RID.Mesh, surface int) [][]any
- func MeshSurfaceGetFormatAttributeStride(format gdclass.RenderingServerArrayFormat, vertex_count int) int
- func MeshSurfaceGetFormatNormalTangentStride(format gdclass.RenderingServerArrayFormat, vertex_count int) int
- func MeshSurfaceGetFormatOffset(format gdclass.RenderingServerArrayFormat, vertex_count int, array_index int) int
- func MeshSurfaceGetFormatSkinStride(format gdclass.RenderingServerArrayFormat, vertex_count int) int
- func MeshSurfaceGetFormatVertexStride(format gdclass.RenderingServerArrayFormat, vertex_count int) int
- func MeshSurfaceGetMaterial(mesh RID.Mesh, surface int) RID.Material
- func MeshSurfaceSetMaterial(mesh RID.Mesh, surface int, material RID.Material)
- func MeshSurfaceUpdateAttributeRegion(mesh RID.Mesh, surface int, offset int, data []byte)
- func MeshSurfaceUpdateSkinRegion(mesh RID.Mesh, surface int, offset int, data []byte)
- func MeshSurfaceUpdateVertexRegion(mesh RID.Mesh, surface int, offset int, data []byte)
- func MultimeshAllocateData(multimesh RID.MultiMesh, instances int, ...)
- func MultimeshCreate() RID.MultiMesh
- func MultimeshGetAabb(multimesh RID.MultiMesh) AABB.PositionSize
- func MultimeshGetBuffer(multimesh RID.MultiMesh) []float32
- func MultimeshGetCustomAabb(multimesh RID.MultiMesh) AABB.PositionSize
- func MultimeshGetInstanceCount(multimesh RID.MultiMesh) int
- func MultimeshGetMesh(multimesh RID.MultiMesh) RID.Mesh
- func MultimeshGetVisibleInstances(multimesh RID.MultiMesh) int
- func MultimeshInstanceGetColor(multimesh RID.MultiMesh, index int) Color.RGBA
- func MultimeshInstanceGetCustomData(multimesh RID.MultiMesh, index int) Color.RGBA
- func MultimeshInstanceGetTransform(multimesh RID.MultiMesh, index int) Transform3D.BasisOrigin
- func MultimeshInstanceGetTransform2d(multimesh RID.MultiMesh, index int) Transform2D.OriginXY
- func MultimeshInstanceSetColor(multimesh RID.MultiMesh, index int, color Color.RGBA)
- func MultimeshInstanceSetCustomData(multimesh RID.MultiMesh, index int, custom_data Color.RGBA)
- func MultimeshInstanceSetTransform(multimesh RID.MultiMesh, index int, transform Transform3D.BasisOrigin)
- func MultimeshInstanceSetTransform2d(multimesh RID.MultiMesh, index int, transform Transform2D.OriginXY)
- func MultimeshSetBuffer(multimesh RID.MultiMesh, buffer []float32)
- func MultimeshSetCustomAabb(multimesh RID.MultiMesh, aabb AABB.PositionSize)
- func MultimeshSetMesh(multimesh RID.MultiMesh, mesh RID.Mesh)
- func MultimeshSetVisibleInstances(multimesh RID.MultiMesh, visible int)
- func OccluderCreate() RID.Occluder
- func OccluderSetMesh(occluder RID.Occluder, vertices []Vector3.XYZ, indices []int32)
- func OmniLightCreate() RID.Light
- func OnFramePostDraw(cb func())
- func OnFramePreDraw(cb func())
- func ParticlesCollisionCreate() RID.ParticlesCollision
- func ParticlesCollisionHeightFieldUpdate(particles_collision RID.ParticlesCollision)
- func ParticlesCollisionSetAttractorAttenuation(particles_collision RID.ParticlesCollision, curve Float.X)
- func ParticlesCollisionSetAttractorDirectionality(particles_collision RID.ParticlesCollision, amount Float.X)
- func ParticlesCollisionSetAttractorStrength(particles_collision RID.ParticlesCollision, strength Float.X)
- func ParticlesCollisionSetBoxExtents(particles_collision RID.ParticlesCollision, extents Vector3.XYZ)
- func ParticlesCollisionSetCollisionType(particles_collision RID.ParticlesCollision, ...)
- func ParticlesCollisionSetCullMask(particles_collision RID.ParticlesCollision, mask int)
- func ParticlesCollisionSetFieldTexture(particles_collision RID.ParticlesCollision, texture RID.Texture)
- func ParticlesCollisionSetHeightFieldResolution(particles_collision RID.ParticlesCollision, ...)
- func ParticlesCollisionSetSphereRadius(particles_collision RID.ParticlesCollision, radius Float.X)
- func ParticlesCreate() RID.Particles
- func ParticlesEmit(particles RID.Particles, transform Transform3D.BasisOrigin, ...)
- func ParticlesGetCurrentAabb(particles RID.Particles) AABB.PositionSize
- func ParticlesGetEmitting(particles RID.Particles) bool
- func ParticlesIsInactive(particles RID.Particles) bool
- func ParticlesRequestProcess(particles RID.Particles)
- func ParticlesRestart(particles RID.Particles)
- func ParticlesSetAmount(particles RID.Particles, amount int)
- func ParticlesSetAmountRatio(particles RID.Particles, ratio Float.X)
- func ParticlesSetCollisionBaseSize(particles RID.Particles, size Float.X)
- func ParticlesSetCustomAabb(particles RID.Particles, aabb AABB.PositionSize)
- func ParticlesSetDrawOrder(particles RID.Particles, order gdclass.RenderingServerParticlesDrawOrder)
- func ParticlesSetDrawPassMesh(particles RID.Particles, pass int, mesh RID.Mesh)
- func ParticlesSetDrawPasses(particles RID.Particles, count int)
- func ParticlesSetEmissionTransform(particles RID.Particles, transform Transform3D.BasisOrigin)
- func ParticlesSetEmitterVelocity(particles RID.Particles, velocity Vector3.XYZ)
- func ParticlesSetEmitting(particles RID.Particles, emitting bool)
- func ParticlesSetExplosivenessRatio(particles RID.Particles, ratio Float.X)
- func ParticlesSetFixedFps(particles RID.Particles, fps int)
- func ParticlesSetFractionalDelta(particles RID.Particles, enable bool)
- func ParticlesSetInterpToEnd(particles RID.Particles, factor Float.X)
- func ParticlesSetInterpolate(particles RID.Particles, enable bool)
- func ParticlesSetLifetime(particles RID.Particles, lifetime Float.X)
- func ParticlesSetMode(particles RID.Particles, mode gdclass.RenderingServerParticlesMode)
- func ParticlesSetOneShot(particles RID.Particles, one_shot bool)
- func ParticlesSetPreProcessTime(particles RID.Particles, time Float.X)
- func ParticlesSetProcessMaterial(particles RID.Particles, material RID.Material)
- func ParticlesSetRandomnessRatio(particles RID.Particles, ratio Float.X)
- func ParticlesSetSpeedScale(particles RID.Particles, scale Float.X)
- func ParticlesSetSubemitter(particles RID.Particles, subemitter_particles RID.Particles)
- func ParticlesSetTrailBindPoses(particles RID.Particles, bind_poses []Transform3D.BasisOrigin)
- func ParticlesSetTrails(particles RID.Particles, enable bool, length_sec Float.X)
- func ParticlesSetTransformAlign(particles RID.Particles, align gdclass.RenderingServerParticlesTransformAlign)
- func ParticlesSetUseLocalCoordinates(particles RID.Particles, enable bool)
- func PositionalSoftShadowFilterSetQuality(quality gdclass.RenderingServerShadowQuality)
- func ReflectionProbeCreate() RID.ReflectionProbe
- func ReflectionProbeSetAmbientColor(probe RID.ReflectionProbe, color Color.RGBA)
- func ReflectionProbeSetAmbientEnergy(probe RID.ReflectionProbe, energy Float.X)
- func ReflectionProbeSetAmbientMode(probe RID.ReflectionProbe, ...)
- func ReflectionProbeSetAsInterior(probe RID.ReflectionProbe, enable bool)
- func ReflectionProbeSetCullMask(probe RID.ReflectionProbe, layers int)
- func ReflectionProbeSetEnableBoxProjection(probe RID.ReflectionProbe, enable bool)
- func ReflectionProbeSetEnableShadows(probe RID.ReflectionProbe, enable bool)
- func ReflectionProbeSetIntensity(probe RID.ReflectionProbe, intensity Float.X)
- func ReflectionProbeSetMaxDistance(probe RID.ReflectionProbe, distance Float.X)
- func ReflectionProbeSetMeshLodThreshold(probe RID.ReflectionProbe, pixels Float.X)
- func ReflectionProbeSetOriginOffset(probe RID.ReflectionProbe, offset Vector3.XYZ)
- func ReflectionProbeSetReflectionMask(probe RID.ReflectionProbe, layers int)
- func ReflectionProbeSetResolution(probe RID.ReflectionProbe, resolution int)
- func ReflectionProbeSetSize(probe RID.ReflectionProbe, size Vector3.XYZ)
- func ReflectionProbeSetUpdateMode(probe RID.ReflectionProbe, ...)
- func RenderLoopEnabled() bool
- func RequestFrameDrawnCallback(callable func())
- func ScenarioCreate() RID.Scenario
- func ScenarioSetCameraAttributes(scenario RID.Scenario, effects RID.CameraAttributes)
- func ScenarioSetCompositor(scenario RID.Scenario, compositor RID.Compositor)
- func ScenarioSetEnvironment(scenario RID.Scenario, environment RID.Environment)
- func ScenarioSetFallbackEnvironment(scenario RID.Scenario, environment RID.Environment)
- func ScreenSpaceRoughnessLimiterSetActive(enable bool, amount Float.X, limit Float.X)
- func SetBootImage(image [1]gdclass.Image, color Color.RGBA, scale bool)
- func SetDebugGenerateWireframes(generate bool)
- func SetDefaultClearColor(color Color.RGBA)
- func SetRenderLoopEnabled(value bool)
- func ShaderCreate() RID.Shader
- func ShaderGetCode(shader RID.Shader) string
- func ShaderGetDefaultTextureParameter(shader RID.Shader, name string) RID.Texture
- func ShaderGetParameterDefault(shader RID.Shader, name string) any
- func ShaderSetCode(shader RID.Shader, code string)
- func ShaderSetDefaultTextureParameter(shader RID.Shader, name string, texture RID.Texture)
- func ShaderSetPathHint(shader RID.Shader, path string)
- func SkeletonAllocateData(skeleton RID.Skeleton, bones int)
- func SkeletonBoneGetTransform(skeleton RID.Skeleton, bone int) Transform3D.BasisOrigin
- func SkeletonBoneGetTransform2d(skeleton RID.Skeleton, bone int) Transform2D.OriginXY
- func SkeletonBoneSetTransform(skeleton RID.Skeleton, bone int, transform Transform3D.BasisOrigin)
- func SkeletonBoneSetTransform2d(skeleton RID.Skeleton, bone int, transform Transform2D.OriginXY)
- func SkeletonCreate() RID.Skeleton
- func SkeletonGetBoneCount(skeleton RID.Skeleton) int
- func SkeletonSetBaseTransform2d(skeleton RID.Skeleton, base_transform Transform2D.OriginXY)
- func SkyBakePanorama(sky RID.Sky, energy Float.X, bake_irradiance bool, size Vector2i.XY) [1]gdclass.Image
- func SkyCreate() RID.Sky
- func SkySetMaterial(sky RID.Sky, material RID.Material)
- func SkySetMode(sky RID.Sky, mode gdclass.RenderingServerSkyMode)
- func SkySetRadianceSize(sky RID.Sky, radiance_size int)
- func SpotLightCreate() RID.Light
- func SubSurfaceScatteringSetQuality(quality gdclass.RenderingServerSubSurfaceScatteringQuality)
- func SubSurfaceScatteringSetScale(scale Float.X, depth_scale Float.X)
- func Texture2dCreate(image [1]gdclass.Image) RID.Texture2D
- func Texture2dGet(texture RID.Texture2D) [1]gdclass.Image
- func Texture2dLayerGet(texture RID.Texture2D, layer int) [1]gdclass.Image
- func Texture2dLayeredCreate(layers [][1]gdclass.Image, ...) RID.Texture2D
- func Texture2dLayeredPlaceholderCreate(layered_type gdclass.RenderingServerTextureLayeredType) RID.Texture2D
- func Texture2dPlaceholderCreate() RID.Texture2D
- func Texture2dUpdate(texture RID.Texture2D, image [1]gdclass.Image, layer int)
- func Texture3dCreate(format gdclass.ImageFormat, width int, height int, depth int, mipmaps bool, ...) RID.Texture3D
- func Texture3dGet(texture RID.Texture3D) [][1]gdclass.Image
- func Texture3dPlaceholderCreate() RID.Texture3D
- func Texture3dUpdate(texture RID.Texture3D, data [][1]gdclass.Image)
- func TextureGetFormat(texture RID.Texture) gdclass.ImageFormat
- func TextureGetNativeHandle(texture RID.Texture) int
- func TextureGetPath(texture RID.Texture) string
- func TextureGetRdTexture(texture RID.Texture) RID.Texture
- func TextureProxyCreate(base RID.TextureProxy) RID.TextureProxy
- func TextureProxyUpdate(texture RID.TextureProxy, proxy_to RID.Texture)
- func TextureRdCreate(rd_texture RID.Texture) RID.Texture
- func TextureReplace(texture RID.Texture, by_texture RID.Texture)
- func TextureSetForceRedrawIfVisible(texture RID.Texture, enable bool)
- func TextureSetPath(texture RID.Texture, path string)
- func TextureSetSizeOverride(texture RID.Texture, width int, height int)
- func ViewportAttachCamera(viewport RID.Viewport, camera RID.Camera)
- func ViewportAttachCanvas(viewport RID.Viewport, canvas RID.Canvas)
- func ViewportAttachToScreen(viewport RID.Viewport)
- func ViewportCreate() RID.Viewport
- func ViewportGetMeasuredRenderTimeCpu(viewport RID.Viewport) Float.X
- func ViewportGetMeasuredRenderTimeGpu(viewport RID.Viewport) Float.X
- func ViewportGetRenderInfo(viewport RID.Viewport, atype gdclass.RenderingServerViewportRenderInfoType, ...) int
- func ViewportGetRenderTarget(viewport RID.Viewport) RID.Framebuffer
- func ViewportGetTexture(viewport RID.Viewport) RID.Texture
- func ViewportGetUpdateMode(viewport RID.Viewport) gdclass.RenderingServerViewportUpdateMode
- func ViewportRemoveCanvas(viewport RID.Viewport, canvas RID.Canvas)
- func ViewportSetActive(viewport RID.Viewport, active bool)
- func ViewportSetCanvasCullMask(viewport RID.Viewport, canvas_cull_mask int)
- func ViewportSetCanvasStacking(viewport RID.Viewport, canvas RID.Canvas, layer int, sublayer int)
- func ViewportSetCanvasTransform(viewport RID.Viewport, canvas RID.Canvas, offset Transform2D.OriginXY)
- func ViewportSetClearMode(viewport RID.Viewport, clear_mode gdclass.RenderingServerViewportClearMode)
- func ViewportSetDebugDraw(viewport RID.Viewport, draw gdclass.RenderingServerViewportDebugDraw)
- func ViewportSetDefaultCanvasItemTextureFilter(viewport RID.Viewport, filter gdclass.RenderingServerCanvasItemTextureFilter)
- func ViewportSetDefaultCanvasItemTextureRepeat(viewport RID.Viewport, repeat gdclass.RenderingServerCanvasItemTextureRepeat)
- func ViewportSetDisable2d(viewport RID.Viewport, disable bool)
- func ViewportSetDisable3d(viewport RID.Viewport, disable bool)
- func ViewportSetEnvironmentMode(viewport RID.Viewport, mode gdclass.RenderingServerViewportEnvironmentMode)
- func ViewportSetFsrSharpness(viewport RID.Viewport, sharpness Float.X)
- func ViewportSetGlobalCanvasTransform(viewport RID.Viewport, transform Transform2D.OriginXY)
- func ViewportSetMeasureRenderTime(viewport RID.Viewport, enable bool)
- func ViewportSetMsaa2d(viewport RID.Viewport, msaa gdclass.RenderingServerViewportMSAA)
- func ViewportSetMsaa3d(viewport RID.Viewport, msaa gdclass.RenderingServerViewportMSAA)
- func ViewportSetOcclusionCullingBuildQuality(quality gdclass.RenderingServerViewportOcclusionCullingBuildQuality)
- func ViewportSetOcclusionRaysPerThread(rays_per_thread int)
- func ViewportSetParentViewport(viewport RID.Viewport, parent_viewport RID.Viewport)
- func ViewportSetPositionalShadowAtlasQuadrantSubdivision(viewport RID.Viewport, quadrant int, subdivision int)
- func ViewportSetPositionalShadowAtlasSize(viewport RID.Viewport, size int)
- func ViewportSetRenderDirectToScreen(viewport RID.Viewport, enabled bool)
- func ViewportSetScaling3dMode(viewport RID.Viewport, ...)
- func ViewportSetScaling3dScale(viewport RID.Viewport, scale Float.X)
- func ViewportSetScenario(viewport RID.Viewport, scenario RID.Scenario)
- func ViewportSetScreenSpaceAa(viewport RID.Viewport, mode gdclass.RenderingServerViewportScreenSpaceAA)
- func ViewportSetSdfOversizeAndScale(viewport RID.Viewport, oversize gdclass.RenderingServerViewportSDFOversize, ...)
- func ViewportSetSize(viewport RID.Viewport, width int, height int)
- func ViewportSetSnap2dTransformsToPixel(viewport RID.Viewport, enabled bool)
- func ViewportSetSnap2dVerticesToPixel(viewport RID.Viewport, enabled bool)
- func ViewportSetTextureMipmapBias(viewport RID.Viewport, mipmap_bias Float.X)
- func ViewportSetTransparentBackground(viewport RID.Viewport, enabled bool)
- func ViewportSetUpdateMode(viewport RID.Viewport, update_mode gdclass.RenderingServerViewportUpdateMode)
- func ViewportSetUseDebanding(viewport RID.Viewport, enable bool)
- func ViewportSetUseHdr2d(viewport RID.Viewport, enabled bool)
- func ViewportSetUseOcclusionCulling(viewport RID.Viewport, enable bool)
- func ViewportSetUseTaa(viewport RID.Viewport, enable bool)
- func ViewportSetUseXr(viewport RID.Viewport, use_xr bool)
- func ViewportSetVrsMode(viewport RID.Viewport, mode gdclass.RenderingServerViewportVRSMode)
- func ViewportSetVrsTexture(viewport RID.Viewport, texture RID.Texture)
- func ViewportSetVrsUpdateMode(viewport RID.Viewport, mode gdclass.RenderingServerViewportVRSUpdateMode)
- func VisibilityNotifierCreate() RID.VisibilityNotifier
- func VisibilityNotifierSetAabb(notifier RID.VisibilityNotifier, aabb AABB.PositionSize)
- func VisibilityNotifierSetCallbacks(notifier RID.VisibilityNotifier, enter_callable func(), exit_callable func())
- func VoxelGiAllocateData(voxel_gi RID.VoxelGI, to_cell_xform Transform3D.BasisOrigin, ...)
- func VoxelGiCreate() RID.VoxelGI
- func VoxelGiGetDataCells(voxel_gi RID.VoxelGI) []byte
- func VoxelGiGetDistanceField(voxel_gi RID.VoxelGI) []byte
- func VoxelGiGetLevelCounts(voxel_gi RID.VoxelGI) []int32
- func VoxelGiGetOctreeCells(voxel_gi RID.VoxelGI) []byte
- func VoxelGiGetOctreeSize(voxel_gi RID.VoxelGI) Vector3i.XYZ
- func VoxelGiGetToCellXform(voxel_gi RID.VoxelGI) Transform3D.BasisOrigin
- func VoxelGiSetBakedExposureNormalization(voxel_gi RID.VoxelGI, baked_exposure Float.X)
- func VoxelGiSetBias(voxel_gi RID.VoxelGI, bias Float.X)
- func VoxelGiSetDynamicRange(voxel_gi RID.VoxelGI, arange Float.X)
- func VoxelGiSetEnergy(voxel_gi RID.VoxelGI, energy Float.X)
- func VoxelGiSetInterior(voxel_gi RID.VoxelGI, enable bool)
- func VoxelGiSetNormalBias(voxel_gi RID.VoxelGI, bias Float.X)
- func VoxelGiSetPropagation(voxel_gi RID.VoxelGI, amount Float.X)
- func VoxelGiSetQuality(quality gdclass.RenderingServerVoxelGIQuality)
- func VoxelGiSetUseTwoBounces(voxel_gi RID.VoxelGI, enable bool)
- type ArrayCustomFormat
- type ArrayFormat
- type ArrayType
- type BakeChannels
- type BlendShapeMode
- type CanvasGroupMode
- type CanvasItemTextureFilter
- type CanvasItemTextureRepeat
- type CanvasLightBlendMode
- type CanvasLightMode
- type CanvasLightShadowFilter
- type CanvasOccluderPolygonCullMode
- type CanvasTextureChannel
- type CompositorEffectCallbackType
- type CompositorEffectFlags
- type CubeMapLayer
- type DOFBlurQuality
- type DOFBokehShape
- type DecalFilter
- type DecalTexture
- type EnvironmentAmbientSource
- type EnvironmentBG
- type EnvironmentFogMode
- type EnvironmentGlowBlendMode
- type EnvironmentReflectionSource
- type EnvironmentSDFGIFramesToConverge
- type EnvironmentSDFGIFramesToUpdateLight
- type EnvironmentSDFGIRayCount
- type EnvironmentSDFGIYScale
- type EnvironmentSSAOQuality
- type EnvironmentSSILQuality
- type EnvironmentSSRRoughnessQuality
- type EnvironmentToneMapper
- type Features
- type FogVolumeShape
- type GlobalShaderParameterType
- type InstanceFlags
- type InstanceType
- type LightBakeMode
- type LightDirectionalShadowMode
- type LightDirectionalSkyMode
- type LightOmniShadowMode
- type LightParam
- type LightProjectorFilter
- type LightType
- type MultimeshTransformFormat
- type NinePatchAxisMode
- type ParticlesCollisionHeightfieldResolution
- type ParticlesCollisionType
- type ParticlesDrawOrder
- type ParticlesMode
- type ParticlesTransformAlign
- type PrimitiveType
- type ReflectionProbeAmbientMode
- type ReflectionProbeUpdateMode
- type RenderingInfo
- type ShaderMode
- type ShadowCastingSetting
- type ShadowQuality
- type SkyMode
- type SubSurfaceScatteringQuality
- type Surface
- type TextureLayeredType
- type ViewportClearMode
- type ViewportDebugDraw
- type ViewportEnvironmentMode
- type ViewportMSAA
- type ViewportOcclusionCullingBuildQuality
- type ViewportRenderInfo
- type ViewportRenderInfoType
- type ViewportSDFOversize
- type ViewportSDFScale
- type ViewportScaling3DMode
- type ViewportScreenSpaceAA
- type ViewportUpdateMode
- type ViewportVRSMode
- type ViewportVRSUpdateMode
- type VisibilityRangeFadeMode
- type VoxelGIQuality
Constants ¶
This section is empty.
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) [][1]gdclass.Image
Bakes the material data of the Mesh passed in the [param base] parameter with optional [param material_overrides] to a set of [Image]s of size [param image_size]. Returns an array of [Image]s containing material properties as specified in [enum BakeChannels].
func CallOnRenderThread ¶
func CallOnRenderThread(callable func())
As the RenderingServer actual logic may run on an 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 [code]camera_attributes_[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] 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 gdclass.RenderingServerDOFBokehShape)
Sets the shape of the DOF bokeh pattern. Different shapes may be used to achieve artistic effect, or to meet performance targets. For more detail on available options see [enum DOFBokehShape].
func CameraAttributesSetDofBlurQuality ¶
func CameraAttributesSetDofBlurQuality(quality gdclass.RenderingServerDOFBlurQuality, use_jitter bool)
Sets the quality level of the DOF blur effect to one of the options in [enum DOFBlurQuality]. [param 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: [codeblock] func get_exposure_normalization(ev100: float):
return 1.0 / (pow(2.0, ev100) * 1.2)
[/codeblock] The exposure value can be calculated from aperture (in f-stops), shutter speed (in seconds), and sensitivity (in ISO) as follows: [codeblock] func get_exposure(aperture: float, shutter_speed: float, sensitivity: float):
return log((aperture * aperture) / shutter_speed * (100.0 / sensitivity)) / log(2)
[/codeblock]
func CameraCreate ¶
Creates a 3D camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [Camera3D].
func CameraSetCameraAttributes ¶
func CameraSetCameraAttributes(camera RID.Camera, effects RID.CameraAttributes)
Sets the camera_attributes created with [method camera_attributes_create] to the given camera.
func CameraSetCompositor ¶
func CameraSetCompositor(camera RID.Camera, compositor RID.Compositor)
Sets the compositor used by this camera. Equivalent to [member Camera3D.compositor].
func CameraSetCullMask ¶
Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to [member Camera3D.cull_mask].
func CameraSetEnvironment ¶
func CameraSetEnvironment(camera RID.Camera, env RID.Environment)
Sets the environment used by this camera. Equivalent to [member 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 [param offset] argument to create "tilted frustum" effects.
func CameraSetOrthogonal ¶
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 ¶
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] of camera.
func CameraSetUseVerticalAspect ¶
If [code]true[/code], preserves the horizontal aspect ratio which is equivalent to [constant Camera3D.KEEP_WIDTH]. If [code]false[/code], preserves the vertical aspect ratio which is equivalent to [constant Camera3D.KEEP_HEIGHT].
func CanvasCreate ¶
Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] 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)
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 ¶
Draws a circle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_circle].
func CanvasItemAddClipIgnore ¶
func CanvasItemAddClipIgnore(item RID.CanvasItem, ignore bool)
If [param ignore] is [code]true[/code], ignore clipping on items drawn with this canvas item until this is called again with [param 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 [method CanvasItem.draw_lcd_texture_rect_region].
func CanvasItemAddLine ¶
Draws a line on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_line].
func CanvasItemAddMesh ¶
func CanvasItemAddMesh(item RID.CanvasItem, mesh RID.Mesh)
Draws a mesh created with [method mesh_create] with given [param transform], [param modulate] color, and [param texture]. This is used internally by [MeshInstance2D].
func CanvasItemAddMsdfTextureRectRegion ¶
func CanvasItemAddMsdfTextureRectRegion(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture, src_rect Rect2.PositionSize)
See also [method CanvasItem.draw_msdf_texture_rect_region].
func CanvasItemAddMultiline ¶
Draws a 2D multiline on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_multiline] and [method CanvasItem.draw_multiline_colors].
func CanvasItemAddMultimesh ¶
func CanvasItemAddMultimesh(item RID.CanvasItem, mesh RID.MultiMesh)
Draws a 2D [MultiMesh] on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_multimesh].
func CanvasItemAddNinePatch ¶
func CanvasItemAddNinePatch(item RID.CanvasItem, rect Rect2.PositionSize, source Rect2.PositionSize, texture RID.CanvasTexture, topleft Vector2.XY, bottomright Vector2.XY)
Draws a nine-patch rectangle on the [CanvasItem] pointed to by the [param item] [RID].
func CanvasItemAddParticles ¶
Draws particles on the [CanvasItem] pointed to by the [param item] [RID].
func CanvasItemAddPolygon ¶
Draws a 2D polygon on the [CanvasItem] pointed to by the [param item] [RID]. If you need more flexibility (such as being able to use bones), use [method canvas_item_add_triangle_array] instead. See also [method CanvasItem.draw_polygon].
func CanvasItemAddPolyline ¶
Draws a 2D polyline on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_polyline] and [method CanvasItem.draw_polyline_colors].
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 [param item] [RID]. See also [method CanvasItem.draw_primitive].
func CanvasItemAddRect ¶
func CanvasItemAddRect(item RID.CanvasItem, rect Rect2.PositionSize, color Color.RGBA)
Draws a rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_rect].
func CanvasItemAddSetTransform ¶
func CanvasItemAddSetTransform(item RID.CanvasItem, transform Transform2D.OriginXY)
Sets a [Transform2D] that will be used to transform subsequent canvas item commands.
func CanvasItemAddTextureRect ¶
func CanvasItemAddTextureRect(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture)
Draws a 2D textured rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_texture_rect] and [method Texture2D.draw_rect].
func CanvasItemAddTextureRectRegion ¶
func CanvasItemAddTextureRectRegion(item RID.CanvasItem, rect Rect2.PositionSize, texture RID.CanvasTexture, src_rect Rect2.PositionSize)
Draws the specified region of a 2D textured rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_texture_rect_region] and [method Texture2D.draw_rect_region].
func CanvasItemAddTriangleArray ¶
func CanvasItemAddTriangleArray(item RID.CanvasItem, indices []int32, points []Vector2.XY, colors []Color.RGBA)
Draws a triangle array on the [CanvasItem] pointed to by the [param item] [RID]. This is internally used by [Line2D] and [StyleBoxFlat] for rendering. [method canvas_item_add_triangle_array] is highly flexible, but more complex to use than [method canvas_item_add_polygon]. [b]Note:[/b] [param count] is unused and can be left unspecified.
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 [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_item_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [CanvasItem].
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 gdclass.RenderingServerCanvasGroupMode)
Sets the canvas group mode used during 2D rendering for the canvas item specified by the [param item] RID. For faster but more limited clipping, use [method canvas_item_set_clip] instead. [b]Note:[/b] The equivalent node functionality is found in [CanvasGroup] and [member CanvasItem.clip_children].
func CanvasItemSetClip ¶
func CanvasItemSetClip(item RID.CanvasItem, clip bool)
If [param clip] is [code]true[/code], makes the canvas item specified by the [param 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 [method canvas_item_set_canvas_group_mode] instead. [b]Note:[/b] The equivalent node functionality is found in [member Label.clip_text], [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)
If [param use_custom_rect] is [code]true[/code], sets the custom visibility rectangle (used for culling) to [param rect] for the canvas item specified by [param item]. Setting a custom visibility rect can reduce CPU load when drawing lots of 2D instances. If [param use_custom_rect] is [code]false[/code], automatically computes a visibility rectangle based on the canvas item's draw commands.
func CanvasItemSetDefaultTextureFilter ¶
func CanvasItemSetDefaultTextureFilter(item RID.CanvasItem, filter gdclass.RenderingServerCanvasItemTextureFilter)
Sets the default texture filter mode for the canvas item specified by the [param item] RID. Equivalent to [member CanvasItem.texture_filter].
func CanvasItemSetDefaultTextureRepeat ¶
func CanvasItemSetDefaultTextureRepeat(item RID.CanvasItem, repeat gdclass.RenderingServerCanvasItemTextureRepeat)
Sets the default texture repeat mode for the canvas item specified by the [param item] RID. Equivalent to [member CanvasItem.texture_repeat].
func CanvasItemSetDistanceFieldMode ¶
func CanvasItemSetDistanceFieldMode(item RID.CanvasItem, enabled bool)
If [param enabled] is [code]true[/code], enables multichannel signed distance field rendering mode for the canvas item specified by the [param item] RID. This is meant to be used for font rendering, or with specially generated images using [url=https://github.com/Chlumsky/msdfgen]msdfgen[/url].
func CanvasItemSetDrawBehindParent ¶
func CanvasItemSetDrawBehindParent(item RID.CanvasItem, enabled bool)
If [param enabled] is [code]true[/code], draws the canvas item specified by the [param item] RID behind its parent. Equivalent to [member CanvasItem.show_behind_parent].
func CanvasItemSetDrawIndex ¶
func CanvasItemSetDrawIndex(item RID.CanvasItem, index int)
Sets the index for the [CanvasItem].
func CanvasItemSetInterpolated ¶
func CanvasItemSetInterpolated(item RID.CanvasItem, interpolated bool)
If [param interpolated] is [code]true[/code], turns on physics interpolation for the canvas item.
func CanvasItemSetLightMask ¶
func CanvasItemSetLightMask(item RID.CanvasItem, mask int)
Sets the light [param mask] for the canvas item specified by the [param item] RID. Equivalent to [member CanvasItem.light_mask].
func CanvasItemSetMaterial ¶
func CanvasItemSetMaterial(item RID.CanvasItem, material RID.Material)
Sets a new [param material] to the canvas item specified by the [param item] RID. Equivalent to [member CanvasItem.material].
func CanvasItemSetModulate ¶
func CanvasItemSetModulate(item RID.CanvasItem, color Color.RGBA)
Multiplies the color of the canvas item specified by the [param item] RID, while affecting its children. See also [method canvas_item_set_self_modulate]. Equivalent to [member 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 [param item] RID, without affecting its children. See also [method canvas_item_set_modulate]. Equivalent to [member CanvasItem.self_modulate].
func CanvasItemSetSortChildrenByY ¶
func CanvasItemSetSortChildrenByY(item RID.CanvasItem, enabled bool)
If [param enabled] is [code]true[/code], 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 [param item] RID, not the canvas item itself. Equivalent to [member CanvasItem.y_sort_enabled].
func CanvasItemSetTransform ¶
func CanvasItemSetTransform(item RID.CanvasItem, transform Transform2D.OriginXY)
Sets the [param transform] of the canvas item specified by the [param 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 [member 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. [param area] defines the area of detecting visibility. [param enter_callable] is called when the [CanvasItem] enters the screen, [param exit_callable] is called when the [CanvasItem] exits the screen. If [param enable] is [code]false[/code], 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 [code]canvas_light_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] 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 [code]canvas_light_occluder_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] 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 [param interpolated] is [code]true[/code], 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].
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 gdclass.RenderingServerCanvasLightBlendMode)
Sets the blend mode for the given canvas light. See [enum CanvasLightBlendMode] for options. Equivalent to [member Light2D.blend_mode].
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 [param interpolated] is [code]true[/code], 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 gdclass.RenderingServerCanvasLightMode)
The mode of the light, see [enum CanvasLightMode] constants.
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 gdclass.RenderingServerCanvasLightShadowFilter)
Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants.
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 [member PointLight2D.texture].
func CanvasLightSetTextureOffset ¶
func CanvasLightSetTextureOffset(light RID.CanvasLight, offset Vector2.XY)
Sets the offset of a [PointLight2D]'s texture. Equivalent to [member PointLight2D.offset].
func CanvasLightSetTextureScale ¶
func CanvasLightSetTextureScale(light RID.CanvasLight, scale Float.X)
Sets the scale factor of a [PointLight2D]'s texture. Equivalent to [member PointLight2D.texture_scale].
func CanvasLightSetTransform ¶
func CanvasLightSetTransform(light RID.CanvasLight, transform Transform2D.OriginXY)
Sets the canvas light's [Transform2D].
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 [member Light2D.range_z_min] and [member Light2D.range_z_max].
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 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 [code]canvas_occluder_polygon_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [OccluderPolygon2D].
func CanvasOccluderPolygonSetCullMode ¶
func CanvasOccluderPolygonSetCullMode(occluder_polygon RID.CanvasLightOccluderPolygon, mode gdclass.RenderingServerCanvasOccluderPolygonCullMode)
Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants.
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 ¶
A copy of the canvas item will be drawn with a local offset of the mirroring [Vector2].
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 [param repeat_size] by the number of times of the [param repeat_times]. As the [param repeat_times] increases, the copies will spread away from the origin texture.
func CanvasSetModulate ¶
Modulates all colors in the given canvas.
func CanvasSetShadowTextureSize ¶
func CanvasSetShadowTextureSize(size int)
Sets the [member 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 [code]canvas_texture_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. See also [method texture_2d_create]. [b]Note:[/b] 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 gdclass.RenderingServerCanvasTextureChannel, texture RID.CanvasTexture)
Sets the [param channel]'s [param texture] for the canvas texture specified by the [param canvas_texture] RID. Equivalent to [member CanvasTexture.diffuse_texture], [member CanvasTexture.normal_texture] and [member CanvasTexture.specular_texture].
func CanvasTextureSetShadingParameters ¶
func CanvasTextureSetShadingParameters(canvas_texture RID.CanvasTexture, base_color Color.RGBA, shininess Float.X)
Sets the [param base_color] and [param shininess] to use for the canvas texture specified by the [param canvas_texture] RID. Equivalent to [member CanvasTexture.specular_color] and [member CanvasTexture.specular_shininess].
func CanvasTextureSetTextureFilter ¶
func CanvasTextureSetTextureFilter(canvas_texture RID.CanvasTexture, filter gdclass.RenderingServerCanvasItemTextureFilter)
Sets the texture [param filter] mode to use for the canvas texture specified by the [param canvas_texture] RID.
func CanvasTextureSetTextureRepeat ¶
func CanvasTextureSetTextureRepeat(canvas_texture RID.CanvasTexture, repeat gdclass.RenderingServerCanvasItemTextureRepeat)
Sets the texture [param repeat] mode to use for the canvas texture specified by the [param 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 [method free_rid] 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 [method free_rid] method.
func CompositorEffectSetCallback ¶
func CompositorEffectSetCallback(effect RID.CompositorEffect, callback_type gdclass.RenderingServerCompositorEffectCallbackType, callback func())
Sets the callback type ([param callback_type]) and callback method([param 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 gdclass.RenderingServerCompositorEffectFlags, set bool)
Sets the flag ([param flag]) for this rendering effect to [code]true[/code] or [code]false[/code] ([param set]).
func CompositorSetCompositorEffects ¶
func CompositorSetCompositorEffects(compositor RID.Compositor, effects [][]RID.CompositorEffect)
Sets the compositor effects for the specified compositor RID. [param effects] should be an array containing RIDs created with [method compositor_effect_create].
func CreateLocalRenderingDevice ¶
func CreateLocalRenderingDevice() [1]gdclass.RenderingDevice
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. [b]Note:[/b] When using the OpenGL backend or when running in headless mode, this function always returns [code]null[/code].
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. [b]Warning:[/b] This function is intended for debugging in the editor, and will pass through and return a zero [Rect2] in exported projects.
func DecalCreate ¶
Creates a decal and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]decal_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this decal to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent node is [Decal].
func DecalSetAlbedoMix ¶
Sets the [param albedo_mix] in the decal specified by the [param decal] RID. Equivalent to [member Decal.albedo_mix].
func DecalSetCullMask ¶
Sets the cull [param mask] in the decal specified by the [param decal] RID. Equivalent to [member Decal.cull_mask].
func DecalSetDistanceFade ¶
Sets the distance fade parameters in the decal specified by the [param decal] RID. Equivalent to [member Decal.distance_fade_enabled], [member Decal.distance_fade_begin] and [member Decal.distance_fade_length].
func DecalSetEmissionEnergy ¶
Sets the emission [param energy] in the decal specified by the [param decal] RID. Equivalent to [member Decal.emission_energy].
func DecalSetFade ¶
Sets the upper fade ([param above]) and lower fade ([param below]) in the decal specified by the [param decal] RID. Equivalent to [member Decal.upper_fade] and [member Decal.lower_fade].
func DecalSetModulate ¶
Sets the color multiplier in the decal specified by the [param decal] RID to [param color]. Equivalent to [member Decal.modulate].
func DecalSetNormalFade ¶
Sets the normal [param fade] in the decal specified by the [param decal] RID. Equivalent to [member Decal.normal_fade].
func DecalSetSize ¶
Sets the [param size] of the decal specified by the [param decal] RID. Equivalent to [member Decal.size].
func DecalSetTexture ¶
func DecalSetTexture(decal RID.Decal, atype gdclass.RenderingServerDecalTexture, texture RID.Texture)
Sets the [param texture] in the given texture [param type] slot for the specified decal. Equivalent to [method Decal.set_texture].
func DecalsSetFilter ¶
func DecalsSetFilter(filter gdclass.RenderingServerDecalFilter)
Sets the texture [param filter] mode to use when rendering decals. This parameter is global and cannot be set on a per-decal basis.
func DirectionalLightCreate ¶
Creates a directional light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent node is [DirectionalLight3D].
func DirectionalShadowAtlasSetSize ¶
Sets the [param size] of the directional light shadows in 3D. See also [member 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 gdclass.RenderingServerShadowQuality)
Sets the filter [param quality] for directional light shadows in 3D. See also [member 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) [1]gdclass.Image
Generates and returns an [Image] containing the radiance map for the specified [param environment] RID's sky. This supports built-in sky material and custom sky shaders. If [param bake_irradiance] is [code]true[/code], 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 [method sky_bake_panorama]. [b]Note:[/b] 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. [b]Note:[/b] [param 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 [member Sky.radiance_size], 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 [code]environment_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [Environment].
func EnvironmentGlowSetUseBicubicUpscale ¶
func EnvironmentGlowSetUseBicubicUpscale(enable bool)
If [param enable] is [code]true[/code], enables bicubic upscaling for glow which improves quality at the cost of performance. Equivalent to [member ProjectSettings.rendering/environment/glow/upscale_mode].
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)
Sets the values to be used for ambient light rendering. See [Environment] for more details.
func EnvironmentSetBackground ¶
func EnvironmentSetBackground(env RID.Environment, bg gdclass.RenderingServerEnvironmentBG)
Sets the environment's background mode. Equivalent to [member Environment.background_mode].
func EnvironmentSetBgColor ¶
func EnvironmentSetBgColor(env RID.Environment, color Color.RGBA)
Color displayed for clear areas of the scene. Only effective if using the [constant ENV_BG_COLOR] background mode.
func EnvironmentSetBgEnergy ¶
Sets the intensity of the background color.
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)
Configures fog for the specified environment RID. See [code]fog_*[/code] 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 gdclass.RenderingServerEnvironmentGlowBlendMode, 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 [code]glow_*[/code] properties in [Environment] for more information.
func EnvironmentSetSdfgi ¶
func EnvironmentSetSdfgi(env RID.Environment, enable bool, cascades int, min_cell_size Float.X, y_scale gdclass.RenderingServerEnvironmentSDFGIYScale, 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 [code]sdfgi_*[/code] properties in [Environment] for more information.
func EnvironmentSetSdfgiFramesToConverge ¶
func EnvironmentSetSdfgiFramesToConverge(frames gdclass.RenderingServerEnvironmentSDFGIFramesToConverge)
Sets the number of frames to use for converging signed distance field global illumination. Equivalent to [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_converge].
func EnvironmentSetSdfgiFramesToUpdateLight ¶
func EnvironmentSetSdfgiFramesToUpdateLight(frames gdclass.RenderingServerEnvironmentSDFGIFramesToUpdateLight)
Sets the update speed for dynamic lights' indirect lighting when computing signed distance field global illumination. Equivalent to [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights].
func EnvironmentSetSdfgiRayCount ¶
func EnvironmentSetSdfgiRayCount(ray_count gdclass.RenderingServerEnvironmentSDFGIRayCount)
Sets the number of rays to throw per frame when computing signed distance field global illumination. Equivalent to [member 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 [i]BGMode[/i] sky. Equivalent to [member Environment.sky].
func EnvironmentSetSkyCustomFov ¶
func EnvironmentSetSkyCustomFov(env RID.Environment, scale Float.X)
Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.sky_custom_fov].
func EnvironmentSetSkyOrientation ¶
func EnvironmentSetSkyOrientation(env RID.Environment, orientation Basis.XYZ)
Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.sky_rotation], where the rotation vector is used to construct the [Basis].
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 gdclass.RenderingServerEnvironmentSSAOQuality, 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 gdclass.RenderingServerEnvironmentSSILQuality, 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 gdclass.RenderingServerEnvironmentSSRRoughnessQuality)
func EnvironmentSetTonemap ¶
func EnvironmentSetTonemap(env RID.Environment, tone_mapper gdclass.RenderingServerEnvironmentToneMapper, 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 ¶
Sets the resolution of the volumetric fog's froxel buffer. [param size] is modified by the screen's aspect ratio and then used to set the width and height of the buffer. While [param depth] is directly used to set the depth of the buffer.
func FogVolumeCreate ¶
Creates a new fog volume and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]fog_volume_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [FogVolume].
func FogVolumeSetMaterial ¶
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 gdclass.RenderingServerFogVolumeShape)
Sets the shape of the fog volume to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD].
func FogVolumeSetSize ¶
Sets the size of the fog volume when shape is [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER] or [constant RenderingServer.FOG_VOLUME_SHAPE_BOX].
func ForceDraw ¶
func ForceDraw()
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 ¶
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 GetDefaultClearColor ¶
Returns the default clear color which is used when a specific clear color has not been selected. See also [method set_default_clear_color].
func GetFrameSetupTimeCpu ¶
Returns the time taken to setup rendering on the CPU in milliseconds. This value is shared across all viewports and does [i]not[/i] require [method viewport_set_measure_render_time] to be enabled on a viewport to be queried. See also [method viewport_get_measured_render_time_cpu].
func GetRenderingDevice ¶
func GetRenderingDevice() [1]gdclass.RenderingDevice
Returns the global RenderingDevice. [b]Note:[/b] When using the OpenGL backend or when running in headless mode, this function always returns [code]null[/code].
func GetRenderingInfo ¶
func GetRenderingInfo(info gdclass.RenderingServerRenderingInfo) int
Returns a statistic about the rendering engine which can be used for performance profiling. See [enum RenderingServer.RenderingInfo] for a list of values that can be queried. See also [method viewport_get_render_info], which returns information specific to a viewport. [b]Note:[/b] Only 3D rendering is currently taken into account by some of these values, such as the number of draw calls. [b]Note:[/b] Rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, [method get_rendering_info] returns [code]0[/code]. To print rendering information in [code]_ready()[/code] successfully, use the following: [codeblock] func _ready():
for _i in 2: await get_tree().process_frame print(RenderingServer.get_rendering_info(RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME))
[/codeblock]
func GetShaderParameterList ¶
Returns the parameters of a shader.
func GetTestCube ¶
Returns the RID of the test cube. This mesh will be created and returned on the first call to [method get_test_cube], then it will be cached for subsequent calls. See also [method make_sphere_mesh].
func GetTestTexture ¶
Returns the RID of a 256×256 texture with a testing pattern on it (in [constant Image.FORMAT_RGB8] format). This texture will be created and returned on the first call to [method get_test_texture], then it will be cached for subsequent calls. See also [method get_white_texture]. Example of getting the test texture and applying it to a [Sprite2D] node: [codeblock] var texture_rid = RenderingServer.get_test_texture() var texture = ImageTexture.create_from_image(RenderingServer.texture_2d_get(texture_rid)) $Sprite2D.texture = texture [/codeblock]
func GetVideoAdapterApiVersion ¶
func GetVideoAdapterApiVersion() string
Returns the version of the graphics video adapter [i]currently in use[/i] (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 [method OS.get_video_adapter_driver_info]. [b]Note:[/b] 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"). [b]Note:[/b] When running a headless or server binary, this function returns an empty string. [b]Note:[/b] 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() gdclass.RenderingDeviceDeviceType
Returns the type of the video adapter. Since dedicated graphics cards from a given generation will [i]usually[/i] be significantly faster than integrated graphics made in the same generation, the device type can be used as a basis for automatic graphics settings adjustment. However, this is not always true, so make sure to provide users with a way to manually override graphics settings. [b]Note:[/b] When using the OpenGL backend or when running in headless mode, this function always returns [constant RenderingDevice.DEVICE_TYPE_OTHER].
func GetVideoAdapterVendor ¶
func GetVideoAdapterVendor() string
Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). [b]Note:[/b] When running a headless or server binary, this function returns an empty string.
func GetWhiteTexture ¶
Returns the ID of a 4×4 white texture (in [constant Image.FORMAT_RGB8] format). This texture will be created and returned on the first call to [method get_white_texture], then it will be cached for subsequent calls. See also [method get_test_texture]. Example of getting the white texture and applying it to a [Sprite2D] node: [codeblock] var texture_rid = RenderingServer.get_white_texture() var texture = ImageTexture.create_from_image(RenderingServer.texture_2d_get(texture_rid)) $Sprite2D.texture = texture [/codeblock]
func GiSetUseHalfResolution ¶
func GiSetUseHalfResolution(half_resolution bool)
If [param half_resolution] is [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) 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 [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution].
func GlobalShaderParameterAdd ¶
func GlobalShaderParameterAdd(name string, atype gdclass.RenderingServerGlobalShaderParameterType, default_value any)
Creates a new global shader uniform. [b]Note:[/b] Global shader parameter names are case-sensitive.
func GlobalShaderParameterGet ¶
Returns the value of the global shader uniform specified by [param name]. [b]Note:[/b] [method global_shader_parameter_get] 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. [b]Note:[/b] [method global_shader_parameter_get] 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 GlobalShaderParameterGetType ¶
func GlobalShaderParameterGetType(name string) gdclass.RenderingServerGlobalShaderParameterType
Returns the type associated to the global shader uniform specified by [param name]. [b]Note:[/b] [method global_shader_parameter_get] 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 [param name].
func GlobalShaderParameterSet ¶
Sets the global shader uniform [param name] to [param value].
func GlobalShaderParameterSetOverride ¶
Overrides the global shader uniform [param name] with [param value]. Equivalent to the [ShaderGlobalsOverride] node.
func HasChanged ¶
func HasChanged() bool
Returns [code]true[/code] if changes have been made to the RenderingServer's data. [method force_draw] is usually called if this happens.
func HasFeature ¶
func HasFeature(feature gdclass.RenderingServerFeatures) bool
This method does nothing and always returns [code]false[/code].
func HasOsFeature ¶
Returns [code]true[/code] if the OS supports a certain [param feature]. Features might be [code]s3tc[/code], [code]etc[/code], and [code]etc2[/code].
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 [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray].
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 [code]instance_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] 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 [method instance_set_base]. [b]Note:[/b] 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 [code]instance_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. This is a shorthand for using [method instance_create] 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 [method GeometryInstance3D.get_instance_shader_parameter]. [b]Note:[/b] 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 [method GeometryInstance3D.get_instance_shader_parameter].
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 [code]name[/code], [code]class_name[/code], [code]type[/code], [code]hint[/code], [code]hint_string[/code] and [code]usage[/code]. Equivalent to [method GeometryInstance3D.get_instance_shader_parameter].
func InstanceGeometrySetCastShadowsSetting ¶
func InstanceGeometrySetCastShadowsSetting(instance RID.VisualInstance, shadow_casting_setting gdclass.RenderingServerShadowCastingSetting)
Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance3D.cast_shadow].
func InstanceGeometrySetFlag ¶
func InstanceGeometrySetFlag(instance RID.VisualInstance, flag gdclass.RenderingServerInstanceFlags, enabled bool)
Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details.
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 [member GeometryInstance3D.gi_lightmap_scale]) 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 [member GeometryInstance3D.lod_bias].
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 [member GeometryInstance3D.material_overlay].
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 [member GeometryInstance3D.material_override].
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 [method GeometryInstance3D.set_instance_shader_parameter].
func InstanceGeometrySetTransparency ¶
func InstanceGeometrySetTransparency(instance RID.VisualInstance, transparency Float.X)
Sets the transparency for the given geometry instance. Equivalent to [member GeometryInstance3D.transparency]. A transparency of [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (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 [param transparency] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering. In spatial shaders, [code]1.0 - transparency[/code] is set as the default value of the [code]ALPHA[/code] built-in. [b]Note:[/b] [param transparency] is clamped between [code]0.0[/code] and [code]1.0[/code], 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 gdclass.RenderingServerVisibilityRangeFadeMode)
Sets the visibility range values for the given geometry instance. Equivalent to [member GeometryInstance3D.visibility_range_begin] 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 [member GeometryInstance3D.custom_aabb].
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 [member GeometryInstance3D.extra_cull_margin].
func InstanceSetIgnoreCulling ¶
func InstanceSetIgnoreCulling(instance RID.VisualInstance, enabled bool)
If [code]true[/code], ignores both frustum and occlusion culling on the specified 3D geometry instance. This is not the same as [member GeometryInstance3D.ignore_occlusion_culling], 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 [member 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 [method MeshInstance3D.set_surface_override_material].
func InstanceSetTransform ¶
func InstanceSetTransform(instance RID.VisualInstance, transform Transform3D.BasisOrigin)
Sets the world space transform of the instance. Equivalent to [member Node3D.global_transform].
func InstanceSetVisibilityParent ¶
func InstanceSetVisibilityParent(instance RID.VisualInstance, parent RID.VisualInstance)
Sets the visibility parent for the given instance. Equivalent to [member Node3D.visibility_parent].
func InstanceSetVisible ¶
func InstanceSetVisible(instance RID.VisualInstance, visible bool)
Sets whether an instance is drawn or not. Equivalent to [member Node3D.visible].
func InstancesCullAabb ¶
func InstancesCullAabb(aabb AABB.PositionSize) []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 [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
func InstancesCullConvex ¶
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 [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
func InstancesCullRay ¶
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 [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
func IsOnRenderThread ¶
func IsOnRenderThread() bool
Returns [code]true[/code] if our code is currently executing on the rendering thread.
func LightDirectionalSetBlendSplits ¶
If [code]true[/code], this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight3D.directional_shadow_blend_splits].
func LightDirectionalSetShadowMode ¶
func LightDirectionalSetShadowMode(light RID.Light, mode gdclass.RenderingServerLightDirectionalShadowMode)
Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight3D.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options.
func LightDirectionalSetSkyMode ¶
func LightDirectionalSetSkyMode(light RID.Light, mode gdclass.RenderingServerLightDirectionalSkyMode)
If [code]true[/code], this light will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon.
func LightOmniSetShadowMode ¶
func LightOmniSetShadowMode(light RID.Light, mode gdclass.RenderingServerLightOmniShadowMode)
Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight3D.omni_shadow_mode].
func LightProjectorsSetFilter ¶
func LightProjectorsSetFilter(filter gdclass.RenderingServerLightProjectorFilter)
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 gdclass.RenderingServerLightBakeMode)
Sets the bake mode to use for the specified 3D light. Equivalent to [member Light3D.light_bake_mode].
func LightSetColor ¶
Sets the color of the light. Equivalent to [member Light3D.light_color].
func LightSetCullMask ¶
Sets the cull mask for this 3D light. Lights only affect objects in the selected layers. Equivalent to [member Light3D.light_cull_mask].
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 [member Light3D.distance_fade_enabled], [member Light3D.distance_fade_begin], [member Light3D.distance_fade_shadow], and [member Light3D.distance_fade_length].
func LightSetMaxSdfgiCascade ¶
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 ¶
If [code]true[/code], the 3D light will subtract light instead of adding light. Equivalent to [member Light3D.light_negative].
func LightSetParam ¶
Sets the specified 3D light parameter. See [enum LightParam] for options. Equivalent to [method Light3D.set_param].
func LightSetProjector ¶
Sets the projector texture to use for the specified 3D light. Equivalent to [member Light3D.light_projector].
func LightSetReverseCullFaceMode ¶
If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light3D.shadow_reverse_cull_face].
func LightSetShadow ¶
If [code]true[/code], light will cast shadows. Equivalent to [member Light3D.shadow_enabled].
func LightmapCreate ¶
Creates a new lightmap global illumination instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]lightmap_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [LightmapGI].
func LightmapSetBakedExposureNormalization ¶
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 [method camera_attributes_set_exposure].
func LightmapSetProbeBounds ¶
func LightmapSetProbeBounds(lightmap RID.Lightmap, bounds AABB.PositionSize)
func LightmapSetTextures ¶
Set the textures on the given [param lightmap] GI instance to the texture array pointed to by the [param light] RID. If the lightmap texture was baked with [member LightmapGI.directional] set to [code]true[/code], then [param uses_sh] must also be [code]true[/code].
func MakeSphereMesh ¶
Returns a mesh of a sphere with the given number of horizontal subdivisions, vertical subdivisions and radius. See also [method get_test_cube].
func MaterialCreate ¶
Creates an empty material and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]material_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [Material].
func MaterialGetParam ¶
Returns the value of a certain material's parameter.
func MaterialSetNextPass ¶
Sets an object's next material.
func MaterialSetParam ¶
Sets a material's parameter.
func MaterialSetRenderPriority ¶
Sets a material's render priority.
func MaterialSetShader ¶
Sets a shader material's shader.
func MeshAddSurface ¶
func MeshAddSurfaceFromArrays ¶
func MeshAddSurfaceFromArrays(mesh RID.Mesh, primitive gdclass.RenderingServerPrimitiveType, arrays []any)
func MeshCreate ¶
Creates a new mesh and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]mesh_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent resource is [Mesh].
func MeshCreateFromSurfaces ¶
func MeshGetBlendShapeCount ¶
Returns a mesh's blend shape count.
func MeshGetBlendShapeMode ¶
func MeshGetBlendShapeMode(mesh RID.Mesh) gdclass.RenderingServerBlendShapeMode
Returns a mesh's blend shape mode.
func MeshGetCustomAabb ¶
func MeshGetCustomAabb(mesh RID.Mesh) AABB.PositionSize
Returns a mesh's custom aabb.
func MeshGetSurfaceCount ¶
Returns a mesh's number of surfaces.
func MeshSetBlendShapeMode ¶
func MeshSetBlendShapeMode(mesh RID.Mesh, mode gdclass.RenderingServerBlendShapeMode)
Sets a mesh's blend shape mode.
func MeshSetCustomAabb ¶
func MeshSetCustomAabb(mesh RID.Mesh, aabb AABB.PositionSize)
Sets a mesh's custom aabb.
func MeshSurfaceGetArrays ¶
Returns a mesh's surface's buffer arrays.
func MeshSurfaceGetBlendShapeArrays ¶
Returns a mesh's surface's arrays for blend shapes.
func MeshSurfaceGetFormatAttributeStride ¶
func MeshSurfaceGetFormatAttributeStride(format gdclass.RenderingServerArrayFormat, vertex_count int) int
Returns the stride of the attribute buffer for a mesh with given [param format].
func MeshSurfaceGetFormatNormalTangentStride ¶
func MeshSurfaceGetFormatNormalTangentStride(format gdclass.RenderingServerArrayFormat, vertex_count int) int
Returns the stride of the combined normals and tangents for a mesh with given [param 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 gdclass.RenderingServerArrayFormat, vertex_count int, array_index int) int
Returns the offset of a given attribute by [param array_index] in the start of its respective buffer.
func MeshSurfaceGetFormatSkinStride ¶
func MeshSurfaceGetFormatSkinStride(format gdclass.RenderingServerArrayFormat, vertex_count int) int
Returns the stride of the skin buffer for a mesh with given [param format].
func MeshSurfaceGetFormatVertexStride ¶
func MeshSurfaceGetFormatVertexStride(format gdclass.RenderingServerArrayFormat, vertex_count int) int
Returns the stride of the vertex positions for a mesh with given [param 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 ¶
Returns a mesh's surface's material.
func MeshSurfaceSetMaterial ¶
Sets a mesh's surface's material.
func MultimeshAllocateData ¶
func MultimeshAllocateData(multimesh RID.MultiMesh, instances int, transform_format gdclass.RenderingServerMultimeshTransformFormat)
func MultimeshCreate ¶
Creates a new multimesh on the RenderingServer and returns an [RID] handle. This RID will be used in all [code]multimesh_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] 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 ¶
Returns the MultiMesh data (such as instance transforms, colors, etc.). See [method multimesh_set_buffer] for details on the returned data. [b]Note:[/b] If the buffer is in the engine's internal cache, it will have to be fetched from GPU memory and possibly decompressed. This means [method multimesh_get_buffer] is potentially a slow operation and should be avoided whenever possible.
func MultimeshGetCustomAabb ¶
func MultimeshGetCustomAabb(multimesh RID.MultiMesh) AABB.PositionSize
Returns the custom AABB defined for this MultiMesh resource.
func MultimeshGetInstanceCount ¶
Returns the number of instances allocated for this multimesh.
func MultimeshGetMesh ¶
Returns the RID of the mesh that will be used in drawing this multimesh.
func MultimeshGetVisibleInstances ¶
Returns the number of visible instances for this multimesh.
func MultimeshInstanceGetColor ¶
Returns the color by which the specified instance will be modulated.
func MultimeshInstanceGetCustomData ¶
Returns the custom data associated with the specified instance.
func MultimeshInstanceGetTransform ¶
func MultimeshInstanceGetTransform(multimesh RID.MultiMesh, index int) Transform3D.BasisOrigin
Returns the [Transform3D] of the specified instance.
func MultimeshInstanceGetTransform2d ¶
func MultimeshInstanceGetTransform2d(multimesh RID.MultiMesh, index int) Transform2D.OriginXY
Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms.
func MultimeshInstanceSetColor ¶
Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color].
func MultimeshInstanceSetCustomData ¶
Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a [code]vec4[/code] in the shader. Equivalent to [method MultiMesh.set_instance_custom_data].
func MultimeshInstanceSetTransform ¶
func MultimeshInstanceSetTransform(multimesh RID.MultiMesh, index int, transform Transform3D.BasisOrigin)
Sets the [Transform3D] for this instance. Equivalent to [method MultiMesh.set_instance_transform].
func MultimeshInstanceSetTransform2d ¶
func MultimeshInstanceSetTransform2d(multimesh RID.MultiMesh, index int, transform Transform2D.OriginXY)
Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d].
func MultimeshSetBuffer ¶
Set the entire data to use for drawing the [param multimesh] at once to [param buffer] (such as instance transforms and colors). [param 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 [method multimesh_get_buffer]. The per-instance data size and expected data order is: [codeblock lang=text] 2D:
- Position: 8 floats (8 floats for Transform2D)
- Position + Vertex color: 12 floats (8 floats for Transform2D, 4 floats for Color)
- Position + Custom data: 12 floats (8 floats for Transform2D, 4 floats of custom data)
- Position + Vertex color + Custom data: 16 floats (8 floats for Transform2D, 4 floats for Color, 4 floats of custom data)
3D:
- Position: 12 floats (12 floats for Transform3D)
- Position + Vertex color: 16 floats (12 floats for Transform3D, 4 floats for Color)
- Position + Custom data: 16 floats (12 floats for Transform3D, 4 floats of custom data)
- Position + Vertex color + Custom data: 20 floats (12 floats for Transform3D, 4 floats for Color, 4 floats of custom data)
[/codeblock]
func MultimeshSetCustomAabb ¶
func MultimeshSetCustomAabb(multimesh RID.MultiMesh, aabb AABB.PositionSize)
Sets the custom AABB for this MultiMesh resource.
func MultimeshSetMesh ¶
Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh].
func MultimeshSetVisibleInstances ¶
Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count].
func OccluderCreate ¶
Creates an occluder instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]occluder_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [Occluder3D] (not to be confused with the [OccluderInstance3D] node).
func OccluderSetMesh ¶
Sets the mesh data for the given occluder RID, which controls the shape of the occlusion culling that will be performed.
func OmniLightCreate ¶
Creates a new omni light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this omni light to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent node is [OmniLight3D].
func OnFramePostDraw ¶
func OnFramePostDraw(cb func())
func OnFramePreDraw ¶
func OnFramePreDraw(cb func())
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 [code]particles_collision_*[/code] RenderingServer functions. [b]Note:[/b] 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 [member GPUParticlesCollisionHeightField3D.update_mode].
func ParticlesCollisionSetAttractorAttenuation ¶
func ParticlesCollisionSetAttractorAttenuation(particles_collision RID.ParticlesCollision, curve Float.X)
Sets the attenuation [param curve] for the 3D GPU particles attractor specified by the [param particles_collision] RID. Only used for attractors, not colliders. Equivalent to [member GPUParticlesAttractor3D.attenuation].
func ParticlesCollisionSetAttractorDirectionality ¶
func ParticlesCollisionSetAttractorDirectionality(particles_collision RID.ParticlesCollision, amount Float.X)
Sets the directionality [param amount] for the 3D GPU particles attractor specified by the [param particles_collision] RID. Only used for attractors, not colliders. Equivalent to [member GPUParticlesAttractor3D.directionality].
func ParticlesCollisionSetAttractorStrength ¶
func ParticlesCollisionSetAttractorStrength(particles_collision RID.ParticlesCollision, strength Float.X)
Sets the [param strength] for the 3D GPU particles attractor specified by the [param particles_collision] RID. Only used for attractors, not colliders. Equivalent to [member GPUParticlesAttractor3D.strength].
func ParticlesCollisionSetBoxExtents ¶
func ParticlesCollisionSetBoxExtents(particles_collision RID.ParticlesCollision, extents Vector3.XYZ)
Sets the [param extents] for the 3D GPU particles collision by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionBox3D.size], [member GPUParticlesCollisionSDF3D.size], [member GPUParticlesCollisionHeightField3D.size], [member GPUParticlesAttractorBox3D.size] or [member GPUParticlesAttractorVectorField3D.size] depending on the [param particles_collision] type.
func ParticlesCollisionSetCollisionType ¶
func ParticlesCollisionSetCollisionType(particles_collision RID.ParticlesCollision, atype gdclass.RenderingServerParticlesCollisionType)
Sets the collision or attractor shape [param type] for the 3D GPU particles collision or attractor specified by the [param particles_collision] RID.
func ParticlesCollisionSetCullMask ¶
func ParticlesCollisionSetCullMask(particles_collision RID.ParticlesCollision, mask int)
Sets the cull [param mask] for the 3D GPU particles collision or attractor specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollision3D.cull_mask] or [member GPUParticlesAttractor3D.cull_mask] depending on the [param particles_collision] type.
func ParticlesCollisionSetFieldTexture ¶
func ParticlesCollisionSetFieldTexture(particles_collision RID.ParticlesCollision, texture RID.Texture)
Sets the signed distance field [param texture] for the 3D GPU particles collision specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionSDF3D.texture] or [member GPUParticlesAttractorVectorField3D.texture] depending on the [param particles_collision] type.
func ParticlesCollisionSetHeightFieldResolution ¶
func ParticlesCollisionSetHeightFieldResolution(particles_collision RID.ParticlesCollision, resolution gdclass.RenderingServerParticlesCollisionHeightfieldResolution)
Sets the heightmap [param resolution] for the 3D GPU particles heightfield collision specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionHeightField3D.resolution].
func ParticlesCollisionSetSphereRadius ¶
func ParticlesCollisionSetSphereRadius(particles_collision RID.ParticlesCollision, radius Float.X)
Sets the [param radius] for the 3D GPU particles sphere collision or attractor specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionSphere3D.radius] or [member GPUParticlesAttractorSphere3D.radius] depending on the [param particles_collision] type.
func ParticlesCreate ¶
Creates a GPU-based particle system and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]particles_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach these particles to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent nodes are [GPUParticles2D] and [GPUParticles3D]. [b]Note:[/b] All [code]particles_*[/code] 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 [code]multimesh_*[/code] methods).
func ParticlesEmit ¶
func ParticlesEmit(particles RID.Particles, transform Transform3D.BasisOrigin, velocity Vector3.XYZ, color Color.RGBA, custom Color.RGBA, emit_flags int)
Manually emits particles from the [param 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 [method GPUParticles3D.capture_aabb].
func ParticlesGetEmitting ¶
Returns [code]true[/code] if particles are currently set to emitting.
func ParticlesIsInactive ¶
Returns [code]true[/code] if particles are not emitting and particles are set to inactive.
func ParticlesRequestProcess ¶
Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray].
func ParticlesRestart ¶
Reset the particles on the next update. Equivalent to [method GPUParticles3D.restart].
func ParticlesSetAmount ¶
Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member GPUParticles3D.amount].
func ParticlesSetAmountRatio ¶
Sets the amount ratio for particles to be emitted. Equivalent to [member GPUParticles3D.amount_ratio].
func ParticlesSetCustomAabb ¶
func ParticlesSetCustomAabb(particles RID.Particles, aabb AABB.PositionSize)
Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member GPUParticles3D.visibility_aabb].
func ParticlesSetDrawOrder ¶
func ParticlesSetDrawOrder(particles RID.Particles, order gdclass.RenderingServerParticlesDrawOrder)
Sets the draw order of the particles to one of the named enums from [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member GPUParticles3D.draw_order].
func ParticlesSetDrawPassMesh ¶
Sets the mesh to be used for the specified draw pass. Equivalent to [member GPUParticles3D.draw_pass_1], [member GPUParticles3D.draw_pass_2], [member GPUParticles3D.draw_pass_3], and [member GPUParticles3D.draw_pass_4].
func ParticlesSetDrawPasses ¶
Sets the number of draw passes to use. Equivalent to [member GPUParticles3D.draw_passes].
func ParticlesSetEmissionTransform ¶
func ParticlesSetEmissionTransform(particles RID.Particles, transform Transform3D.BasisOrigin)
Sets the [Transform3D] that will be used by the particles when they first emit.
func ParticlesSetEmitterVelocity ¶
Sets the velocity of a particle node, that will be used by [member ParticleProcessMaterial.inherit_velocity_ratio].
func ParticlesSetEmitting ¶
If [code]true[/code], particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member GPUParticles3D.emitting].
func ParticlesSetExplosivenessRatio ¶
Sets the explosiveness ratio. Equivalent to [member GPUParticles3D.explosiveness].
func ParticlesSetFixedFps ¶
Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member GPUParticles3D.fixed_fps].
func ParticlesSetFractionalDelta ¶
If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member GPUParticles3D.fract_delta].
func ParticlesSetInterpToEnd ¶
Sets the value that informs a [ParticleProcessMaterial] to rush all particles towards the end of their lifetime.
func ParticlesSetInterpolate ¶
func ParticlesSetLifetime ¶
Sets the lifetime of each particle in the system. Equivalent to [member GPUParticles3D.lifetime].
func ParticlesSetMode ¶
func ParticlesSetMode(particles RID.Particles, mode gdclass.RenderingServerParticlesMode)
Sets whether the GPU particles specified by the [param particles] RID should be rendered in 2D or 3D according to [param mode].
func ParticlesSetOneShot ¶
If [code]true[/code], particles will emit once and then stop. Equivalent to [member GPUParticles3D.one_shot].
func ParticlesSetPreProcessTime ¶
Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member GPUParticles3D.preprocess].
func ParticlesSetProcessMaterial ¶
Sets the material for processing the particles. [b]Note:[/b] This is not the material used to draw the materials. Equivalent to [member GPUParticles3D.process_material].
func ParticlesSetRandomnessRatio ¶
Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member GPUParticles3D.randomness].
func ParticlesSetSpeedScale ¶
Sets the speed scale of the particle system. Equivalent to [member GPUParticles3D.speed_scale].
func ParticlesSetSubemitter ¶
func ParticlesSetTrailBindPoses ¶
func ParticlesSetTrailBindPoses(particles RID.Particles, bind_poses []Transform3D.BasisOrigin)
func ParticlesSetTrails ¶
If [param enable] is [code]true[/code], enables trails for the [param particles] with the specified [param length_sec] in seconds. Equivalent to [member GPUParticles3D.trail_enabled] and [member GPUParticles3D.trail_lifetime].
func ParticlesSetTransformAlign ¶
func ParticlesSetTransformAlign(particles RID.Particles, align gdclass.RenderingServerParticlesTransformAlign)
func ParticlesSetUseLocalCoordinates ¶
If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member GPUParticles3D.local_coords].
func PositionalSoftShadowFilterSetQuality ¶
func PositionalSoftShadowFilterSetQuality(quality gdclass.RenderingServerShadowQuality)
Sets the filter quality for omni and spot light shadows in 3D. See also [member 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 [code]reflection_probe_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] 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 [member ReflectionProbe.ambient_color].
func ReflectionProbeSetAmbientEnergy ¶
func ReflectionProbeSetAmbientEnergy(probe RID.ReflectionProbe, energy Float.X)
Sets the reflection probe's custom ambient light energy. Equivalent to [member ReflectionProbe.ambient_color_energy].
func ReflectionProbeSetAmbientMode ¶
func ReflectionProbeSetAmbientMode(probe RID.ReflectionProbe, mode gdclass.RenderingServerReflectionProbeAmbientMode)
Sets the reflection probe's ambient light mode. Equivalent to [member ReflectionProbe.ambient_mode].
func ReflectionProbeSetAsInterior ¶
func ReflectionProbeSetAsInterior(probe RID.ReflectionProbe, enable bool)
If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior].
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 [member ReflectionProbe.cull_mask].
func ReflectionProbeSetEnableBoxProjection ¶
func ReflectionProbeSetEnableBoxProjection(probe RID.ReflectionProbe, enable bool)
If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection].
func ReflectionProbeSetEnableShadows ¶
func ReflectionProbeSetEnableShadows(probe RID.ReflectionProbe, enable bool)
If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows].
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 [member 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 [member ReflectionProbe.max_distance].
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 [member ReflectionProbe.mesh_lod_threshold].
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 [member ReflectionProbe.origin_offset].
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 [member ReflectionProbe.reflection_mask].
func ReflectionProbeSetResolution ¶
func ReflectionProbeSetResolution(probe RID.ReflectionProbe, resolution int)
Sets the resolution to use when rendering the specified reflection probe. The [param resolution] is specified for each cubemap face: for instance, specifying [code]512[/code] 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 [member ReflectionProbe.size].
func ReflectionProbeSetUpdateMode ¶
func ReflectionProbeSetUpdateMode(probe RID.ReflectionProbe, mode gdclass.RenderingServerReflectionProbeUpdateMode)
Sets how often the reflection probe updates. Can either be once or every frame. See [enum ReflectionProbeUpdateMode] for options.
func RenderLoopEnabled ¶
func RenderLoopEnabled() bool
func RequestFrameDrawnCallback ¶
func RequestFrameDrawnCallback(callable func())
Schedules a callback to the given callable after a frame has been drawn.
func ScenarioCreate ¶
Creates a scenario and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]scenario_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] 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 ([param effects]) that will be used with this scenario. See also [CameraAttributes].
func ScenarioSetCompositor ¶
func ScenarioSetCompositor(scenario RID.Scenario, compositor RID.Compositor)
Sets the compositor ([param 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 ¶
Sets the screen-space roughness limiter parameters, such as whether it should be enabled and its thresholds. Equivalent to [member ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/enabled], [member ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/amount] and [member ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/limit].
func SetBootImage ¶
Sets a boot image. The color defines the background color. If [param scale] is [code]true[/code], the image will be scaled to fit the screen size. If [param use_filter] is [code]true[/code], the image will be scaled with linear interpolation. If [param use_filter] is [code]false[/code], the image will be scaled with nearest-neighbor interpolation.
func SetDebugGenerateWireframes ¶
func SetDebugGenerateWireframes(generate bool)
This method is currently unimplemented and does nothing if called with [param generate] set to [code]true[/code].
func SetDefaultClearColor ¶
Sets the default clear color which is used when a specific clear color has not been selected. See also [method get_default_clear_color].
func SetRenderLoopEnabled ¶
func SetRenderLoopEnabled(value bool)
func ShaderCreate ¶
Creates an empty shader and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]shader_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [Shader].
func ShaderGetCode ¶
Returns a shader's source code as a string.
func ShaderGetDefaultTextureParameter ¶
Returns a default texture from a shader searched by name. [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture.
func ShaderGetParameterDefault ¶
Returns the default value for the specified shader uniform. This is usually the value written in the shader source code.
func ShaderSetCode ¶
Sets the shader's source code (which triggers recompilation after being changed).
func ShaderSetDefaultTextureParameter ¶
Sets a shader's default texture. Overwrites the texture given by name. [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture.
func ShaderSetPathHint ¶
Sets the path hint for the specified shader. This should generally match the [Shader] resource's [member Resource.resource_path].
func SkeletonAllocateData ¶
func SkeletonBoneGetTransform ¶
func SkeletonBoneGetTransform(skeleton RID.Skeleton, bone int) Transform3D.BasisOrigin
Returns the [Transform3D] set for a specific bone of this skeleton.
func SkeletonBoneGetTransform2d ¶
func SkeletonBoneGetTransform2d(skeleton RID.Skeleton, bone int) Transform2D.OriginXY
Returns the [Transform2D] set for a specific bone of this skeleton.
func SkeletonBoneSetTransform ¶
func SkeletonBoneSetTransform(skeleton RID.Skeleton, bone int, transform Transform3D.BasisOrigin)
Sets the [Transform3D] for a specific bone of this skeleton.
func SkeletonBoneSetTransform2d ¶
func SkeletonBoneSetTransform2d(skeleton RID.Skeleton, bone int, transform Transform2D.OriginXY)
Sets the [Transform2D] for a specific bone of this skeleton.
func SkeletonCreate ¶
Creates a skeleton and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]skeleton_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method.
func SkeletonGetBoneCount ¶
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) [1]gdclass.Image
Generates and returns an [Image] containing the radiance map for the specified [param sky] RID. This supports built-in sky material and custom sky shaders. If [param bake_irradiance] is [code]true[/code], 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 [method environment_bake_panorama]. [b]Note:[/b] 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. [param energy] values above [code]1.0[/code] can be used to brighten the resulting image. [b]Note:[/b] [param 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 [member Sky.radiance_size], 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 ¶
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 [code]sky_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method.
func SkySetMaterial ¶
Sets the material that the sky uses to render the background, ambient and reflection maps.
func SkySetMode ¶
func SkySetMode(sky RID.Sky, mode gdclass.RenderingServerSkyMode)
Sets the process [param mode] of the sky specified by the [param sky] RID. Equivalent to [member Sky.process_mode].
func SkySetRadianceSize ¶
Sets the [param radiance_size] of the sky specified by the [param sky] RID (in pixels). Equivalent to [member Sky.radiance_size].
func SpotLightCreate ¶
Creates a spot light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID.
func SubSurfaceScatteringSetQuality ¶
func SubSurfaceScatteringSetQuality(quality gdclass.RenderingServerSubSurfaceScatteringQuality)
Sets [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality] to use when rendering materials that have subsurface scattering enabled.
func SubSurfaceScatteringSetScale ¶
Sets the [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale] and [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale] to use when rendering materials that have subsurface scattering enabled.
func Texture2dCreate ¶
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 [code]texture_2d_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [Texture2D]. [b]Note:[/b] Not to be confused with [method RenderingDevice.texture_create], which creates the graphics API's own texture type as opposed to the Godot-specific [Texture2D] resource.
func Texture2dGet ¶
Returns an [Image] instance from the given [param texture] [RID]. Example of getting the test texture from [method get_test_texture] and applying it to a [Sprite2D] node: [codeblock] var texture_rid = RenderingServer.get_test_texture() var texture = ImageTexture.create_from_image(RenderingServer.texture_2d_get(texture_rid)) $Sprite2D.texture = texture [/codeblock]
func Texture2dLayerGet ¶
Returns an [Image] instance from the given [param texture] [RID] and [param layer].
func Texture2dLayeredCreate ¶
func Texture2dLayeredCreate(layers [][1]gdclass.Image, layered_type gdclass.RenderingServerTextureLayeredType) 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 [code]texture_2d_layered_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [TextureLayered].
func Texture2dLayeredPlaceholderCreate ¶
func Texture2dLayeredPlaceholderCreate(layered_type gdclass.RenderingServerTextureLayeredType) 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 [code]texture_2d_layered_*[/code] RenderingServer functions, although it does nothing when used. See also [method texture_2d_placeholder_create]. [b]Note:[/b] The equivalent resource is [PlaceholderTextureLayered].
func Texture2dPlaceholderCreate ¶
Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]texture_2d_layered_*[/code] RenderingServer functions, although it does nothing when used. See also [method texture_2d_layered_placeholder_create] Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [PlaceholderTexture2D].
func Texture2dUpdate ¶
Updates the texture specified by the [param texture] [RID] with the data in [param image]. A [param layer] must also be specified, which should be [code]0[/code] when updating a single-layer texture ([Texture2D]). [b]Note:[/b] The [param image] must have the same width, height and format as the current [param 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 [method texture_replace] instead.
func Texture3dCreate ¶
func Texture3dCreate(format gdclass.ImageFormat, width int, height int, depth int, mipmaps bool, data [][1]gdclass.Image) RID.Texture3D
[b]Note:[/b] The equivalent resource is [Texture3D].
func Texture3dGet ¶
Returns 3D texture data as an array of [Image]s for the specified texture [RID].
func Texture3dPlaceholderCreate ¶
Creates a placeholder for a 3-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]texture_3d_*[/code] RenderingServer functions, although it does nothing when used. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [PlaceholderTexture3D].
func Texture3dUpdate ¶
Updates the texture specified by the [param texture] [RID]'s data with the data in [param data]. All the texture's layers must be replaced at once. [b]Note:[/b] The [param 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 [method texture_replace] instead.
func TextureGetFormat ¶
func TextureGetFormat(texture RID.Texture) gdclass.ImageFormat
Returns the format for the texture.
func TextureGetNativeHandle ¶
Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension. [b]Note:[/b] This function returns a [code]uint64_t[/code] which internally maps to a [code]GLuint[/code] (OpenGL) or [code]VkImage[/code] (Vulkan).
func TextureGetPath ¶
func TextureGetRdTexture ¶
Returns a texture [RID] that can be used with [RenderingDevice].
func TextureProxyCreate ¶
func TextureProxyCreate(base RID.TextureProxy) RID.TextureProxy
This method does nothing and always returns an invalid [RID].
func TextureProxyUpdate ¶
func TextureProxyUpdate(texture RID.TextureProxy, proxy_to RID.Texture)
This method does nothing.
func TextureRdCreate ¶
Creates a new texture object based on a texture created directly on the [RenderingDevice]. If the texture contains layers, [param layer_type] is used to define the layer type.
func TextureReplace ¶
Replaces [param texture]'s texture data by the texture specified by the [param by_texture] RID, without changing [param texture]'s RID.
func TextureSetPath ¶
func TextureSetSizeOverride ¶
func ViewportAttachCamera ¶
Sets a viewport's camera.
func ViewportAttachCanvas ¶
Sets a viewport's canvas.
func ViewportAttachToScreen ¶
Copies the viewport to a region of the screen specified by [param rect]. If [method viewport_set_render_direct_to_screen] is [code]true[/code], 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: FIXME: The method seems to be non-existent. [codeblocks] [gdscript] func _ready():
get_viewport().set_attach_to_screen_rect(Rect2()) $Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600))
[/gdscript] [/codeblocks] 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 [method viewport_set_render_direct_to_screen].
func ViewportCreate ¶
Creates an empty viewport and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]viewport_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [Viewport].
func ViewportGetMeasuredRenderTimeCpu ¶
Returns the CPU time taken to render the last frame in milliseconds. This [i]only[/i] includes time spent in rendering-related operations; scripts' [code]_process[/code] 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 [method get_frame_setup_time_cpu]. Unlike [method Engine.get_frames_per_second], this method will accurately reflect CPU utilization even if framerate is capped via V-Sync or [member Engine.max_fps]. See also [method viewport_get_measured_render_time_gpu]. [b]Note:[/b] Requires measurements to be enabled on the specified [param viewport] using [method viewport_set_measure_render_time]. Otherwise, this method returns [code]0.0[/code].
func ViewportGetMeasuredRenderTimeGpu ¶
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 [method Engine.get_frames_per_second], this method accurately reflects GPU utilization even if framerate is capped via V-Sync or [member Engine.max_fps]. See also [method viewport_get_measured_render_time_gpu]. [b]Note:[/b] Requires measurements to be enabled on the specified [param viewport] using [method viewport_set_measure_render_time]. Otherwise, this method returns [code]0.0[/code]. [b]Note:[/b] 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 [method viewport_get_measured_render_time_gpu]. 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 gdclass.RenderingServerViewportRenderInfoType, info gdclass.RenderingServerViewportRenderInfo) int
Returns a statistic about the rendering engine which can be used for performance profiling. This is separated into render pass [param type]s, each of them having the same [param info]s you can query (different passes will return different values). See [enum RenderingServer.ViewportRenderInfoType] for a list of render pass types and [enum RenderingServer.ViewportRenderInfo] for a list of information that can be queried. See also [method get_rendering_info], which returns global information across all viewports. [b]Note:[/b] Viewport rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, [method viewport_get_render_info] returns [code]0[/code]. To print rendering information in [code]_ready()[/code] successfully, use the following: [codeblock] func _ready():
for _i in 2: await get_tree().process_frame print( RenderingServer.viewport_get_render_info(get_viewport().get_viewport_rid(), RenderingServer.VIEWPORT_RENDER_INFO_TYPE_VISIBLE, RenderingServer.VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME) )
[/codeblock]
func ViewportGetRenderTarget ¶
func ViewportGetRenderTarget(viewport RID.Viewport) RID.Framebuffer
Returns the render target for the viewport.
func ViewportGetTexture ¶
Returns the viewport's last rendered frame.
func ViewportGetUpdateMode ¶
func ViewportGetUpdateMode(viewport RID.Viewport) gdclass.RenderingServerViewportUpdateMode
Returns the viewport's update mode. See [enum ViewportUpdateMode] constants for options. [b]Warning:[/b] Calling this from any thread other than the rendering thread will be detrimental to performance.
func ViewportRemoveCanvas ¶
Detaches a viewport from a canvas.
func ViewportSetActive ¶
If [code]true[/code], sets the viewport active, else sets it inactive.
func ViewportSetCanvasCullMask ¶
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 ¶
Sets the stacking order for a viewport's canvas. [param layer] is the actual canvas layer, while [param sublayer] specifies the stacking order of the canvas among those in the same layer.
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 gdclass.RenderingServerViewportClearMode)
Sets the clear mode of a viewport. See [enum ViewportClearMode] for options.
func ViewportSetDebugDraw ¶
func ViewportSetDebugDraw(viewport RID.Viewport, draw gdclass.RenderingServerViewportDebugDraw)
Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for options.
func ViewportSetDefaultCanvasItemTextureFilter ¶
func ViewportSetDefaultCanvasItemTextureFilter(viewport RID.Viewport, filter gdclass.RenderingServerCanvasItemTextureFilter)
Sets the default texture filtering mode for the specified [param viewport] RID. See [enum CanvasItemTextureFilter] for options.
func ViewportSetDefaultCanvasItemTextureRepeat ¶
func ViewportSetDefaultCanvasItemTextureRepeat(viewport RID.Viewport, repeat gdclass.RenderingServerCanvasItemTextureRepeat)
Sets the default texture repeat mode for the specified [param viewport] RID. See [enum CanvasItemTextureRepeat] for options.
func ViewportSetDisable2d ¶
If [code]true[/code], the viewport's canvas (i.e. 2D and GUI elements) is not rendered.
func ViewportSetDisable3d ¶
If [code]true[/code], the viewport's 3D elements are not rendered.
func ViewportSetEnvironmentMode ¶
func ViewportSetEnvironmentMode(viewport RID.Viewport, mode gdclass.RenderingServerViewportEnvironmentMode)
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 [constant ENV_BG_CANVAS]. The default behavior is to inherit the setting from the viewport's parent. If the topmost parent is also set to [constant VIEWPORT_ENVIRONMENT_INHERIT], then the behavior will be the same as if it was set to [constant VIEWPORT_ENVIRONMENT_ENABLED].
func ViewportSetFsrSharpness ¶
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 ¶
Sets the measurement for the given [param viewport] RID (obtained using [method Viewport.get_viewport_rid]). Once enabled, [method viewport_get_measured_render_time_cpu] and [method viewport_get_measured_render_time_gpu] will return values greater than [code]0.0[/code] when queried with the given [param viewport].
func ViewportSetMsaa2d ¶
func ViewportSetMsaa2d(viewport RID.Viewport, msaa gdclass.RenderingServerViewportMSAA)
Sets the multisample anti-aliasing mode for 2D/Canvas on the specified [param viewport] RID. See [enum ViewportMSAA] for options.
func ViewportSetMsaa3d ¶
func ViewportSetMsaa3d(viewport RID.Viewport, msaa gdclass.RenderingServerViewportMSAA)
Sets the multisample anti-aliasing mode for 3D on the specified [param viewport] RID. See [enum ViewportMSAA] for options.
func ViewportSetOcclusionCullingBuildQuality ¶
func ViewportSetOcclusionCullingBuildQuality(quality gdclass.RenderingServerViewportOcclusionCullingBuildQuality)
Sets the [member 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 [member 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 ¶
Sets the viewport's parent to the viewport specified by the [param 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 [param quadrant] for omni and spot shadows. See also [method Viewport.set_positional_shadow_atlas_quadrant_subdiv].
func ViewportSetPositionalShadowAtlasSize ¶
Sets the [param size] of the shadow atlas's images (used for omni and spot lights) on the viewport specified by the [param viewport] RID. The value is rounded up to the nearest power of 2. If [param use_16_bits] is [code]true[/code], 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. [b]Note:[/b] If this is set to [code]0[/code], 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 ¶
If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the 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 gdclass.RenderingServerViewportScaling3DMode)
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 ¶
Scales the 3D render buffer based on the viewport size uses an image filter specified in [enum ViewportScaling3DMode] to scale the output image to the full viewport size. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [enum ViewportMSAA] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons. When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale.
func ViewportSetScenario ¶
Sets a viewport's scenario. The scenario contains information about environment information, reflection atlas, etc.
func ViewportSetScreenSpaceAa ¶
func ViewportSetScreenSpaceAa(viewport RID.Viewport, mode gdclass.RenderingServerViewportScreenSpaceAA)
Sets the viewport's screen-space antialiasing mode.
func ViewportSetSdfOversizeAndScale ¶
func ViewportSetSdfOversizeAndScale(viewport RID.Viewport, oversize gdclass.RenderingServerViewportSDFOversize, scale gdclass.RenderingServerViewportSDFScale)
Sets the viewport's 2D signed distance field [member ProjectSettings.rendering/2d/sdf/oversize] and [member ProjectSettings.rendering/2d/sdf/scale]. This is used when sampling the signed distance field in [CanvasItem] shaders as well as [GPUParticles2D] collision. This is [i]not[/i] used by SDFGI in 3D rendering.
func ViewportSetSize ¶
Sets the viewport's width and height in pixels.
func ViewportSetSnap2dTransformsToPixel ¶
If [code]true[/code], 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 [member ProjectSettings.rendering/2d/snap/snap_2d_transforms_to_pixel].
func ViewportSetSnap2dVerticesToPixel ¶
If [code]true[/code], 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 [member ProjectSettings.rendering/2d/snap/snap_2d_vertices_to_pixel].
func ViewportSetTextureMipmapBias ¶
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 [code]-0.75[/code] and [code]0.0[/code]. Enabling temporal antialiasing ([member ProjectSettings.rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias. [b]Note:[/b] 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 [code]-log2(1.0 / scale) + mipmap_bias[/code].
func ViewportSetTransparentBackground ¶
If [code]true[/code], the viewport renders its background as transparent.
func ViewportSetUpdateMode ¶
func ViewportSetUpdateMode(viewport RID.Viewport, update_mode gdclass.RenderingServerViewportUpdateMode)
Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options.
func ViewportSetUseDebanding ¶
If [code]true[/code], enables debanding on the specified viewport. Equivalent to [member ProjectSettings.rendering/anti_aliasing/quality/use_debanding].
func ViewportSetUseHdr2d ¶
If [code]true[/code], 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an [code]RGBA16[/code] framebuffer, while when using the Mobile renderer it will be an [code]RGB10_A2[/code] 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 into the [code]0-1[/code] 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 [member Viewport.use_hdr_2d]. [b]Note:[/b] This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons.
func ViewportSetUseOcclusionCulling ¶
If [code]true[/code], enables occlusion culling on the specified viewport. Equivalent to [member ProjectSettings.rendering/occlusion_culling/use_occlusion_culling].
func ViewportSetUseTaa ¶
If [code]true[/code], use Temporal Anti-Aliasing. Equivalent to [member ProjectSettings.rendering/anti_aliasing/quality/use_taa].
func ViewportSetUseXr ¶
If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [XRInterface].
func ViewportSetVrsMode ¶
func ViewportSetVrsMode(viewport RID.Viewport, mode gdclass.RenderingServerViewportVRSMode)
Sets the Variable Rate Shading (VRS) mode for the viewport. If the GPU does not support VRS, this property is ignored. Equivalent to [member ProjectSettings.rendering/vrs/mode].
func ViewportSetVrsTexture ¶
The texture to use when the VRS mode is set to [constant RenderingServer.VIEWPORT_VRS_TEXTURE]. Equivalent to [member ProjectSettings.rendering/vrs/texture].
func ViewportSetVrsUpdateMode ¶
func ViewportSetVrsUpdateMode(viewport RID.Viewport, mode gdclass.RenderingServerViewportVRSUpdateMode)
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 [constant RenderingServer.VIEWPORT_VRS_UPDATE_ONCE], the input texture is copied once and the mode is changed to [constant RenderingServer.VIEWPORT_VRS_UPDATE_DISABLED].
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 [code]visibility_notifier_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] 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 ¶
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 [code]voxel_gi_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [VoxelGI].
func VoxelGiGetDataCells ¶
func VoxelGiGetDistanceField ¶
func VoxelGiGetLevelCounts ¶
func VoxelGiGetOctreeCells ¶
func VoxelGiGetToCellXform ¶
func VoxelGiGetToCellXform(voxel_gi RID.VoxelGI) Transform3D.BasisOrigin
func VoxelGiSetBakedExposureNormalization ¶
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 [method camera_attributes_set_exposure].
func VoxelGiSetBias ¶
Sets the [member VoxelGIData.bias] value to use on the specified [param voxel_gi]'s [RID].
func VoxelGiSetDynamicRange ¶
Sets the [member VoxelGIData.dynamic_range] value to use on the specified [param voxel_gi]'s [RID].
func VoxelGiSetEnergy ¶
Sets the [member VoxelGIData.energy] value to use on the specified [param voxel_gi]'s [RID].
func VoxelGiSetInterior ¶
Sets the [member VoxelGIData.interior] value to use on the specified [param voxel_gi]'s [RID].
func VoxelGiSetNormalBias ¶
Sets the [member VoxelGIData.normal_bias] value to use on the specified [param voxel_gi]'s [RID].
func VoxelGiSetPropagation ¶
Sets the [member VoxelGIData.propagation] value to use on the specified [param voxel_gi]'s [RID].
func VoxelGiSetQuality ¶
func VoxelGiSetQuality(quality gdclass.RenderingServerVoxelGIQuality)
Sets the [member 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 ¶
Sets the [member VoxelGIData.use_two_bounces] value to use on the specified [param voxel_gi]'s [RID].
Types ¶
type ArrayCustomFormat ¶
type ArrayCustomFormat = gdclass.RenderingServerArrayCustomFormat //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 [code][0.0, 1.0][/code] 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 [code][-1.0, 1.0][/code] 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 [enum ArrayCustomFormat] enum.*/ ArrayCustomMax ArrayCustomFormat = 8 )
type ArrayFormat ¶
type ArrayFormat = gdclass.RenderingServerArrayFormat //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 ArrayFormatBlendShapeMask ArrayFormat = 7 ArrayFormatCustomBase ArrayFormat = 13 ArrayFormatCustomBits ArrayFormat = 3 ArrayFormatCustom0Shift ArrayFormat = 13 ArrayFormatCustom1Shift ArrayFormat = 16 ArrayFormatCustom2Shift ArrayFormat = 19 ArrayFormatCustom3Shift ArrayFormat = 22 ArrayFormatCustomMask ArrayFormat = 7 ArrayCompressFlagsBase ArrayFormat = 25 /*Flag used to mark that the array contains 2D vertices.*/ ArrayFlagUse2dVertices ArrayFormat = 33554432 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 [constant ARRAY_FLAG_FORMAT_VERSION_1] is that this version supports [constant ARRAY_FLAG_COMPRESS_ATTRIBUTES] 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 [constant ARRAY_FLAG_FORMAT_VERSION_2].*/ ArrayFlagFormatCurrentVersion ArrayFormat = 34359738368 /*Flag used to isolate the bits used for mesh version after using [constant ARRAY_FLAG_FORMAT_VERSION_SHIFT] to shift them into place.*/ ArrayFlagFormatVersionMask ArrayFormat = 255 )
type ArrayType ¶
type ArrayType = gdclass.RenderingServerArrayType //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 [enum ArrayType] enum.*/ ArrayMax ArrayType = 13 )
type BakeChannels ¶
type BakeChannels = gdclass.RenderingServerBakeChannels //gd:RenderingServer.BakeChannels
const ( /*Index of [Image] in array of [Image]s returned by [method bake_render_uv2]. Image uses [constant Image.FORMAT_RGBA8] and contains albedo color in the [code].rgb[/code] channels and alpha in the [code].a[/code] channel.*/ BakeChannelAlbedoAlpha BakeChannels = 0 /*Index of [Image] in array of [Image]s returned by [method bake_render_uv2]. Image uses [constant Image.FORMAT_RGBA8] and contains the per-pixel normal of the object in the [code].rgb[/code] channels and nothing in the [code].a[/code] channel. The per-pixel normal is encoded as [code]normal * 0.5 + 0.5[/code].*/ BakeChannelNormal BakeChannels = 1 /*Index of [Image] in array of [Image]s returned by [method bake_render_uv2]. Image uses [constant Image.FORMAT_RGBA8] and contains ambient occlusion (from material and decals only) in the [code].r[/code] channel, roughness in the [code].g[/code] channel, metallic in the [code].b[/code] channel and sub surface scattering amount in the [code].a[/code] channel.*/ BakeChannelOrm BakeChannels = 2 /*Index of [Image] in array of [Image]s returned by [method bake_render_uv2]. Image uses [constant Image.FORMAT_RGBAH] and contains emission color in the [code].rgb[/code] channels and nothing in the [code].a[/code] channel.*/ BakeChannelEmission BakeChannels = 3 )
type BlendShapeMode ¶
type BlendShapeMode = gdclass.RenderingServerBlendShapeMode //gd:RenderingServer.BlendShapeMode
const ( /*Blend shapes are normalized.*/ BlendShapeModeNormalized BlendShapeMode = 0 /*Blend shapes are relative to base weight.*/ BlendShapeModeRelative BlendShapeMode = 1 )
type CanvasGroupMode ¶
type CanvasGroupMode = gdclass.RenderingServerCanvasGroupMode //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 = gdclass.RenderingServerCanvasItemTextureFilter //gd:RenderingServer.CanvasItemTextureFilter
const ( /*Uses the default filter mode for this [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 [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]). 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.*/ CanvasItemTextureFilterNearestWithMipmaps CanvasItemTextureFilter = 3 /*The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]). 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.*/ CanvasItemTextureFilterLinearWithMipmaps CanvasItemTextureFilter = 4 /*The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]) 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 [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] is usually more appropriate in this case.*/ CanvasItemTextureFilterNearestWithMipmapsAnisotropic CanvasItemTextureFilter = 5 /*The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]) 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 [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] is usually more appropriate in this case.*/ CanvasItemTextureFilterLinearWithMipmapsAnisotropic CanvasItemTextureFilter = 6 /*Max value for [enum CanvasItemTextureFilter] enum.*/ CanvasItemTextureFilterMax CanvasItemTextureFilter = 7 )
type CanvasItemTextureRepeat ¶
type CanvasItemTextureRepeat = gdclass.RenderingServerCanvasItemTextureRepeat //gd:RenderingServer.CanvasItemTextureRepeat
const ( /*Uses the default repeat mode for this [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 [enum CanvasItemTextureRepeat] enum.*/ CanvasItemTextureRepeatMax CanvasItemTextureRepeat = 4 )
type CanvasLightBlendMode ¶
type CanvasLightBlendMode = gdclass.RenderingServerCanvasLightBlendMode //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 = gdclass.RenderingServerCanvasLightMode //gd:RenderingServer.CanvasLightMode
const ( /*2D point light (see [PointLight2D]).*/ CanvasLightModePoint CanvasLightMode = 0 /*2D directional (sun/moon) light (see [DirectionalLight2D]).*/ CanvasLightModeDirectional CanvasLightMode = 1 )
type CanvasLightShadowFilter ¶
type CanvasLightShadowFilter = gdclass.RenderingServerCanvasLightShadowFilter //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 [enum CanvasLightShadowFilter] enum.*/ CanvasLightFilterMax CanvasLightShadowFilter = 3 )
type CanvasOccluderPolygonCullMode ¶
type CanvasOccluderPolygonCullMode = gdclass.RenderingServerCanvasOccluderPolygonCullMode //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 = gdclass.RenderingServerCanvasTextureChannel //gd:RenderingServer.CanvasTextureChannel
const ( /*Diffuse canvas texture ([member CanvasTexture.diffuse_texture]).*/ CanvasTextureChannelDiffuse CanvasTextureChannel = 0 /*Normal map canvas texture ([member CanvasTexture.normal_texture]).*/ CanvasTextureChannelNormal CanvasTextureChannel = 1 /*Specular map canvas texture ([member CanvasTexture.specular_texture]).*/ CanvasTextureChannelSpecular CanvasTextureChannel = 2 )
type CompositorEffectCallbackType ¶
type CompositorEffectCallbackType = gdclass.RenderingServerCompositorEffectCallbackType //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 build in post effects and output to our render target.*/ CompositorEffectCallbackTypePostTransparent CompositorEffectCallbackType = 4 CompositorEffectCallbackTypeAny CompositorEffectCallbackType = -1 )
type CompositorEffectFlags ¶
type CompositorEffectFlags = gdclass.RenderingServerCompositorEffectFlags //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 = gdclass.RenderingServerCubeMapLayer //gd:RenderingServer.CubeMapLayer
const ( /*Left face of a [Cubemap].*/ CubemapLayerLeft CubeMapLayer = 0 /*Right face of a [Cubemap].*/ CubemapLayerRight CubeMapLayer = 1 /*Bottom face of a [Cubemap].*/ CubemapLayerBottom CubeMapLayer = 2 /*Top face of a [Cubemap].*/ CubemapLayerTop CubeMapLayer = 3 /*Front face of a [Cubemap].*/ CubemapLayerFront CubeMapLayer = 4 /*Back face of a [Cubemap].*/ CubemapLayerBack CubeMapLayer = 5 )
type DOFBlurQuality ¶
type DOFBlurQuality = gdclass.RenderingServerDOFBlurQuality //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 = gdclass.RenderingServerDOFBokehShape //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 = gdclass.RenderingServerDecalFilter //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 [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].*/ 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 [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].*/ DecalFilterLinearMipmapsAnisotropic DecalFilter = 5 )
type DecalTexture ¶
type DecalTexture = gdclass.RenderingServerDecalTexture //gd:RenderingServer.DecalTexture
const ( /*Albedo texture slot in a decal ([member Decal.texture_albedo]).*/ DecalTextureAlbedo DecalTexture = 0 /*Normal map texture slot in a decal ([member Decal.texture_normal]).*/ DecalTextureNormal DecalTexture = 1 /*Occlusion/Roughness/Metallic texture slot in a decal ([member Decal.texture_orm]).*/ DecalTextureOrm DecalTexture = 2 /*Emission texture slot in a decal ([member Decal.texture_emission]).*/ DecalTextureEmission DecalTexture = 3 /*Represents the size of the [enum DecalTexture] enum.*/ DecalTextureMax DecalTexture = 4 )
type EnvironmentAmbientSource ¶
type EnvironmentAmbientSource = gdclass.RenderingServerEnvironmentAmbientSource //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] for ambient light.*/ EnvAmbientSourceColor EnvironmentAmbientSource = 2 /*Gather ambient light from the [Sky] regardless of what the background is.*/ EnvAmbientSourceSky EnvironmentAmbientSource = 3 )
type EnvironmentBG ¶
type EnvironmentBG = gdclass.RenderingServerEnvironmentBG //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 [enum EnvironmentBG] enum.*/ EnvBgMax EnvironmentBG = 6 )
type EnvironmentFogMode ¶
type EnvironmentFogMode = gdclass.RenderingServerEnvironmentFogMode //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 = gdclass.RenderingServerEnvironmentGlowBlendMode //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 = gdclass.RenderingServerEnvironmentReflectionSource //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.*/ EnvReflectionSourceSky EnvironmentReflectionSource = 2 )
type EnvironmentSDFGIFramesToConverge ¶
type EnvironmentSDFGIFramesToConverge = gdclass.RenderingServerEnvironmentSDFGIFramesToConverge //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 [enum EnvironmentSDFGIFramesToConverge] enum.*/ EnvSdfgiConvergeMax EnvironmentSDFGIFramesToConverge = 6 )
type EnvironmentSDFGIFramesToUpdateLight ¶
type EnvironmentSDFGIFramesToUpdateLight = gdclass.RenderingServerEnvironmentSDFGIFramesToUpdateLight //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 [enum EnvironmentSDFGIFramesToUpdateLight] enum.*/ EnvSdfgiUpdateLightMax EnvironmentSDFGIFramesToUpdateLight = 5 )
type EnvironmentSDFGIRayCount ¶
type EnvironmentSDFGIRayCount = gdclass.RenderingServerEnvironmentSDFGIRayCount //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 [enum EnvironmentSDFGIRayCount] enum.*/ EnvSdfgiRayCountMax EnvironmentSDFGIRayCount = 7 )
type EnvironmentSDFGIYScale ¶
type EnvironmentSDFGIYScale = gdclass.RenderingServerEnvironmentSDFGIYScale //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 = gdclass.RenderingServerEnvironmentSSAOQuality //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 = gdclass.RenderingServerEnvironmentSSILQuality //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 = gdclass.RenderingServerEnvironmentSSRRoughnessQuality //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 = gdclass.RenderingServerEnvironmentToneMapper //gd:RenderingServer.EnvironmentToneMapper
const ( /*Output color as they came in. This can cause bright lighting to look blown out, with noticeable clipping in the output colors.*/ EnvToneMapperLinear EnvironmentToneMapper = 0 /*Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. This avoids clipping bright highlights, but the resulting image can look a bit dull.*/ EnvToneMapperReinhard EnvironmentToneMapper = 1 /*Use the filmic tonemapper. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than [constant ENV_TONE_MAPPER_REINHARD].*/ EnvToneMapperFilmic EnvironmentToneMapper = 2 /*Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC]. [b]Note:[/b] This tonemapping operator is called "ACES Fitted" in Godot 3.x.*/ EnvToneMapperAces EnvironmentToneMapper = 3 )
type Features ¶
type Features = gdclass.RenderingServerFeatures //gd:RenderingServer.Features
type FogVolumeShape ¶
type FogVolumeShape = gdclass.RenderingServerFogVolumeShape //gd:RenderingServer.FogVolumeShape
const ( /*[FogVolume] will be shaped like an ellipsoid (stretched sphere).*/ 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).*/ 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).*/ FogVolumeShapeCylinder FogVolumeShape = 2 /*[FogVolume] will be shaped like a box.*/ FogVolumeShapeBox FogVolumeShape = 3 /*[FogVolume] will have no shape, will cover the whole world and will not be culled.*/ FogVolumeShapeWorld FogVolumeShape = 4 /*Represents the size of the [enum FogVolumeShape] enum.*/ FogVolumeShapeMax FogVolumeShape = 5 )
type GlobalShaderParameterType ¶
type GlobalShaderParameterType = gdclass.RenderingServerGlobalShaderParameterType //gd:RenderingServer.GlobalShaderParameterType
const ( /*Boolean global shader parameter ([code]global uniform bool ...[/code]).*/ GlobalVarTypeBool GlobalShaderParameterType = 0 /*2-dimensional boolean vector global shader parameter ([code]global uniform bvec2 ...[/code]).*/ GlobalVarTypeBvec2 GlobalShaderParameterType = 1 /*3-dimensional boolean vector global shader parameter ([code]global uniform bvec3 ...[/code]).*/ GlobalVarTypeBvec3 GlobalShaderParameterType = 2 /*4-dimensional boolean vector global shader parameter ([code]global uniform bvec4 ...[/code]).*/ GlobalVarTypeBvec4 GlobalShaderParameterType = 3 /*Integer global shader parameter ([code]global uniform int ...[/code]).*/ GlobalVarTypeInt GlobalShaderParameterType = 4 /*2-dimensional integer vector global shader parameter ([code]global uniform ivec2 ...[/code]).*/ GlobalVarTypeIvec2 GlobalShaderParameterType = 5 /*3-dimensional integer vector global shader parameter ([code]global uniform ivec3 ...[/code]).*/ GlobalVarTypeIvec3 GlobalShaderParameterType = 6 /*4-dimensional integer vector global shader parameter ([code]global uniform ivec4 ...[/code]).*/ GlobalVarTypeIvec4 GlobalShaderParameterType = 7 /*2-dimensional integer rectangle global shader parameter ([code]global uniform ivec4 ...[/code]). Equivalent to [constant GLOBAL_VAR_TYPE_IVEC4] in shader code, but exposed as a [Rect2i] in the editor UI.*/ GlobalVarTypeRect2i GlobalShaderParameterType = 8 /*Unsigned integer global shader parameter ([code]global uniform uint ...[/code]).*/ GlobalVarTypeUint GlobalShaderParameterType = 9 /*2-dimensional unsigned integer vector global shader parameter ([code]global uniform uvec2 ...[/code]).*/ GlobalVarTypeUvec2 GlobalShaderParameterType = 10 /*3-dimensional unsigned integer vector global shader parameter ([code]global uniform uvec3 ...[/code]).*/ GlobalVarTypeUvec3 GlobalShaderParameterType = 11 /*4-dimensional unsigned integer vector global shader parameter ([code]global uniform uvec4 ...[/code]).*/ GlobalVarTypeUvec4 GlobalShaderParameterType = 12 /*Single-precision floating-point global shader parameter ([code]global uniform float ...[/code]).*/ GlobalVarTypeFloat GlobalShaderParameterType = 13 /*2-dimensional floating-point vector global shader parameter ([code]global uniform vec2 ...[/code]).*/ GlobalVarTypeVec2 GlobalShaderParameterType = 14 /*3-dimensional floating-point vector global shader parameter ([code]global uniform vec3 ...[/code]).*/ GlobalVarTypeVec3 GlobalShaderParameterType = 15 /*4-dimensional floating-point vector global shader parameter ([code]global uniform vec4 ...[/code]).*/ GlobalVarTypeVec4 GlobalShaderParameterType = 16 /*Color global shader parameter ([code]global uniform vec4 ...[/code]). Equivalent to [constant GLOBAL_VAR_TYPE_VEC4] in shader code, but exposed as a [Color] in the editor UI.*/ GlobalVarTypeColor GlobalShaderParameterType = 17 /*2-dimensional floating-point rectangle global shader parameter ([code]global uniform vec4 ...[/code]). Equivalent to [constant GLOBAL_VAR_TYPE_VEC4] in shader code, but exposed as a [Rect2] in the editor UI.*/ GlobalVarTypeRect2 GlobalShaderParameterType = 18 /*2×2 matrix global shader parameter ([code]global uniform mat2 ...[/code]). Exposed as a [PackedInt32Array] in the editor UI.*/ GlobalVarTypeMat2 GlobalShaderParameterType = 19 /*3×3 matrix global shader parameter ([code]global uniform mat3 ...[/code]). Exposed as a [Basis] in the editor UI.*/ GlobalVarTypeMat3 GlobalShaderParameterType = 20 /*4×4 matrix global shader parameter ([code]global uniform mat4 ...[/code]). Exposed as a [Projection] in the editor UI.*/ GlobalVarTypeMat4 GlobalShaderParameterType = 21 /*2-dimensional transform global shader parameter ([code]global uniform mat2x3 ...[/code]). Exposed as a [Transform2D] in the editor UI.*/ GlobalVarTypeTransform2d GlobalShaderParameterType = 22 /*3-dimensional transform global shader parameter ([code]global uniform mat3x4 ...[/code]). Exposed as a [Transform3D] in the editor UI.*/ GlobalVarTypeTransform GlobalShaderParameterType = 23 /*2D sampler global shader parameter ([code]global uniform sampler2D ...[/code]). Exposed as a [Texture2D] in the editor UI.*/ GlobalVarTypeSampler2d GlobalShaderParameterType = 24 /*2D sampler array global shader parameter ([code]global uniform sampler2DArray ...[/code]). Exposed as a [Texture2DArray] in the editor UI.*/ GlobalVarTypeSampler2darray GlobalShaderParameterType = 25 /*3D sampler global shader parameter ([code]global uniform sampler3D ...[/code]). Exposed as a [Texture3D] in the editor UI.*/ GlobalVarTypeSampler3d GlobalShaderParameterType = 26 /*Cubemap sampler global shader parameter ([code]global uniform samplerCube ...[/code]). Exposed as a [Cubemap] in the editor UI.*/ GlobalVarTypeSamplercube GlobalShaderParameterType = 27 /*Represents the size of the [enum GlobalShaderParameterType] enum.*/ GlobalVarTypeMax GlobalShaderParameterType = 28 )
type InstanceFlags ¶
type InstanceFlags = gdclass.RenderingServerInstanceFlags //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 [enum InstanceFlags] enum.*/ InstanceFlagMax InstanceFlags = 4 )
type InstanceType ¶
type InstanceType = gdclass.RenderingServerInstanceType //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 [enum 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 = gdclass.RenderingServerLightBakeMode //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 ([member Environment.sdfgi_enabled])). 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.*/ LightBakeStatic LightBakeMode = 1 /*Light is taken into account in dynamic baking ([VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) 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 [constant LIGHT_BAKE_STATIC]. This has a greater performance cost compared to [constant LIGHT_BAKE_STATIC]. When using SDFGI, the update speed of dynamic lights is affected by [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights].*/ LightBakeDynamic LightBakeMode = 2 )
type LightDirectionalShadowMode ¶
type LightDirectionalShadowMode = gdclass.RenderingServerLightDirectionalShadowMode //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 = gdclass.RenderingServerLightDirectionalSkyMode //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 = gdclass.RenderingServerLightOmniShadowMode //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 = gdclass.RenderingServerLightParam //gd:RenderingServer.LightParam
const ( /*The light's energy multiplier.*/ LightParamEnergy LightParam = 0 /*The light's indirect energy multiplier (final indirect energy is [constant LIGHT_PARAM_ENERGY] * [constant LIGHT_PARAM_INDIRECT_ENERGY]).*/ LightParamIndirectEnergy LightParam = 1 /*The light's volumetric fog energy multiplier (final volumetric fog energy is [constant LIGHT_PARAM_ENERGY] * [constant LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY]).*/ 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 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 [code]0[/code] turns off the pancaking effect.*/ LightParamShadowPancakeSize LightParam = 16 /*The light's shadow opacity. Values lower than [code]1.0[/code] 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 [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code].*/ LightParamIntensity LightParam = 20 /*Represents the size of the [enum LightParam] enum.*/ LightParamMax LightParam = 21 )
type LightProjectorFilter ¶
type LightProjectorFilter = gdclass.RenderingServerLightProjectorFilter //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 [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].*/ 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 [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].*/ LightProjectorFilterLinearMipmapsAnisotropic LightProjectorFilter = 5 )
type LightType ¶
type LightType = gdclass.RenderingServerLightType //gd:RenderingServer.LightType
type MultimeshTransformFormat ¶
type MultimeshTransformFormat = gdclass.RenderingServerMultimeshTransformFormat //gd:RenderingServer.MultimeshTransformFormat
const ( /*Use [Transform2D] to store MultiMesh transform.*/ MultimeshTransform2d MultimeshTransformFormat = 0 /*Use [Transform3D] to store MultiMesh transform.*/ MultimeshTransform3d MultimeshTransformFormat = 1 )
type NinePatchAxisMode ¶
type NinePatchAxisMode = gdclass.RenderingServerNinePatchAxisMode //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 = gdclass.RenderingServerParticlesCollisionHeightfieldResolution //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 [enum ParticlesCollisionHeightfieldResolution] enum.*/ ParticlesCollisionHeightfieldResolutionMax ParticlesCollisionHeightfieldResolution = 6 )
type ParticlesCollisionType ¶
type ParticlesCollisionType = gdclass.RenderingServerParticlesCollisionType //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 = gdclass.RenderingServerParticlesDrawOrder //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 ParticlesMode ¶
type ParticlesMode = gdclass.RenderingServerParticlesMode //gd:RenderingServer.ParticlesMode
const ( /*2D particles.*/ ParticlesMode2d ParticlesMode = 0 /*3D particles.*/ ParticlesMode3d ParticlesMode = 1 )
type ParticlesTransformAlign ¶
type ParticlesTransformAlign = gdclass.RenderingServerParticlesTransformAlign //gd:RenderingServer.ParticlesTransformAlign
const ( ParticlesTransformAlignDisabled ParticlesTransformAlign = 0 ParticlesTransformAlignZBillboard ParticlesTransformAlign = 1 ParticlesTransformAlignYToVelocity ParticlesTransformAlign = 2 ParticlesTransformAlignZBillboardYToVelocity ParticlesTransformAlign = 3 )
type PrimitiveType ¶
type PrimitiveType = gdclass.RenderingServerPrimitiveType //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 [enum PrimitiveType] enum.*/ PrimitiveMax PrimitiveType = 5 )
type ReflectionProbeAmbientMode ¶
type ReflectionProbeAmbientMode = gdclass.RenderingServerReflectionProbeAmbientMode //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 [method reflection_probe_set_ambient_color] and [method reflection_probe_set_ambient_energy].*/ ReflectionProbeAmbientColor ReflectionProbeAmbientMode = 2 )
type ReflectionProbeUpdateMode ¶
type ReflectionProbeUpdateMode = gdclass.RenderingServerReflectionProbeUpdateMode //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 = gdclass.RenderingServerRenderingInfo //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 rendering backends, this is always greater than the sum of [constant RENDERING_INFO_TEXTURE_MEM_USED] and [constant RENDERING_INFO_BUFFER_MEM_USED], since there is miscellaneous data not accounted for by those two metrics. When using the GL Compatibility backend, this is equal to the sum of [constant RENDERING_INFO_TEXTURE_MEM_USED] and [constant RENDERING_INFO_BUFFER_MEM_USED].*/ RenderingInfoVideoMemUsed RenderingInfo = 5 )
type ShaderMode ¶
type ShaderMode = gdclass.RenderingServerShaderMode //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 [enum ShaderMode] enum.*/ ShaderMax ShaderMode = 5 )
type ShadowCastingSetting ¶
type ShadowCastingSetting = gdclass.RenderingServerShadowCastingSetting //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 = gdclass.RenderingServerShadowQuality //gd:RenderingServer.ShadowQuality
const ( /*Lowest shadow filtering quality (fastest). Soft shadows are not available with this quality setting, which means the [member Light3D.shadow_blur] property is ignored if [member Light3D.light_size] and [member Light3D.light_angular_distance] is [code]0.0[/code]. [b]Note:[/b] The variable shadow blur performed by [member Light3D.light_size] and [member Light3D.light_angular_distance] is still effective when using hard shadow filtering. In this case, [member Light3D.shadow_blur] [i]is[/i] taken into account. However, the results will not be blurred, instead the blur amount is treated as a maximum radius for the penumbra.*/ ShadowQualityHard ShadowQuality = 0 /*Very low shadow filtering quality (faster). When using this quality setting, [member Light3D.shadow_blur] is automatically multiplied by 0.75× to avoid introducing too much noise. This division only applies to lights whose [member Light3D.light_size] or [member Light3D.light_angular_distance] is [code]0.0[/code]).*/ 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, [member Light3D.shadow_blur] 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 [member Light3D.light_size] or [member Light3D.light_angular_distance] is [code]0.0[/code]).*/ ShadowQualitySoftHigh ShadowQuality = 4 /*Highest low shadow filtering quality (slowest). When using this quality setting, [member Light3D.shadow_blur] 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 [member Light3D.light_size] or [member Light3D.light_angular_distance] is [code]0.0[/code]).*/ ShadowQualitySoftUltra ShadowQuality = 5 /*Represents the size of the [enum ShadowQuality] enum.*/ ShadowQualityMax ShadowQuality = 6 )
type SkyMode ¶
type SkyMode = gdclass.RenderingServerSkyMode //gd:RenderingServer.SkyMode
const ( /*Automatically selects the appropriate process mode based on your sky shader. If your shader uses [code]TIME[/code] or [code]POSITION[/code], this will use [constant SKY_MODE_REALTIME]. If your shader uses any of the [code]LIGHT_*[/code] variables or any custom uniforms, this uses [constant SKY_MODE_INCREMENTAL]. Otherwise, this defaults to [constant SKY_MODE_QUALITY].*/ SkyModeAutomatic SkyMode = 0 /*Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant SKY_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/reflections/sky_reflections/ggx_samples].*/ SkyModeQuality SkyMode = 1 /*Uses the same high quality importance sampling to process the radiance map as [constant SKY_MODE_QUALITY], but updates over several frames. The number of frames is determined by [member ProjectSettings.rendering/reflections/sky_reflections/roughness_layers]. Use this when you need highest quality radiance maps, but have a sky that updates slowly.*/ 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 [member ProjectSettings.rendering/reflections/sky_reflections/fast_filter_high_quality]. [b]Note:[/b] The fast filtering algorithm is limited to 256×256 cubemaps, so [method sky_set_radiance_size] must be set to [code]256[/code]. Otherwise, a warning is printed and the overridden radiance size is ignored.*/ SkyModeRealtime SkyMode = 3 )
type SubSurfaceScatteringQuality ¶
type SubSurfaceScatteringQuality = gdclass.RenderingServerSubSurfaceScatteringQuality //gd:RenderingServer.SubSurfaceScatteringQuality
const ( /*Disables subsurface scattering entirely, even on materials that have [member BaseMaterial3D.subsurf_scatter_enabled] set to [code]true[/code]. This has the lowest GPU requirements.*/ 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 TextureLayeredType ¶
type TextureLayeredType = gdclass.RenderingServerTextureLayeredType //gd:RenderingServer.TextureLayeredType
const ( /*Array of 2-dimensional textures (see [Texture2DArray]).*/ TextureLayered2dArray TextureLayeredType = 0 /*Cubemap texture (see [Cubemap]).*/ TextureLayeredCubemap TextureLayeredType = 1 /*Array of cubemap textures (see [CubemapArray]).*/ TextureLayeredCubemapArray TextureLayeredType = 2 )
type ViewportClearMode ¶
type ViewportClearMode = gdclass.RenderingServerViewportClearMode //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 [constant VIEWPORT_CLEAR_NEVER].*/ ViewportClearOnlyNextFrame ViewportClearMode = 2 )
type ViewportDebugDraw ¶
type ViewportDebugDraw = gdclass.RenderingServerViewportDebugDraw //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.*/ 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. [b]Note:[/b] When using this debug draw mode, custom shaders will be ignored. This means vertex displacement won't be visible anymore.*/ ViewportDebugDrawOverdraw ViewportDebugDraw = 3 /*Debug draw draws objects in wireframe.*/ 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.*/ ViewportDebugDrawVoxelGiAlbedo ViewportDebugDraw = 6 /*Objects are displayed with only the lighting value from [VoxelGI]s.*/ ViewportDebugDrawVoxelGiLighting ViewportDebugDraw = 7 /*Objects are displayed with only the emission color from [VoxelGI]s.*/ ViewportDebugDrawVoxelGiEmission ViewportDebugDraw = 8 /*Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [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 [constant VIEWPORT_DEBUG_DRAW_PSSM_SPLITS]. 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.*/ 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.*/ 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 [member Environment.ssao_enabled] set in your [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 [member Environment.ssil_enabled] set in your [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 they will be colored red, green, blue, yellow.*/ ViewportDebugDrawPssmSplits ViewportDebugDraw = 14 /*Draws the decal atlas that stores decal textures from [Decal]s.*/ ViewportDebugDrawDecalAtlas ViewportDebugDraw = 15 /*Draws SDFGI cascade data. This is the data structure that is used to bounce lighting against and create reflections.*/ 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.*/ ViewportDebugDrawSdfgiProbes ViewportDebugDraw = 17 /*Draws the global illumination buffer ([VoxelGI] or SDFGI).*/ 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.*/ 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.*/ 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.*/ 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.*/ 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.*/ ViewportDebugDrawOccluders ViewportDebugDraw = 24 /*Draws the motion vectors buffer. This is used by temporal antialiasing to correct for motion that occurs during gameplay.*/ 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.*/ ViewportDebugDrawInternalBuffer ViewportDebugDraw = 26 )
type ViewportEnvironmentMode ¶
type ViewportEnvironmentMode = gdclass.RenderingServerViewportEnvironmentMode //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 [constant VIEWPORT_ENVIRONMENT_INHERIT], then this has the same behavior as [constant VIEWPORT_ENVIRONMENT_ENABLED].*/ ViewportEnvironmentInherit ViewportEnvironmentMode = 2 /*Represents the size of the [enum ViewportEnvironmentMode] enum.*/ ViewportEnvironmentMax ViewportEnvironmentMode = 3 )
type ViewportMSAA ¶
type ViewportMSAA = gdclass.RenderingServerViewportMSAA //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 [enum ViewportMSAA] enum.*/ ViewportMsaaMax ViewportMSAA = 4 )
type ViewportOcclusionCullingBuildQuality ¶
type ViewportOcclusionCullingBuildQuality = gdclass.RenderingServerViewportOcclusionCullingBuildQuality //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 = gdclass.RenderingServerViewportRenderInfo //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 [enum ViewportRenderInfo] enum.*/ ViewportRenderInfoMax ViewportRenderInfo = 3 )
type ViewportRenderInfoType ¶
type ViewportRenderInfoType = gdclass.RenderingServerViewportRenderInfoType //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 [enum ViewportRenderInfoType] enum.*/ ViewportRenderInfoTypeMax ViewportRenderInfoType = 3 )
type ViewportSDFOversize ¶
type ViewportSDFOversize = gdclass.RenderingServerViewportSDFOversize //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.*/ 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 [enum ViewportSDFOversize] enum.*/ ViewportSdfOversizeMax ViewportSDFOversize = 4 )
type ViewportSDFScale ¶
type ViewportSDFScale = gdclass.RenderingServerViewportSDFScale //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 [enum ViewportSDFScale] enum.*/ ViewportSdfScaleMax ViewportSDFScale = 3 )
type ViewportScaling3DMode ¶
type ViewportScaling3DMode = gdclass.RenderingServerViewportScaling3DMode //gd:RenderingServer.ViewportScaling3DMode
const ( /*Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling.*/ 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 [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will be result in the viewport being upscaled using FSR. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] disables scaling.*/ 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 [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will be result in the viewport being upscaled using FSR2. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] will use FSR2 at native resolution as a TAA solution.*/ ViewportScaling3dModeFsr2 ViewportScaling3DMode = 2 /*Represents the size of the [enum ViewportScaling3DMode] enum.*/ ViewportScaling3dModeMax ViewportScaling3DMode = 3 )
type ViewportScreenSpaceAA ¶
type ViewportScreenSpaceAA = gdclass.RenderingServerViewportScreenSpaceAA //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 /*Represents the size of the [enum ViewportScreenSpaceAA] enum.*/ ViewportScreenSpaceAaMax ViewportScreenSpaceAA = 2 )
type ViewportUpdateMode ¶
type ViewportUpdateMode = gdclass.RenderingServerViewportUpdateMode //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 [constant VIEWPORT_UPDATE_DISABLED].*/ 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 )
type ViewportVRSMode ¶
type ViewportVRSMode = gdclass.RenderingServerViewportVRSMode //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.*/ ViewportVrsXr ViewportVRSMode = 2 /*Represents the size of the [enum ViewportVRSMode] enum.*/ ViewportVrsMax ViewportVRSMode = 3 )
type ViewportVRSUpdateMode ¶
type ViewportVRSUpdateMode = gdclass.RenderingServerViewportVRSUpdateMode //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 [enum ViewportVRSUpdateMode] enum.*/ ViewportVrsUpdateMax ViewportVRSUpdateMode = 3 )
type VisibilityRangeFadeMode ¶
type VisibilityRangeFadeMode = gdclass.RenderingServerVisibilityRangeFadeMode //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 = gdclass.RenderingServerVoxelGIQuality //gd:RenderingServer.VoxelGIQuality
const ( /*Low [VoxelGI] rendering quality using 4 cones.*/ VoxelGiQualityLow VoxelGIQuality = 0 /*High [VoxelGI] rendering quality using 6 cones.*/ VoxelGiQualityHigh VoxelGIQuality = 1 )