Environment

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

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

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

Documentation

Overview

Resource for environment nodes (like WorldEnvironment) that define multiple environment operations (such as background Sky or Color.RGBA, ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is:

- Depth of Field Blur

- Glow

- Tonemap (Auto Exposure)

- Adjustments

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

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

type AmbientSource

type AmbientSource int //gd:Environment.AmbientSource
const (
	// Gather ambient light from whichever source is specified as the background.
	AmbientSourceBg AmbientSource = 0
	// Disable ambient light. This provides a slight performance boost over [AmbientSourceSky].
	AmbientSourceDisabled AmbientSource = 1
	// Specify a specific [Color.RGBA] for ambient light. This provides a slight performance boost over [AmbientSourceSky].
	//
	// [Color.RGBA]: https://pkg.go.dev/graphics.gd/variant/Color#RGBA
	AmbientSourceColor AmbientSource = 2
	// Gather ambient light from the [Sky] regardless of what the background is.
	//
	// [Sky]: https://pkg.go.dev/graphics.gd/classdb/Sky
	AmbientSourceSky AmbientSource = 3
)

type Any

type Any interface {
	gd.IsClass
	AsEnvironment() Instance
}

type BGMode

type BGMode int //gd:Environment.BGMode
const (
	// Clears the background using the clear color defined in [ProjectSettings] "rendering/environment/defaults/default_clear_color".
	//
	// [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings
	BgClearColor BGMode = 0
	// Clears the background using a custom clear color.
	BgColor BGMode = 1
	// Displays a user-defined sky in the background.
	BgSky BGMode = 2
	// Displays a [CanvasLayer] in the background.
	//
	// [CanvasLayer]: https://pkg.go.dev/graphics.gd/classdb/CanvasLayer
	BgCanvas BGMode = 3
	// Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera.
	BgKeep BGMode = 4
	// Displays a camera feed in the background.
	BgCameraFeed BGMode = 5
	// Represents the size of the [BGMode] enum.
	BgMax BGMode = 6
)

type Extension

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

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

func (*Extension[T]) AsEnvironment

func (self *Extension[T]) AsEnvironment() Instance

func (*Extension[T]) AsObject

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

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.Instance

type FogMode

type FogMode int //gd:Environment.FogMode
const (
	// Use a physically-based fog model defined primarily by fog density.
	FogModeExponential FogMode = 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.
	FogModeDepth FogMode = 1
)

type GlowBlendMode

type GlowBlendMode int //gd:Environment.GlowBlendMode
const (
	// Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources.
	GlowBlendModeAdditive GlowBlendMode = 0
	// Screen glow blending mode. Increases brightness, used frequently with bloom.
	GlowBlendModeScreen GlowBlendMode = 1
	// Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom).
	GlowBlendModeSoftlight GlowBlendMode = 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.
	GlowBlendModeReplace GlowBlendMode = 3
	// Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
	GlowBlendModeMix GlowBlendMode = 4
)

type ID

type ID Object.ID

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

func (ID) Instance

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

type Instance

type Instance [1]gdclass.Environment

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AdjustmentBrightness

func (self Instance) AdjustmentBrightness() Float.X

The global brightness value of the rendered scene. Effective only if AdjustmentEnabled is true.

func (Instance) AdjustmentColorCorrection

func (self Instance) AdjustmentColorCorrection() Texture.Instance

The Texture2D or Texture3D lookup table (LUT) to use for the built-in post-process color grading. Can use a GradientTexture1D for a 1-dimensional LUT, or a Texture3D for a more complex LUT. Effective only if AdjustmentEnabled is true.

func (Instance) AdjustmentContrast

func (self Instance) AdjustmentContrast() Float.X

The global contrast value of the rendered scene (default value is 1). Effective only if AdjustmentEnabled is true.

func (Instance) AdjustmentEnabled

func (self Instance) AdjustmentEnabled() bool

If true, enables the adjustment_* properties provided by this resource. If false, modifications to the adjustment_* properties will have no effect on the rendered scene.

func (Instance) AdjustmentSaturation

func (self Instance) AdjustmentSaturation() Float.X

The global color saturation value of the rendered scene (default value is 1). Effective only if AdjustmentEnabled is true.

func (Instance) AmbientLightColor

func (self Instance) AmbientLightColor() Color.RGBA

The ambient light's Color.RGBA. Only effective if AmbientLightSkyContribution is lower than 1.0 (exclusive).

func (Instance) AmbientLightEnergy

func (self Instance) AmbientLightEnergy() Float.X

The ambient light's energy. The higher the value, the stronger the light. Only effective if AmbientLightSkyContribution is lower than 1.0 (exclusive).

func (Instance) AmbientLightSkyContribution

func (self Instance) AmbientLightSkyContribution() Float.X

Defines the amount of light that the sky brings on the scene. A value of 0.0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1.0 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.

Note: AmbientLightSkyContribution is internally clamped between 0.0 and 1.0 (inclusive).

func (Instance) AmbientLightSource

func (self Instance) AmbientLightSource() AmbientSource

The ambient light source to use for rendering materials and global illumination.

func (Instance) AsEnvironment

func (self Instance) AsEnvironment() Instance

func (Instance) AsObject

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

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) BackgroundCameraFeedId

func (self Instance) BackgroundCameraFeedId() int

The ID of the camera feed to show in the background.

func (Instance) BackgroundCanvasMaxLayer

func (self Instance) BackgroundCanvasMaxLayer() int

The maximum layer ID to display. Only effective when using the BgCanvas background mode.

func (Instance) BackgroundColor

func (self Instance) BackgroundColor() Color.RGBA

The Color.RGBA displayed for clear areas of the scene. Only effective when using the BgColor background mode.

func (Instance) BackgroundEnergyMultiplier

func (self Instance) BackgroundEnergyMultiplier() Float.X

Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer.

func (Instance) BackgroundIntensity

func (self Instance) BackgroundIntensity() Float.X

Luminance of background measured in nits (candela per square meter). Only used when ProjectSettings "rendering/lights_and_shadows/use_physical_light_units" is enabled. The default value is roughly equivalent to the sky at midday.

