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 ¶
- type Advanced
- type AmbientSource
- type Any
- type BGMode
- type Extension
- type FogMode
- type GlowBlendMode
- type ID
- type Instance
- func (self Instance) AdjustmentBrightness() Float.X
- func (self Instance) AdjustmentColorCorrection() Texture.Instance
- func (self Instance) AdjustmentContrast() Float.X
- func (self Instance) AdjustmentEnabled() bool
- func (self Instance) AdjustmentSaturation() Float.X
- func (self Instance) AmbientLightColor() Color.RGBA
- func (self Instance) AmbientLightEnergy() Float.X
- func (self Instance) AmbientLightSkyContribution() Float.X
- func (self Instance) AmbientLightSource() AmbientSource
- func (self Instance) AsEnvironment() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) BackgroundCameraFeedId() int
- func (self Instance) BackgroundCanvasMaxLayer() int
- func (self Instance) BackgroundColor() Color.RGBA
- func (self Instance) BackgroundEnergyMultiplier() Float.X
- func (self Instance) BackgroundIntensity() Float.X
- func (self Instance) BackgroundMode() BGMode
- func (self Instance) FogAerialPerspective() Float.X
- func (self Instance) FogDensity() Float.X
- func (self Instance) FogDepthBegin() Float.X
- func (self Instance) FogDepthCurve() Float.X
- func (self Instance) FogDepthEnd() Float.X
- func (self Instance) FogEnabled() bool
- func (self Instance) FogHeight() Float.X
- func (self Instance) FogHeightDensity() Float.X
- func (self Instance) FogLightColor() Color.RGBA
- func (self Instance) FogLightEnergy() Float.X
- func (self Instance) FogMode() FogMode
- func (self Instance) FogSkyAffect() Float.X
- func (self Instance) FogSunScatter() Float.X
- func (self Instance) GetGlowLevel(idx int) Float.X
- func (self Instance) GlowBlendMode() GlowBlendMode
- func (self Instance) GlowBloom() Float.X
- func (self Instance) GlowEnabled() bool
- func (self Instance) GlowHdrLuminanceCap() Float.X
- func (self Instance) GlowHdrScale() Float.X
- func (self Instance) GlowHdrThreshold() Float.X
- func (self Instance) GlowIntensity() Float.X
- func (self Instance) GlowMap() Texture.Instance
- func (self Instance) GlowMapStrength() Float.X
- func (self Instance) GlowMix() Float.X
- func (self Instance) GlowNormalized() bool
- func (self Instance) GlowStrength() Float.X
- func (self Instance) ID() ID
- func (self Instance) ReflectedLightSource() ReflectionSource
- func (self Instance) SdfgiBounceFeedback() Float.X
- func (self Instance) SdfgiCascade0Distance() Float.X
- func (self Instance) SdfgiCascades() int
- func (self Instance) SdfgiEnabled() bool
- func (self Instance) SdfgiEnergy() Float.X
- func (self Instance) SdfgiMaxDistance() Float.X
- func (self Instance) SdfgiMinCellSize() Float.X
- func (self Instance) SdfgiNormalBias() Float.X
- func (self Instance) SdfgiProbeBias() Float.X
- func (self Instance) SdfgiReadSkyLight() bool
- func (self Instance) SdfgiUseOcclusion() bool
- func (self Instance) SdfgiYScale() SDFGIYScale
- func (self Instance) SetAdjustmentBrightness(value Float.X)
- func (self Instance) SetAdjustmentColorCorrection(value Texture.Instance)
- func (self Instance) SetAdjustmentContrast(value Float.X)
- func (self Instance) SetAdjustmentEnabled(value bool)
- func (self Instance) SetAdjustmentSaturation(value Float.X)
- func (self Instance) SetAmbientLightColor(value Color.RGBA)
- func (self Instance) SetAmbientLightEnergy(value Float.X)
- func (self Instance) SetAmbientLightSkyContribution(value Float.X)
- func (self Instance) SetAmbientLightSource(value AmbientSource)
- func (self Instance) SetBackgroundCameraFeedId(value int)
- func (self Instance) SetBackgroundCanvasMaxLayer(value int)
- func (self Instance) SetBackgroundColor(value Color.RGBA)
- func (self Instance) SetBackgroundEnergyMultiplier(value Float.X)
- func (self Instance) SetBackgroundIntensity(value Float.X)
- func (self Instance) SetBackgroundMode(value BGMode)
- func (self Instance) SetFogAerialPerspective(value Float.X)
- func (self Instance) SetFogDensity(value Float.X)
- func (self Instance) SetFogDepthBegin(value Float.X)
- func (self Instance) SetFogDepthCurve(value Float.X)
- func (self Instance) SetFogDepthEnd(value Float.X)
- func (self Instance) SetFogEnabled(value bool)
- func (self Instance) SetFogHeight(value Float.X)
- func (self Instance) SetFogHeightDensity(value Float.X)
- func (self Instance) SetFogLightColor(value Color.RGBA)
- func (self Instance) SetFogLightEnergy(value Float.X)
- func (self Instance) SetFogMode(value FogMode)
- func (self Instance) SetFogSkyAffect(value Float.X)
- func (self Instance) SetFogSunScatter(value Float.X)
- func (self Instance) SetGlowBlendMode(value GlowBlendMode)
- func (self Instance) SetGlowBloom(value Float.X)
- func (self Instance) SetGlowEnabled(value bool)
- func (self Instance) SetGlowHdrLuminanceCap(value Float.X)
- func (self Instance) SetGlowHdrScale(value Float.X)
- func (self Instance) SetGlowHdrThreshold(value Float.X)
- func (self Instance) SetGlowIntensity(value Float.X)
- func (self Instance) SetGlowLevel(idx int, intensity Float.X)
- func (self Instance) SetGlowMap(value Texture.Instance)
- func (self Instance) SetGlowMapStrength(value Float.X)
- func (self Instance) SetGlowMix(value Float.X)
- func (self Instance) SetGlowNormalized(value bool)
- func (self Instance) SetGlowStrength(value Float.X)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetReflectedLightSource(value ReflectionSource)
- func (self Instance) SetSdfgiBounceFeedback(value Float.X)
- func (self Instance) SetSdfgiCascade0Distance(value Float.X)
- func (self Instance) SetSdfgiCascades(value int)
- func (self Instance) SetSdfgiEnabled(value bool)
- func (self Instance) SetSdfgiEnergy(value Float.X)
- func (self Instance) SetSdfgiMaxDistance(value Float.X)
- func (self Instance) SetSdfgiMinCellSize(value Float.X)
- func (self Instance) SetSdfgiNormalBias(value Float.X)
- func (self Instance) SetSdfgiProbeBias(value Float.X)
- func (self Instance) SetSdfgiReadSkyLight(value bool)
- func (self Instance) SetSdfgiUseOcclusion(value bool)
- func (self Instance) SetSdfgiYScale(value SDFGIYScale)
- func (self Instance) SetSky(value Sky.Instance)
- func (self Instance) SetSkyCustomFov(value Float.X)
- func (self Instance) SetSkyRotation(value Euler.Radians)
- func (self Instance) SetSsaoAoChannelAffect(value Float.X)
- func (self Instance) SetSsaoDetail(value Float.X)
- func (self Instance) SetSsaoEnabled(value bool)
- func (self Instance) SetSsaoHorizon(value Float.X)
- func (self Instance) SetSsaoIntensity(value Float.X)
- func (self Instance) SetSsaoLightAffect(value Float.X)
- func (self Instance) SetSsaoPower(value Float.X)
- func (self Instance) SetSsaoRadius(value Float.X)
- func (self Instance) SetSsaoSharpness(value Float.X)
- func (self Instance) SetSsilEnabled(value bool)
- func (self Instance) SetSsilIntensity(value Float.X)
- func (self Instance) SetSsilNormalRejection(value Float.X)
- func (self Instance) SetSsilRadius(value Float.X)
- func (self Instance) SetSsilSharpness(value Float.X)
- func (self Instance) SetSsrDepthTolerance(value Float.X)
- func (self Instance) SetSsrEnabled(value bool)
- func (self Instance) SetSsrFadeIn(value Float.X)
- func (self Instance) SetSsrFadeOut(value Float.X)
- func (self Instance) SetSsrMaxSteps(value int)
- func (self Instance) SetTonemapExposure(value Float.X)
- func (self Instance) SetTonemapMode(value ToneMapper)
- func (self Instance) SetTonemapWhite(value Float.X)
- func (self Instance) SetVolumetricFogAlbedo(value Color.RGBA)
- func (self Instance) SetVolumetricFogAmbientInject(value Float.X)
- func (self Instance) SetVolumetricFogAnisotropy(value Float.X)
- func (self Instance) SetVolumetricFogDensity(value Float.X)
- func (self Instance) SetVolumetricFogDetailSpread(value Float.X)
- func (self Instance) SetVolumetricFogEmission(value Color.RGBA)
- func (self Instance) SetVolumetricFogEmissionEnergy(value Float.X)
- func (self Instance) SetVolumetricFogEnabled(value bool)
- func (self Instance) SetVolumetricFogGiInject(value Float.X)
- func (self Instance) SetVolumetricFogLength(value Float.X)
- func (self Instance) SetVolumetricFogSkyAffect(value Float.X)
- func (self Instance) SetVolumetricFogTemporalReprojectionAmount(value Float.X)
- func (self Instance) SetVolumetricFogTemporalReprojectionEnabled(value bool)
- func (self Instance) Sky() Sky.Instance
- func (self Instance) SkyCustomFov() Float.X
- func (self Instance) SkyRotation() Euler.Radians
- func (self Instance) SsaoAoChannelAffect() Float.X
- func (self Instance) SsaoDetail() Float.X
- func (self Instance) SsaoEnabled() bool
- func (self Instance) SsaoHorizon() Float.X
- func (self Instance) SsaoIntensity() Float.X
- func (self Instance) SsaoLightAffect() Float.X
- func (self Instance) SsaoPower() Float.X
- func (self Instance) SsaoRadius() Float.X
- func (self Instance) SsaoSharpness() Float.X
- func (self Instance) SsilEnabled() bool
- func (self Instance) SsilIntensity() Float.X
- func (self Instance) SsilNormalRejection() Float.X
- func (self Instance) SsilRadius() Float.X
- func (self Instance) SsilSharpness() Float.X
- func (self Instance) SsrDepthTolerance() Float.X
- func (self Instance) SsrEnabled() bool
- func (self Instance) SsrFadeIn() Float.X
- func (self Instance) SsrFadeOut() Float.X
- func (self Instance) SsrMaxSteps() int
- func (self Instance) TonemapExposure() Float.X
- func (self Instance) TonemapMode() ToneMapper
- func (self Instance) TonemapWhite() Float.X
- func (self Instance) Virtual(name string) reflect.Value
- func (self Instance) VolumetricFogAlbedo() Color.RGBA
- func (self Instance) VolumetricFogAmbientInject() Float.X
- func (self Instance) VolumetricFogAnisotropy() Float.X
- func (self Instance) VolumetricFogDensity() Float.X
- func (self Instance) VolumetricFogDetailSpread() Float.X
- func (self Instance) VolumetricFogEmission() Color.RGBA
- func (self Instance) VolumetricFogEmissionEnergy() Float.X
- func (self Instance) VolumetricFogEnabled() bool
- func (self Instance) VolumetricFogGiInject() Float.X
- func (self Instance) VolumetricFogLength() Float.X
- func (self Instance) VolumetricFogSkyAffect() Float.X
- func (self Instance) VolumetricFogTemporalReprojectionAmount() Float.X
- func (self Instance) VolumetricFogTemporalReprojectionEnabled() bool
- type ReflectionSource
- type SDFGIYScale
- type ToneMapper
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 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 ¶
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 (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
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 ¶
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.
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 (Instance) AdjustmentBrightness ¶
The global brightness value of the rendered scene. Effective only if AdjustmentEnabled is true.
func (Instance) AdjustmentColorCorrection ¶
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 ¶
The global contrast value of the rendered scene (default value is 1). Effective only if AdjustmentEnabled is true.
func (Instance) AdjustmentEnabled ¶
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 ¶
The global color saturation value of the rendered scene (default value is 1). Effective only if AdjustmentEnabled is true.
func (Instance) AmbientLightColor ¶
The ambient light's Color.RGBA. Only effective if AmbientLightSkyContribution is lower than 1.0 (exclusive).
func (Instance) AmbientLightEnergy ¶
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 ¶
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 (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) BackgroundCameraFeedId ¶
The ID of the camera feed to show in the background.
func (Instance) BackgroundCanvasMaxLayer ¶
The maximum layer ID to display. Only effective when using the BgCanvas background mode.
func (Instance) BackgroundColor ¶
The Color.RGBA displayed for clear areas of the scene. Only effective when using the BgColor background mode.
func (Instance) BackgroundEnergyMultiplier ¶
Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer.
func (Instance) BackgroundIntensity ¶
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) FogAerialPerspective ¶
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 ¶
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 ¶
The fog's depth starting distance from the camera. Only available when FogMode is set to FogModeDepth.
func (Instance) FogDepthCurve ¶
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 ¶
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 ¶
If true, fog effects are enabled.
func (Instance) FogHeightDensity ¶
The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value.
func (Instance) FogLightEnergy ¶
The fog's brightness. Higher values result in brighter fog.
func (Instance) FogSkyAffect ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
The bleed scale of the HDR glow.
func (Instance) GlowHdrThreshold ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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) ReflectedLightSource ¶
func (self Instance) ReflectedLightSource() ReflectionSource
The reflected (specular) light source.
func (Instance) SdfgiBounceFeedback ¶
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 ¶
Note: This property is linked to SdfgiMinCellSize and SdfgiMaxDistance. Changing its value will automatically change those properties as well.
func (Instance) SdfgiCascades ¶
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 ¶
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 ¶
The energy multiplier to use for SDFGI. Higher values will result in brighter indirect lighting and reflections. See also SdfgiBounceFeedback.
func (Instance) SdfgiMaxDistance ¶
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 ¶
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 ¶
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 ¶
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 ¶
If true, SDFGI takes the environment lighting into account. This should be set to false for interior scenes.
func (Instance) SdfgiUseOcclusion ¶
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 ¶
SetAdjustmentBrightness sets the property returned by [GetAdjustmentBrightness].
func (Instance) SetAdjustmentColorCorrection ¶
SetAdjustmentColorCorrection sets the property returned by [GetAdjustmentColorCorrection].
func (Instance) SetAdjustmentContrast ¶
SetAdjustmentContrast sets the property returned by [GetAdjustmentContrast].
func (Instance) SetAdjustmentEnabled ¶
SetAdjustmentEnabled sets the property returned by [IsAdjustmentEnabled].
func (Instance) SetAdjustmentSaturation ¶
SetAdjustmentSaturation sets the property returned by [GetAdjustmentSaturation].
func (Instance) SetAmbientLightColor ¶
SetAmbientLightColor sets the property returned by [GetAmbientLightColor].
func (Instance) SetAmbientLightEnergy ¶
SetAmbientLightEnergy sets the property returned by [GetAmbientLightEnergy].
func (Instance) SetAmbientLightSkyContribution ¶
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 ¶
SetBackgroundCameraFeedId sets the property returned by [GetCameraFeedId].
func (Instance) SetBackgroundCanvasMaxLayer ¶
SetBackgroundCanvasMaxLayer sets the property returned by [GetCanvasMaxLayer].
func (Instance) SetBackgroundColor ¶
SetBackgroundColor sets the property returned by [GetBgColor].
func (Instance) SetBackgroundEnergyMultiplier ¶
SetBackgroundEnergyMultiplier sets the property returned by [GetBgEnergyMultiplier].
func (Instance) SetBackgroundIntensity ¶
SetBackgroundIntensity sets the property returned by [GetBgIntensity].
func (Instance) SetBackgroundMode ¶
SetBackgroundMode sets the property returned by [GetBackground].
func (Instance) SetFogAerialPerspective ¶
SetFogAerialPerspective sets the property returned by [GetFogAerialPerspective].
func (Instance) SetFogDensity ¶
SetFogDensity sets the property returned by [GetFogDensity].
func (Instance) SetFogDepthBegin ¶
SetFogDepthBegin sets the property returned by [GetFogDepthBegin].
func (Instance) SetFogDepthCurve ¶
SetFogDepthCurve sets the property returned by [GetFogDepthCurve].
func (Instance) SetFogDepthEnd ¶
SetFogDepthEnd sets the property returned by [GetFogDepthEnd].
func (Instance) SetFogEnabled ¶
SetFogEnabled sets the property returned by [IsFogEnabled].
func (Instance) SetFogHeight ¶
SetFogHeight sets the property returned by [GetFogHeight].
func (Instance) SetFogHeightDensity ¶
SetFogHeightDensity sets the property returned by [GetFogHeightDensity].
func (Instance) SetFogLightColor ¶
SetFogLightColor sets the property returned by [GetFogLightColor].
func (Instance) SetFogLightEnergy ¶
SetFogLightEnergy sets the property returned by [GetFogLightEnergy].
func (Instance) SetFogMode ¶
SetFogMode sets the property returned by [GetFogMode].
func (Instance) SetFogSkyAffect ¶
SetFogSkyAffect sets the property returned by [GetFogSkyAffect].
func (Instance) SetFogSunScatter ¶
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 ¶
SetGlowBloom sets the property returned by [GetGlowBloom].
func (Instance) SetGlowEnabled ¶
SetGlowEnabled sets the property returned by [IsGlowEnabled].
func (Instance) SetGlowHdrLuminanceCap ¶
SetGlowHdrLuminanceCap sets the property returned by [GetGlowHdrLuminanceCap].
func (Instance) SetGlowHdrScale ¶
SetGlowHdrScale sets the property returned by [GetGlowHdrBleedScale].
func (Instance) SetGlowHdrThreshold ¶
SetGlowHdrThreshold sets the property returned by [GetGlowHdrBleedThreshold].
func (Instance) SetGlowIntensity ¶
SetGlowIntensity sets the property returned by [GetGlowIntensity].
func (Instance) SetGlowLevel ¶
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 ¶
SetGlowMap sets the property returned by [GetGlowMap].
func (Instance) SetGlowMapStrength ¶
SetGlowMapStrength sets the property returned by [GetGlowMapStrength].
func (Instance) SetGlowMix ¶
SetGlowMix sets the property returned by [GetGlowMix].
func (Instance) SetGlowNormalized ¶
SetGlowNormalized sets the property returned by [IsGlowNormalized].
func (Instance) SetGlowStrength ¶
SetGlowStrength sets the property returned by [GetGlowStrength].
func (Instance) SetReflectedLightSource ¶
func (self Instance) SetReflectedLightSource(value ReflectionSource)
SetReflectedLightSource sets the property returned by [GetReflectionSource].
func (Instance) SetSdfgiBounceFeedback ¶
SetSdfgiBounceFeedback sets the property returned by [GetSdfgiBounceFeedback].
func (Instance) SetSdfgiCascade0Distance ¶
SetSdfgiCascade0Distance sets the property returned by [GetSdfgiCascade0Distance].
func (Instance) SetSdfgiCascades ¶
SetSdfgiCascades sets the property returned by [GetSdfgiCascades].
func (Instance) SetSdfgiEnabled ¶
SetSdfgiEnabled sets the property returned by [IsSdfgiEnabled].
func (Instance) SetSdfgiEnergy ¶
SetSdfgiEnergy sets the property returned by [GetSdfgiEnergy].
func (Instance) SetSdfgiMaxDistance ¶
SetSdfgiMaxDistance sets the property returned by [GetSdfgiMaxDistance].
func (Instance) SetSdfgiMinCellSize ¶
SetSdfgiMinCellSize sets the property returned by [GetSdfgiMinCellSize].
func (Instance) SetSdfgiNormalBias ¶
SetSdfgiNormalBias sets the property returned by [GetSdfgiNormalBias].
func (Instance) SetSdfgiProbeBias ¶
SetSdfgiProbeBias sets the property returned by [GetSdfgiProbeBias].
func (Instance) SetSdfgiReadSkyLight ¶
SetSdfgiReadSkyLight sets the property returned by [IsSdfgiReadingSkyLight].
func (Instance) SetSdfgiUseOcclusion ¶
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) SetSkyCustomFov ¶
SetSkyCustomFov sets the property returned by [GetSkyCustomFov].
func (Instance) SetSkyRotation ¶
SetSkyRotation sets the property returned by [GetSkyRotation].
func (Instance) SetSsaoAoChannelAffect ¶
SetSsaoAoChannelAffect sets the property returned by [GetSsaoAoChannelAffect].
func (Instance) SetSsaoDetail ¶
SetSsaoDetail sets the property returned by [GetSsaoDetail].
func (Instance) SetSsaoEnabled ¶
SetSsaoEnabled sets the property returned by [IsSsaoEnabled].
func (Instance) SetSsaoHorizon ¶
SetSsaoHorizon sets the property returned by [GetSsaoHorizon].
func (Instance) SetSsaoIntensity ¶
SetSsaoIntensity sets the property returned by [GetSsaoIntensity].
func (Instance) SetSsaoLightAffect ¶
SetSsaoLightAffect sets the property returned by [GetSsaoDirectLightAffect].
func (Instance) SetSsaoPower ¶
SetSsaoPower sets the property returned by [GetSsaoPower].
func (Instance) SetSsaoRadius ¶
SetSsaoRadius sets the property returned by [GetSsaoRadius].
func (Instance) SetSsaoSharpness ¶
SetSsaoSharpness sets the property returned by [GetSsaoSharpness].
func (Instance) SetSsilEnabled ¶
SetSsilEnabled sets the property returned by [IsSsilEnabled].
func (Instance) SetSsilIntensity ¶
SetSsilIntensity sets the property returned by [GetSsilIntensity].
func (Instance) SetSsilNormalRejection ¶
SetSsilNormalRejection sets the property returned by [GetSsilNormalRejection].
func (Instance) SetSsilRadius ¶
SetSsilRadius sets the property returned by [GetSsilRadius].
func (Instance) SetSsilSharpness ¶
SetSsilSharpness sets the property returned by [GetSsilSharpness].
func (Instance) SetSsrDepthTolerance ¶
SetSsrDepthTolerance sets the property returned by [GetSsrDepthTolerance].
func (Instance) SetSsrEnabled ¶
SetSsrEnabled sets the property returned by [IsSsrEnabled].
func (Instance) SetSsrFadeIn ¶
SetSsrFadeIn sets the property returned by [GetSsrFadeIn].
func (Instance) SetSsrFadeOut ¶
SetSsrFadeOut sets the property returned by [GetSsrFadeOut].
func (Instance) SetSsrMaxSteps ¶
SetSsrMaxSteps sets the property returned by [GetSsrMaxSteps].
func (Instance) SetTonemapExposure ¶
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 ¶
SetTonemapWhite sets the property returned by [GetTonemapWhite].
func (Instance) SetVolumetricFogAlbedo ¶
SetVolumetricFogAlbedo sets the property returned by [GetVolumetricFogAlbedo].
func (Instance) SetVolumetricFogAmbientInject ¶
SetVolumetricFogAmbientInject sets the property returned by [GetVolumetricFogAmbientInject].
func (Instance) SetVolumetricFogAnisotropy ¶
SetVolumetricFogAnisotropy sets the property returned by [GetVolumetricFogAnisotropy].
func (Instance) SetVolumetricFogDensity ¶
SetVolumetricFogDensity sets the property returned by [GetVolumetricFogDensity].
func (Instance) SetVolumetricFogDetailSpread ¶
SetVolumetricFogDetailSpread sets the property returned by [GetVolumetricFogDetailSpread].
func (Instance) SetVolumetricFogEmission ¶
SetVolumetricFogEmission sets the property returned by [GetVolumetricFogEmission].
func (Instance) SetVolumetricFogEmissionEnergy ¶
SetVolumetricFogEmissionEnergy sets the property returned by [GetVolumetricFogEmissionEnergy].
func (Instance) SetVolumetricFogEnabled ¶
SetVolumetricFogEnabled sets the property returned by [IsVolumetricFogEnabled].
func (Instance) SetVolumetricFogGiInject ¶
SetVolumetricFogGiInject sets the property returned by [GetVolumetricFogGiInject].
func (Instance) SetVolumetricFogLength ¶
SetVolumetricFogLength sets the property returned by [GetVolumetricFogLength].
func (Instance) SetVolumetricFogSkyAffect ¶
SetVolumetricFogSkyAffect sets the property returned by [GetVolumetricFogSkyAffect].
func (Instance) SetVolumetricFogTemporalReprojectionAmount ¶
SetVolumetricFogTemporalReprojectionAmount sets the property returned by [GetVolumetricFogTemporalReprojectionAmount].
func (Instance) SetVolumetricFogTemporalReprojectionEnabled ¶
SetVolumetricFogTemporalReprojectionEnabled sets the property returned by [IsVolumetricFogTemporalReprojectionEnabled].
func (Instance) Sky ¶
The Sky resource used for this Environment.
func (Instance) SkyCustomFov ¶
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 ¶
The rotation to use for sky rendering.
func (Instance) SsaoAoChannelAffect ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
The distribution of occlusion. A higher value results in darker occlusion, similar to SsaoIntensity, but with a sharper falloff.
func (Instance) SsaoRadius ¶
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 ¶
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 ¶
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 ¶
The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light.
func (Instance) SsilNormalRejection ¶
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 ¶
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 ¶
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 ¶
The depth tolerance for screen-space reflections.
func (Instance) SsrEnabled ¶
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 ¶
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 ¶
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 ¶
The maximum number of steps for screen-space reflections. Higher values are slower.
func (Instance) TonemapExposure ¶
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 ¶
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) VolumetricFogAlbedo ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
The brightness of the emitted light from the volumetric fog.
func (Instance) VolumetricFogEnabled ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 )