Documentation
¶
Overview ¶
The graphics.gd/classdb/Sky class uses a graphics.gd/classdb/Material to render a 3D environment's background and the light it emits by updating the reflection/radiance cubemaps.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsSky() Instance
- func (self Instance) ID() ID
- func (self Instance) ProcessMode() ProcessMode
- func (self Instance) RadianceSize() RadianceSize
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetProcessMode(value ProcessMode)
- func (self Instance) SetRadianceSize(value RadianceSize)
- func (self Instance) SetSkyMaterial(value Material.Instance)
- func (self Instance) SkyMaterial() Material.Instance
- func (self Instance) Virtual(name string) reflect.Value
- type ProcessMode
- type RadianceSize
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 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]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
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 ¶
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) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) ProcessMode ¶
func (self Instance) ProcessMode() ProcessMode
func (Instance) RadianceSize ¶
func (self Instance) RadianceSize() RadianceSize
func (Instance) SetProcessMode ¶
func (self Instance) SetProcessMode(value ProcessMode)
func (Instance) SetRadianceSize ¶
func (self Instance) SetRadianceSize(value RadianceSize)
func (Instance) SetSkyMaterial ¶
func (Instance) SkyMaterial ¶
type ProcessMode ¶
type ProcessMode int //gd:Sky.ProcessMode
const ( // Automatically selects the appropriate process mode based on your sky shader. If your shader uses TIME or POSITION, this will use [ProcessModeRealtime]. If your shader uses any of the LIGHT_* variables or any custom uniforms, this uses [ProcessModeIncremental]. Otherwise, this defaults to [ProcessModeQuality]. ProcessModeAutomatic ProcessMode = 0 // Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [ProcessModeRealtime] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [graphics.gd/classdb/ProjectSettings] "rendering/reflections/sky_reflections/ggx_samples". ProcessModeQuality ProcessMode = 1 // Uses the same high quality importance sampling to process the radiance map as [ProcessModeQuality], but updates over several frames. The number of frames is determined by [graphics.gd/classdb/ProjectSettings] "rendering/reflections/sky_reflections/roughness_layers". Use this when you need highest quality radiance maps, but have a sky that updates slowly. ProcessModeIncremental ProcessMode = 2 // Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on [graphics.gd/classdb/ProjectSettings] "rendering/reflections/sky_reflections/fast_filter_high_quality". // // Note: The fast filtering algorithm is limited to 256×256 cubemaps, so [Instance.RadianceSize] must be set to [RadianceSize256]. Otherwise, a warning is printed and the overridden radiance size is ignored. ProcessModeRealtime ProcessMode = 3 )
type RadianceSize ¶
type RadianceSize int //gd:Sky.RadianceSize
const ( // Radiance texture size is 32×32 pixels. RadianceSize32 RadianceSize = 0 // Radiance texture size is 64×64 pixels. RadianceSize64 RadianceSize = 1 // Radiance texture size is 128×128 pixels. RadianceSize128 RadianceSize = 2 // Radiance texture size is 256×256 pixels. RadianceSize256 RadianceSize = 3 // Radiance texture size is 512×512 pixels. RadianceSize512 RadianceSize = 4 // Radiance texture size is 1024×1024 pixels. RadianceSize1024 RadianceSize = 5 // Radiance texture size is 2048×2048 pixels. RadianceSize2048 RadianceSize = 6 // Represents the size of the [RadianceSize] enum. RadianceSizeMax RadianceSize = 7 )