func (Instance) BackgroundMode

func (self Instance) BackgroundMode() BGMode

The background mode.

func (Instance) FogAerialPerspective

func (self Instance) FogAerialPerspective() Float.X

If set above 0.0 (exclusive), blends between the fog's color and the color of the background Sky, as read from the radiance cubemap. This has a small performance cost when set above 0.0. Must have BackgroundMode set to BgSky.

This is useful to simulate aerial perspective in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to 1.0, the fog color comes completely from the Sky. If set to 0.0, aerial perspective is disabled.

Notice that this does not sample the Sky directly, but rather the radiance cubemap. The cubemap is sampled at a mipmap level depending on the depth of the rendered pixel; the farther away, the higher the resolution of the sampled mipmap. This results in the actual color being a blurred version of the sky, with more blur closer to the camera. The highest mipmap resolution is used at a depth of Camera3D.Far.

func (Instance) FogDensity

func (self Instance) FogDensity() Float.X

The fog density to be used. This is demonstrated in different ways depending on the FogMode mode chosen:

Exponential Fog Mode: Higher values result in denser fog. The fog rendering is exponential like in real life.

Depth Fog mode: The maximum intensity of the deep fog, effect will appear in the distance (relative to the camera). At 1.0 the fog will fully obscure the scene, at 0.0 the fog will not be visible.

func (Instance) FogDepthBegin

func (self Instance) FogDepthBegin() Float.X

The fog's depth starting distance from the camera. Only available when FogMode is set to FogModeDepth.

func (Instance) FogDepthCurve

func (self Instance) FogDepthCurve() Float.X

The fog depth's intensity curve. A number of presets are available in the Inspector by right-clicking the curve. Only available when FogMode is set to FogModeDepth.

func (Instance) FogDepthEnd

func (self Instance) FogDepthEnd() Float.X

The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's Camera3D.Far value. Only available when FogMode is set to FogModeDepth.

func (Instance) FogEnabled

func (self Instance) FogEnabled() bool

If true, fog effects are enabled.

func (Instance) FogHeight

func (self Instance) FogHeight() Float.X

The height at which the height fog effect begins.

func (Instance) FogHeightDensity

func (self Instance) FogHeightDensity() Float.X

The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value.

func (Instance) FogLightColor

func (self Instance) FogLightColor() Color.RGBA

The fog's color.

func (Instance) FogLightEnergy

func (self Instance) FogLightEnergy() Float.X

The fog's brightness. Higher values result in brighter fog.

func (Instance) FogMode

func (self Instance) FogMode() FogMode

The fog mode.

func (Instance) FogSkyAffect

func (self Instance) FogSkyAffect() Float.X

The factor to use when affecting the sky with non-volumetric fog. 1.0 means that fog can fully obscure the sky. Lower values reduce the impact of fog on sky rendering, with 0.0 not affecting sky rendering at all.

Note: FogSkyAffect has no visual effect if FogAerialPerspective is 1.0.

func (Instance) FogSunScatter

func (self Instance) FogSunScatter() Float.X

If set above 0.0, renders the scene's directional light(s) in the fog color depending on the view angle. This can be used to give the impression that the sun is "piercing" through the fog.

func (Instance) GetGlowLevel

func (self Instance) GetGlowLevel(idx int) Float.X

Returns the intensity of the glow level 'idx'.

func (Instance) GlowBlendMode

func (self Instance) GlowBlendMode() GlowBlendMode

The glow blending mode.

Note: GlowBlendMode has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

func (Instance) GlowBloom

func (self Instance) GlowBloom() Float.X

The bloom's intensity. If set to a value higher than 0, this will make glow visible in areas darker than the GlowHdrThreshold.

func (Instance) GlowEnabled

func (self Instance) GlowEnabled() bool

If true, the glow effect is enabled. This simulates real world eye/camera behavior where bright pixels bleed onto surrounding pixels.

Note: When using the Mobile rendering method, glow looks different due to the lower dynamic range available in the Mobile rendering method.

Note: When using the Compatibility rendering method, glow uses a different implementation with some properties being unavailable and hidden from the inspector: glow_levels/*, GlowNormalized, GlowStrength, GlowBlendMode, GlowMix, GlowMap, and GlowMapStrength. This implementation is optimized to run on low-end devices and is less flexible as a result.

func (Instance) GlowHdrLuminanceCap

func (self Instance) GlowHdrLuminanceCap() Float.X

The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect.

func (Instance) GlowHdrScale

func (self Instance) GlowHdrScale() Float.X

The bleed scale of the HDR glow.

func (Instance) GlowHdrThreshold

func (self Instance) GlowHdrThreshold() Float.X

The lower threshold of the HDR glow. When using the Mobile rendering method (which only supports a lower dynamic range up to 2.0), this may need to be below 1.0 for glow to be visible. A value of 0.9 works well in this case. This value also needs to be decreased below 1.0 when using glow in 2D, as 2D rendering is performed in SDR.

func (Instance) GlowIntensity

func (self Instance) GlowIntensity() Float.X

The overall brightness multiplier of the glow effect. When using the Mobile rendering method (which only supports a lower dynamic range up to 2.0), this should be increased to 1.5 to compensate.

func (Instance) GlowMap

func (self Instance) GlowMap() Texture.Instance

The texture that should be used as a glow map to multiply the resulting glow color according to GlowMapStrength. This can be used to create a "lens dirt" effect. The texture's RGB color channels are used for modulation, but the alpha channel is ignored.

Note: The texture will be stretched to fit the screen. Therefore, it's recommended to use a texture with an aspect ratio that matches your project's base aspect ratio (typically 16:9).

Note: GlowMap has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

func (Instance) GlowMapStrength

func (self Instance) GlowMapStrength() Float.X

How strong of an influence the GlowMap should have on the overall glow effect. A strength of 0.0 means the glow map has no influence, while a strength of 1.0 means the glow map has full influence.

Note: If the glow map has black areas, a value of 1.0 can also turn off the glow effect entirely in specific areas of the screen.

Note: GlowMapStrength has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

func (Instance) GlowMix

func (self Instance) GlowMix() Float.X

When using the GlowBlendModeMix GlowBlendMode, this controls how much the source image is blended with the glow layer. A value of 0.0 makes the glow rendering invisible, while a value of 1.0 is equivalent to GlowBlendModeReplace.

Note: GlowMix has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

func (Instance) GlowNormalized

func (self Instance) GlowNormalized() bool

If true, glow levels will be normalized so that summed together their intensities equal 1.0.

Note: GlowNormalized has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

func (Instance) GlowStrength

func (self Instance) GlowStrength() Float.X

The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the Mobile rendering method, this should be increased to compensate for the lower dynamic range.

Note: GlowStrength has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) ReflectedLightSource

func (self Instance) ReflectedLightSource() ReflectionSource

The reflected (specular) light source.

func (Instance) SdfgiBounceFeedback

func (self Instance) SdfgiBounceFeedback() Float.X

The energy multiplier applied to light every time it bounces from a surface when using SDFGI. Values greater than 0.0 will simulate multiple bounces, resulting in a more realistic appearance. Increasing SdfgiBounceFeedback generally has no performance impact. See also SdfgiEnergy.

Note: Values greater than 0.5 can cause infinite feedback loops and should be avoided in scenes with bright materials.

Note: If SdfgiBounceFeedback is 0.0, indirect lighting will not be represented in reflections as light will only bounce one time.

func (Instance) SdfgiCascade0Distance

func (self Instance) SdfgiCascade0Distance() Float.X

Note: This property is linked to SdfgiMinCellSize and SdfgiMaxDistance. Changing its value will automatically change those properties as well.

func (Instance) SdfgiCascades

func (self Instance) SdfgiCascades() int

The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, SdfgiCascades can often be decreased between 1 and 4 to improve performance.

func (Instance) SdfgiEnabled

func (self Instance) SdfgiEnabled() bool

If true, enables signed distance field global illumination for meshes that have their GeometryInstance3D.GiMode set to [Geometryinstance3d.GiModeStatic]. SDFGI is a real-time global illumination technique that works well with procedurally generated and user-built levels, including in situations where geometry is created during gameplay. The signed distance field is automatically generated around the camera as it moves. Dynamic lights are supported, but dynamic occluders and emissive surfaces are not.

Note: SDFGI is only supported in the Forward+ rendering method, not Mobile or Compatibility.

Performance: SDFGI is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider LightmapGI instead). To improve SDFGI performance, enable ProjectSettings "rendering/global_illumination/gi/use_half_resolution" in the Project Settings.

Note: Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.

func (Instance) SdfgiEnergy

func (self Instance) SdfgiEnergy() Float.X

The energy multiplier to use for SDFGI. Higher values will result in brighter indirect lighting and reflections. See also SdfgiBounceFeedback.

func (Instance) SdfgiMaxDistance

func (self Instance) SdfgiMaxDistance() Float.X

The maximum distance at which SDFGI is visible. Beyond this distance, environment lighting or other sources of GI such as ReflectionProbe will be used as a fallback.

Note: This property is linked to SdfgiMinCellSize and SdfgiCascade0Distance. Changing its value will automatically change those properties as well.

func (Instance) SdfgiMinCellSize

func (self Instance) SdfgiMinCellSize() Float.X

The cell size to use for the closest SDFGI cascade (in 3D units). Lower values allow SDFGI to be more precise up close, at the cost of making SDFGI updates more demanding. This can cause stuttering when the camera moves fast. Higher values allow SDFGI to cover more ground, while also reducing the performance impact of SDFGI updates.

Note: This property is linked to SdfgiMaxDistance and SdfgiCascade0Distance. Changing its value will automatically change those properties as well.

func (Instance) SdfgiNormalBias

func (self Instance) SdfgiNormalBias() Float.X

The normal bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking.

func (Instance) SdfgiProbeBias

func (self Instance) SdfgiProbeBias() Float.X

The constant bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking.

func (Instance) SdfgiReadSkyLight

func (self Instance) SdfgiReadSkyLight() bool

If true, SDFGI takes the environment lighting into account. This should be set to false for interior scenes.

func (Instance) SdfgiUseOcclusion

func (self Instance) SdfgiUseOcclusion() bool

If true, SDFGI uses an occlusion detection approach to reduce light leaking. Occlusion may however introduce dark blotches in certain spots, which may be undesired in mostly outdoor scenes. SdfgiUseOcclusion has a performance impact and should only be enabled when needed.

func (Instance) SdfgiYScale

func (self Instance) SdfgiYScale() SDFGIYScale

The Y scale to use for SDFGI cells. Lower values will result in SDFGI cells being packed together more closely on the Y axis. This is used to balance between quality and covering a lot of vertical ground. SdfgiYScale should be set depending on how vertical your scene is (and how fast your camera may move on the Y axis).

func (Instance) SetAdjustmentBrightness

func (self Instance) SetAdjustmentBrightness(value Float.X)

SetAdjustmentBrightness sets the property returned by [GetAdjustmentBrightness].

func (Instance) SetAdjustmentColorCorrection

func (self Instance) SetAdjustmentColorCorrection(value Texture.Instance)

SetAdjustmentColorCorrection sets the property returned by [GetAdjustmentColorCorrection].

func (Instance) SetAdjustmentContrast

func (self Instance) SetAdjustmentContrast(value Float.X)

SetAdjustmentContrast sets the property returned by [GetAdjustmentContrast].

func (Instance) SetAdjustmentEnabled

func (self Instance) SetAdjustmentEnabled(value bool)

SetAdjustmentEnabled sets the property returned by [IsAdjustmentEnabled].

func (Instance) SetAdjustmentSaturation

func (self Instance) SetAdjustmentSaturation(value Float.X)

SetAdjustmentSaturation sets the property returned by [GetAdjustmentSaturation].

func (Instance) SetAmbientLightColor

func (self Instance) SetAmbientLightColor(value Color.RGBA)

SetAmbientLightColor sets the property returned by [GetAmbientLightColor].

func (Instance) SetAmbientLightEnergy

func (self Instance) SetAmbientLightEnergy(value Float.X)

SetAmbientLightEnergy sets the property returned by [GetAmbientLightEnergy].

func (Instance) SetAmbientLightSkyContribution

func (self Instance) SetAmbientLightSkyContribution(value Float.X)

SetAmbientLightSkyContribution sets the property returned by [GetAmbientLightSkyContribution].

func (Instance) SetAmbientLightSource

func (self Instance) SetAmbientLightSource(value AmbientSource)

SetAmbientLightSource sets the property returned by [GetAmbientSource].

func (Instance) SetBackgroundCameraFeedId

func (self Instance) SetBackgroundCameraFeedId(value int)

SetBackgroundCameraFeedId sets the property returned by [GetCameraFeedId].

func (Instance) SetBackgroundCanvasMaxLayer

func (self Instance) SetBackgroundCanvasMaxLayer(value int)

SetBackgroundCanvasMaxLayer sets the property returned by [GetCanvasMaxLayer].

func (Instance) SetBackgroundColor

func (self Instance) SetBackgroundColor(value Color.RGBA)

SetBackgroundColor sets the property returned by [GetBgColor].

func (Instance) SetBackgroundEnergyMultiplier

func (self Instance) SetBackgroundEnergyMultiplier(value Float.X)

SetBackgroundEnergyMultiplier sets the property returned by [GetBgEnergyMultiplier].

func (Instance) SetBackgroundIntensity

func (self Instance) SetBackgroundIntensity(value Float.X)

SetBackgroundIntensity sets the property returned by [GetBgIntensity].

func (Instance) SetBackgroundMode

func (self Instance) SetBackgroundMode(value BGMode)

SetBackgroundMode sets the property returned by [GetBackground].

func (Instance) SetFogAerialPerspective

func (self Instance) SetFogAerialPerspective(value Float.X)

SetFogAerialPerspective sets the property returned by [GetFogAerialPerspective].

func (Instance) SetFogDensity

func (self Instance) SetFogDensity(value Float.X)

SetFogDensity sets the property returned by [GetFogDensity].

func (Instance) SetFogDepthBegin

func (self Instance) SetFogDepthBegin(value Float.X)

SetFogDepthBegin sets the property returned by [GetFogDepthBegin].

func (Instance) SetFogDepthCurve

func (self Instance) SetFogDepthCurve(value Float.X)

SetFogDepthCurve sets the property returned by [GetFogDepthCurve].

func (Instance) SetFogDepthEnd

func (self Instance) SetFogDepthEnd(value Float.X)

SetFogDepthEnd sets the property returned by [GetFogDepthEnd].

func (Instance) SetFogEnabled

func (self Instance) SetFogEnabled(value bool)

SetFogEnabled sets the property returned by [IsFogEnabled].

func (Instance) SetFogHeight

func (self Instance) SetFogHeight(value Float.X)

SetFogHeight sets the property returned by [GetFogHeight].

func (Instance) SetFogHeightDensity

func (self Instance) SetFogHeightDensity(value Float.X)

SetFogHeightDensity sets the property returned by [GetFogHeightDensity].

func (Instance) SetFogLightColor

func (self Instance) SetFogLightColor(value Color.RGBA)

SetFogLightColor sets the property returned by [GetFogLightColor].

func (Instance) SetFogLightEnergy

func (self Instance) SetFogLightEnergy(value Float.X)

SetFogLightEnergy sets the property returned by [GetFogLightEnergy].

func (Instance) SetFogMode

func (self Instance) SetFogMode(value FogMode)

SetFogMode sets the property returned by [GetFogMode].

func (Instance) SetFogSkyAffect

func (self Instance) SetFogSkyAffect(value Float.X)

SetFogSkyAffect sets the property returned by [GetFogSkyAffect].

func (Instance) SetFogSunScatter

func (self Instance) SetFogSunScatter(value Float.X)

SetFogSunScatter sets the property returned by [GetFogSunScatter].

func (Instance) SetGlowBlendMode

func (self Instance) SetGlowBlendMode(value GlowBlendMode)

SetGlowBlendMode sets the property returned by [GetGlowBlendMode].

func (Instance) SetGlowBloom

func (self Instance) SetGlowBloom(value Float.X)

SetGlowBloom sets the property returned by [GetGlowBloom].

func (Instance) SetGlowEnabled

func (self Instance) SetGlowEnabled(value bool)

SetGlowEnabled sets the property returned by [IsGlowEnabled].

func (Instance) SetGlowHdrLuminanceCap

func (self Instance) SetGlowHdrLuminanceCap(value Float.X)

SetGlowHdrLuminanceCap sets the property returned by [GetGlowHdrLuminanceCap].

func (Instance) SetGlowHdrScale

func (self Instance) SetGlowHdrScale(value Float.X)

SetGlowHdrScale sets the property returned by [GetGlowHdrBleedScale].

func (Instance) SetGlowHdrThreshold

func (self Instance) SetGlowHdrThreshold(value Float.X)

SetGlowHdrThreshold sets the property returned by [GetGlowHdrBleedThreshold].

func (Instance) SetGlowIntensity

func (self Instance) SetGlowIntensity(value Float.X)

SetGlowIntensity sets the property returned by [GetGlowIntensity].

func (Instance) SetGlowLevel

func (self Instance) SetGlowLevel(idx int, intensity Float.X)

Sets the intensity of the glow level 'idx'. A value above 0.0 enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled.

func (Instance) SetGlowMap

func (self Instance) SetGlowMap(value Texture.Instance)

SetGlowMap sets the property returned by [GetGlowMap].

func (Instance) SetGlowMapStrength

func (self Instance) SetGlowMapStrength(value Float.X)

SetGlowMapStrength sets the property returned by [GetGlowMapStrength].

func (Instance) SetGlowMix

func (self Instance) SetGlowMix(value Float.X)

SetGlowMix sets the property returned by [GetGlowMix].

func (Instance) SetGlowNormalized

func (self Instance) SetGlowNormalized(value bool)

SetGlowNormalized sets the property returned by [IsGlowNormalized].

func (Instance) SetGlowStrength

func (self Instance) SetGlowStrength(value Float.X)

SetGlowStrength sets the property returned by [GetGlowStrength].

func (*Instance) SetObject

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

func (Instance) SetReflectedLightSource

func (self Instance) SetReflectedLightSource(value ReflectionSource)

SetReflectedLightSource sets the property returned by [GetReflectionSource].

func (Instance) SetSdfgiBounceFeedback

func (self Instance) SetSdfgiBounceFeedback(value Float.X)

SetSdfgiBounceFeedback sets the property returned by [GetSdfgiBounceFeedback].

func (Instance) SetSdfgiCascade0Distance

func (self Instance) SetSdfgiCascade0Distance(value Float.X)

SetSdfgiCascade0Distance sets the property returned by [GetSdfgiCascade0Distance].

func (Instance) SetSdfgiCascades

func (self Instance) SetSdfgiCascades(value int)

SetSdfgiCascades sets the property returned by [GetSdfgiCascades].

func (Instance) SetSdfgiEnabled

func (self Instance) SetSdfgiEnabled(value bool)

SetSdfgiEnabled sets the property returned by [IsSdfgiEnabled].

func (Instance) SetSdfgiEnergy

func (self Instance) SetSdfgiEnergy(value Float.X)

SetSdfgiEnergy sets the property returned by [GetSdfgiEnergy].

func (Instance) SetSdfgiMaxDistance

func (self Instance) SetSdfgiMaxDistance(value Float.X)

SetSdfgiMaxDistance sets the property returned by [GetSdfgiMaxDistance].

func (Instance) SetSdfgiMinCellSize

func (self Instance) SetSdfgiMinCellSize(value Float.X)

SetSdfgiMinCellSize sets the property returned by [GetSdfgiMinCellSize].

func (Instance) SetSdfgiNormalBias

func (self Instance) SetSdfgiNormalBias(value Float.X)

SetSdfgiNormalBias sets the property returned by [GetSdfgiNormalBias].

func (Instance) SetSdfgiProbeBias

func (self Instance) SetSdfgiProbeBias(value Float.X)

SetSdfgiProbeBias sets the property returned by [GetSdfgiProbeBias].

func (Instance) SetSdfgiReadSkyLight

func (self Instance) SetSdfgiReadSkyLight(value bool)

SetSdfgiReadSkyLight sets the property returned by [IsSdfgiReadingSkyLight].

func (Instance) SetSdfgiUseOcclusion

func (self Instance) SetSdfgiUseOcclusion(value bool)

SetSdfgiUseOcclusion sets the property returned by [IsSdfgiUsingOcclusion].

func (Instance) SetSdfgiYScale

func (self Instance) SetSdfgiYScale(value SDFGIYScale)

SetSdfgiYScale sets the property returned by [GetSdfgiYScale].

func (Instance) SetSky

func (self Instance) SetSky(value Sky.Instance)

SetSky sets the property returned by [GetSky].

func (Instance) SetSkyCustomFov

func (self Instance) SetSkyCustomFov(value Float.X)

SetSkyCustomFov sets the property returned by [GetSkyCustomFov].

func (Instance) SetSkyRotation

func (self Instance) SetSkyRotation(value Euler.Radians)

SetSkyRotation sets the property returned by [GetSkyRotation].

func (Instance) SetSsaoAoChannelAffect

func (self Instance) SetSsaoAoChannelAffect(value Float.X)

SetSsaoAoChannelAffect sets the property returned by [GetSsaoAoChannelAffect].

func (Instance) SetSsaoDetail

func (self Instance) SetSsaoDetail(value Float.X)

SetSsaoDetail sets the property returned by [GetSsaoDetail].

func (Instance) SetSsaoEnabled

func (self Instance) SetSsaoEnabled(value bool)

SetSsaoEnabled sets the property returned by [IsSsaoEnabled].

func (Instance) SetSsaoHorizon

func (self Instance) SetSsaoHorizon(value Float.X)

SetSsaoHorizon sets the property returned by [GetSsaoHorizon].

func (Instance) SetSsaoIntensity

func (self Instance) SetSsaoIntensity(value Float.X)

SetSsaoIntensity sets the property returned by [GetSsaoIntensity].

func (Instance) SetSsaoLightAffect

func (self Instance) SetSsaoLightAffect(value Float.X)

SetSsaoLightAffect sets the property returned by [GetSsaoDirectLightAffect].

func (Instance) SetSsaoPower

func (self Instance) SetSsaoPower(value Float.X)

SetSsaoPower sets the property returned by [GetSsaoPower].

func (Instance) SetSsaoRadius

func (self Instance) SetSsaoRadius(value Float.X)

SetSsaoRadius sets the property returned by [GetSsaoRadius].

func (Instance) SetSsaoSharpness

func (self Instance) SetSsaoSharpness(value Float.X)

SetSsaoSharpness sets the property returned by [GetSsaoSharpness].

func (Instance) SetSsilEnabled

func (self Instance) SetSsilEnabled(value bool)

SetSsilEnabled sets the property returned by [IsSsilEnabled].

func (Instance) SetSsilIntensity

func (self Instance) SetSsilIntensity(value Float.X)

SetSsilIntensity sets the property returned by [GetSsilIntensity].

func (Instance) SetSsilNormalRejection

func (self Instance) SetSsilNormalRejection(value Float.X)

SetSsilNormalRejection sets the property returned by [GetSsilNormalRejection].

func (Instance) SetSsilRadius

func (self Instance) SetSsilRadius(value Float.X)

SetSsilRadius sets the property returned by [GetSsilRadius].

func (Instance) SetSsilSharpness

func (self Instance) SetSsilSharpness(value Float.X)

SetSsilSharpness sets the property returned by [GetSsilSharpness].

func (Instance) SetSsrDepthTolerance

func (self Instance) SetSsrDepthTolerance(value Float.X)

SetSsrDepthTolerance sets the property returned by [GetSsrDepthTolerance].

func (Instance) SetSsrEnabled

func (self Instance) SetSsrEnabled(value bool)

SetSsrEnabled sets the property returned by [IsSsrEnabled].

func (Instance) SetSsrFadeIn

func (self Instance) SetSsrFadeIn(value Float.X)

SetSsrFadeIn sets the property returned by [GetSsrFadeIn].

func (Instance) SetSsrFadeOut

func (self Instance) SetSsrFadeOut(value Float.X)

SetSsrFadeOut sets the property returned by [GetSsrFadeOut].

func (Instance) SetSsrMaxSteps

func (self Instance) SetSsrMaxSteps(value int)

SetSsrMaxSteps sets the property returned by [GetSsrMaxSteps].

func (Instance) SetTonemapExposure

func (self Instance) SetTonemapExposure(value Float.X)

SetTonemapExposure sets the property returned by [GetTonemapExposure].

func (Instance) SetTonemapMode

func (self Instance) SetTonemapMode(value ToneMapper)

SetTonemapMode sets the property returned by [GetTonemapper].

func (Instance) SetTonemapWhite

func (self Instance) SetTonemapWhite(value Float.X)

SetTonemapWhite sets the property returned by [GetTonemapWhite].

func (Instance) SetVolumetricFogAlbedo

func (self Instance) SetVolumetricFogAlbedo(value Color.RGBA)

SetVolumetricFogAlbedo sets the property returned by [GetVolumetricFogAlbedo].

func (Instance) SetVolumetricFogAmbientInject

func (self Instance) SetVolumetricFogAmbientInject(value Float.X)

SetVolumetricFogAmbientInject sets the property returned by [GetVolumetricFogAmbientInject].

func (Instance) SetVolumetricFogAnisotropy

func (self Instance) SetVolumetricFogAnisotropy(value Float.X)

SetVolumetricFogAnisotropy sets the property returned by [GetVolumetricFogAnisotropy].

func (Instance) SetVolumetricFogDensity

func (self Instance) SetVolumetricFogDensity(value Float.X)

SetVolumetricFogDensity sets the property returned by [GetVolumetricFogDensity].

func (Instance) SetVolumetricFogDetailSpread

func (self Instance) SetVolumetricFogDetailSpread(value Float.X)

SetVolumetricFogDetailSpread sets the property returned by [GetVolumetricFogDetailSpread].

func (Instance) SetVolumetricFogEmission

func (self Instance) SetVolumetricFogEmission(value Color.RGBA)

SetVolumetricFogEmission sets the property returned by [GetVolumetricFogEmission].

func (Instance) SetVolumetricFogEmissionEnergy

func (self Instance) SetVolumetricFogEmissionEnergy(value Float.X)

SetVolumetricFogEmissionEnergy sets the property returned by [GetVolumetricFogEmissionEnergy].

func (Instance) SetVolumetricFogEnabled

func (self Instance) SetVolumetricFogEnabled(value bool)

SetVolumetricFogEnabled sets the property returned by [IsVolumetricFogEnabled].

func (Instance) SetVolumetricFogGiInject

func (self Instance) SetVolumetricFogGiInject(value Float.X)

SetVolumetricFogGiInject sets the property returned by [GetVolumetricFogGiInject].

func (Instance) SetVolumetricFogLength

func (self Instance) SetVolumetricFogLength(value Float.X)

SetVolumetricFogLength sets the property returned by [GetVolumetricFogLength].

func (Instance) SetVolumetricFogSkyAffect

func (self Instance) SetVolumetricFogSkyAffect(value Float.X)

SetVolumetricFogSkyAffect sets the property returned by [GetVolumetricFogSkyAffect].

func (Instance) SetVolumetricFogTemporalReprojectionAmount

func (self Instance) SetVolumetricFogTemporalReprojectionAmount(value Float.X)

SetVolumetricFogTemporalReprojectionAmount sets the property returned by [GetVolumetricFogTemporalReprojectionAmount].

func (Instance) SetVolumetricFogTemporalReprojectionEnabled

func (self Instance) SetVolumetricFogTemporalReprojectionEnabled(value bool)

SetVolumetricFogTemporalReprojectionEnabled sets the property returned by [IsVolumetricFogTemporalReprojectionEnabled].

func (Instance) Sky

func (self Instance) Sky() Sky.Instance

The Sky resource used for this Environment.

func (Instance) SkyCustomFov

func (self Instance) SkyCustomFov() Float.X

If set to a value greater than 0.0, overrides the field of view to use for sky rendering. If set to 0.0, the same FOV as the current Camera3D is used for sky rendering.

func (Instance) SkyRotation

func (self Instance) SkyRotation() Euler.Radians

The rotation to use for sky rendering.

func (Instance) SsaoAoChannelAffect

func (self Instance) SsaoAoChannelAffect() Float.X

The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than 0 will make the SSAO effect visible in areas darkened by AO textures.

func (Instance) SsaoDetail

func (self Instance) SsaoDetail() Float.X

Sets the strength of the additional level of detail for the screen-space ambient occlusion effect. A high value makes the detail pass more prominent, but it may contribute to aliasing in your final image.

func (Instance) SsaoEnabled

func (self Instance) SsaoEnabled() bool

If true, the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. Godot uses a form of SSAO called Adaptive Screen Space Ambient Occlusion which is itself a form of Horizon Based Ambient Occlusion.

Note: SSAO is only supported in the Forward+ rendering method, not Mobile or Compatibility.

func (Instance) SsaoHorizon

func (self Instance) SsaoHorizon() Float.X

The threshold for considering whether a given point on a surface is occluded or not represented as an angle from the horizon mapped into the 0.0-1.0 range. A value of 1.0 results in no occlusion.

func (Instance) SsaoIntensity

func (self Instance) SsaoIntensity() Float.X

The primary screen-space ambient occlusion intensity. Acts as a multiplier for the screen-space ambient occlusion effect. A higher value results in darker occlusion.

func (Instance) SsaoLightAffect

func (self Instance) SsaoLightAffect() Float.X

The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than 0 will make the SSAO effect visible in direct light.

func (Instance) SsaoPower

func (self Instance) SsaoPower() Float.X

The distribution of occlusion. A higher value results in darker occlusion, similar to SsaoIntensity, but with a sharper falloff.

func (Instance) SsaoRadius

func (self Instance) SsaoRadius() Float.X

The distance at which objects can occlude each other when calculating screen-space ambient occlusion. Higher values will result in occlusion over a greater distance at the cost of performance and quality.

func (Instance) SsaoSharpness

func (self Instance) SsaoSharpness() Float.X

The amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.

func (Instance) SsilEnabled

func (self Instance) SsilEnabled() bool

If true, the screen-space indirect lighting effect is enabled. Screen space indirect lighting is a form of indirect lighting that allows diffuse light to bounce between nearby objects. Screen-space indirect lighting works very similarly to screen-space ambient occlusion, in that it only affects a limited range. It is intended to be used along with a form of proper global illumination like SDFGI or VoxelGI. Screen-space indirect lighting is not affected by individual light's Light3D.LightIndirectEnergy.

Note: SSIL is only supported in the Forward+ rendering method, not Mobile or Compatibility.

func (Instance) SsilIntensity

func (self Instance) SsilIntensity() Float.X

The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light.

func (Instance) SsilNormalRejection

func (self Instance) SsilNormalRejection() Float.X

Amount of normal rejection used when calculating screen-space indirect lighting. Normal rejection uses the normal of a given sample point to reject samples that are facing away from the current pixel. Normal rejection is necessary to avoid light leaking when only one side of an object is illuminated. However, normal rejection can be disabled if light leaking is desirable, such as when the scene mostly contains emissive objects that emit light from faces that cannot be seen from the camera.

func (Instance) SsilRadius

func (self Instance) SsilRadius() Float.X

The distance that bounced lighting can travel when using the screen space indirect lighting effect. A larger value will result in light bouncing further in a scene, but may result in under-sampling artifacts which look like long spikes surrounding light sources.

func (Instance) SsilSharpness

func (self Instance) SsilSharpness() Float.X

The amount that the screen-space indirect lighting effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.

func (Instance) SsrDepthTolerance

func (self Instance) SsrDepthTolerance() Float.X

The depth tolerance for screen-space reflections.

func (Instance) SsrEnabled

func (self Instance) SsrEnabled() bool

If true, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from VoxelGIs or ReflectionProbes, but are slower and can't reflect surfaces occluded by others.

Note: SSR is only supported in the Forward+ rendering method, not Mobile or Compatibility.

func (Instance) SsrFadeIn

func (self Instance) SsrFadeIn() Float.X

The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection. Only positive values are valid (negative values will be clamped to 0.0).

func (Instance) SsrFadeOut

func (self Instance) SsrFadeOut() Float.X

The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to 0.0).

func (Instance) SsrMaxSteps

func (self Instance) SsrMaxSteps() int

The maximum number of steps for screen-space reflections. Higher values are slower.

func (Instance) TonemapExposure

func (self Instance) TonemapExposure() Float.X

Adjusts the brightness of values before they are provided to the tonemapper. Higher TonemapExposure values result in a brighter image. See also TonemapWhite.

Note: Values provided to the tonemapper will also be multiplied by 2.0 and 1.8 for ToneMapperFilmic and ToneMapperAces respectively to produce a similar apparent brightness as ToneMapperLinear.

func (Instance) TonemapMode

func (self Instance) TonemapMode() ToneMapper

The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on an LDR display. (Godot doesn't support rendering on HDR displays yet.)

func (Instance) TonemapWhite

func (self Instance) TonemapWhite() Float.X

The white reference value for tonemapping, which indicates where bright white is located in the scale of values provided to the tonemapper. For photorealistic lighting, recommended values are between 6.0 and 8.0. Higher values result in less blown out highlights, but may make the scene appear lower contrast. See also TonemapExposure.

Note: TonemapWhite is ignored when using ToneMapperLinear or ToneMapperAgx.

func (Instance) Virtual

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

func (Instance) VolumetricFogAlbedo

func (self Instance) VolumetricFogAlbedo() Color.RGBA

The Color.RGBA of the volumetric fog when interacting with lights. Mist and fog have an albedo close to Color(1, 1, 1, 1) while smoke has a darker albedo.

func (Instance) VolumetricFogAmbientInject

func (self Instance) VolumetricFogAmbientInject() Float.X

Scales the strength of ambient light used in the volumetric fog. A value of 0.0 means that ambient light will not impact the volumetric fog. VolumetricFogAmbientInject has a small performance cost when set above 0.0.

Note: This has no visible effect if VolumetricFogDensity is 0.0 or if VolumetricFogAlbedo is a fully black color.

func (Instance) VolumetricFogAnisotropy

func (self Instance) VolumetricFogAnisotropy() Float.X

The direction of scattered light as it goes through the volumetric fog. A value close to 1.0 means almost all light is scattered forward. A value close to 0.0 means light is scattered equally in all directions. A value close to -1.0 means light is scattered mostly backward. Fog and mist scatter light slightly forward, while smoke scatters light equally in all directions.

func (Instance) VolumetricFogDensity

func (self Instance) VolumetricFogDensity() Float.X

The base exponential density of the volumetric fog. Set this to the lowest density you want to have globally. FogVolumes can be used to add to or subtract from this density in specific areas. Fog rendering is exponential as in real life.

A value of 0.0 disables global volumetric fog while allowing FogVolumes to display volumetric fog in specific areas.

To make volumetric fog work as a volumetric lighting solution, set VolumetricFogDensity to the lowest non-zero value (0.0001) then increase lights' Light3D.LightVolumetricFogEnergy to values between 10000 and 100000 to compensate for the very low density.

func (Instance) VolumetricFogDetailSpread

func (self Instance) VolumetricFogDetailSpread() Float.X

The distribution of size down the length of the froxel buffer. A higher value compresses the froxels closer to the camera and places more detail closer to the camera.

func (Instance) VolumetricFogEmission

func (self Instance) VolumetricFogEmission() Color.RGBA

The emitted light from the volumetric fog. Even with emission, volumetric fog will not cast light onto other surfaces. Emission is useful to establish an ambient color. As the volumetric fog effect uses single-scattering only, fog tends to need a little bit of emission to soften the harsh shadows.

func (Instance) VolumetricFogEmissionEnergy

func (self Instance) VolumetricFogEmissionEnergy() Float.X

The brightness of the emitted light from the volumetric fog.

func (Instance) VolumetricFogEnabled

func (self Instance) VolumetricFogEnabled() bool

Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel buffer to calculate accurate volumetric scattering in the short to medium range. Volumetric fog interacts with FogVolumes and lights to calculate localized and global fog. Volumetric fog uses a PBR single-scattering model based on extinction, scattering, and emission which it exposes to users as density, albedo, and emission.

Note: Volumetric fog is only supported in the Forward+ rendering method, not Mobile or Compatibility.

func (Instance) VolumetricFogGiInject

func (self Instance) VolumetricFogGiInject() Float.X

Scales the strength of Global Illumination used in the volumetric fog's albedo color. A value of 0.0 means that Global Illumination will not impact the volumetric fog. VolumetricFogGiInject has a small performance cost when set above 0.0.

Note: This has no visible effect if VolumetricFogDensity is 0.0 or if VolumetricFogAlbedo is a fully black color.

Note: Only VoxelGI and SDFGI (Environment.SdfgiEnabled) are taken into account when using VolumetricFogGiInject. Global illumination from LightmapGI, ReflectionProbe and SSIL (see SsilEnabled) will be ignored by volumetric fog.

func (Instance) VolumetricFogLength

func (self Instance) VolumetricFogLength() Float.X

The distance over which the volumetric fog is computed. Increase to compute fog over a greater range, decrease to add more detail when a long range is not needed. For best quality fog, keep this as low as possible. See also ProjectSettings "rendering/environment/volumetric_fog/volume_depth".

func (Instance) VolumetricFogSkyAffect

func (self Instance) VolumetricFogSkyAffect() Float.X

The factor to use when affecting the sky with volumetric fog. 1.0 means that volumetric fog can fully obscure the sky. Lower values reduce the impact of volumetric fog on sky rendering, with 0.0 not affecting sky rendering at all.

Note: VolumetricFogSkyAffect also affects FogVolumes, even if VolumetricFogDensity is 0.0. If you notice FogVolumes are disappearing when looking towards the sky, set VolumetricFogSkyAffect to 1.0.

func (Instance) VolumetricFogTemporalReprojectionAmount

func (self Instance) VolumetricFogTemporalReprojectionAmount() Float.X

The amount by which to blend the last frame with the current frame. A higher number results in smoother volumetric fog, but makes "ghosting" much worse. A lower value reduces ghosting but can result in the per-frame temporal jitter becoming visible.

func (Instance) VolumetricFogTemporalReprojectionEnabled

func (self Instance) VolumetricFogTemporalReprojectionEnabled() bool

Enables temporal reprojection in the volumetric fog. Temporal reprojection blends the current frame's volumetric fog with the last frame's volumetric fog to smooth out jagged edges. The performance cost is minimal; however, it leads to moving FogVolumes and Light3Ds "ghosting" and leaving a trail behind them. When temporal reprojection is enabled, try to avoid moving FogVolumes or Light3Ds too fast. Short-lived dynamic lighting effects should have Light3D.LightVolumetricFogEnergy set to 0.0 to avoid ghosting.

type ReflectionSource

type ReflectionSource int //gd:Environment.ReflectionSource
const (
	// Use the background for reflections.
	ReflectionSourceBg ReflectionSource = 0
	// Disable reflections. This provides a slight performance boost over other options.
	ReflectionSourceDisabled ReflectionSource = 1
	// Use the [Sky] for reflections regardless of what the background is.
	//
	// [Sky]: https://pkg.go.dev/graphics.gd/classdb/Sky
	ReflectionSourceSky ReflectionSource = 2
)

type SDFGIYScale

type SDFGIYScale int //gd:Environment.SDFGIYScale
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.
	SdfgiYScale50Percent SDFGIYScale = 0
	// Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales.
	SdfgiYScale75Percent SDFGIYScale = 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.
	SdfgiYScale100Percent SDFGIYScale = 2
)

type ToneMapper

type ToneMapper int //gd:Environment.ToneMapper
const (
	// Does not modify color data, resulting in a linear tonemapping curve which unnaturally clips bright values, causing bright lighting to look blown out. The simplest and fastest tonemapper.
	ToneMapperLinear ToneMapper = 0
	// A simple tonemapping curve that rolls off bright values to prevent clipping. This results in an image that can appear dull and low contrast. Slower than [ToneMapperLinear].
	//
	// Note: When [TonemapWhite] is left at the default value of 1.0, [ToneMapperReinhardt] produces an identical image to [ToneMapperLinear].
	//
	// [TonemapWhite]: https://pkg.go.dev/graphics.gd/classdb/#Instance.TonemapWhite
	ToneMapperReinhardt ToneMapper = 1
	// Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than [ToneMapperReinhardt]. Slightly slower than [ToneMapperReinhardt].
	ToneMapperFilmic ToneMapper = 2
	// Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than [ToneMapperFilmic].
	//
	// Note: This tonemapping operator is called "ACES Fitted" in Godot 3.x.
	ToneMapperAces ToneMapper = 3
	// Uses a film-like tonemapping curve and desaturates bright values for a more realistic appearance. Better than other tonemappers at maintaining the hue of colors as they become brighter. The slowest tonemapping option.
	//
	// Note: [TonemapWhite] is fixed at a value of 16.29, which makes [ToneMapperAgx] unsuitable for use with the Mobile rendering method.
	//
	// [TonemapWhite]: https://pkg.go.dev/graphics.gd/classdb/#Instance.TonemapWhite
	ToneMapperAgx ToneMapper = 4
)

Jump to

Keyboard shortcuts

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