Sky

package
v0.0.0-...-e1beaa7 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 24 Imported by: 0

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

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 Any

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

type Extension

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

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

func (*Extension[T]) AsObject

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

func (*Extension[T]) AsRefCounted

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

func (*Extension[T]) AsResource

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

func (*Extension[T]) AsSky

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

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

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

func (self Instance) AsSky() Instance

func (Instance) ID

func (self Instance) ID() ID

func (Instance) ProcessMode

func (self Instance) ProcessMode() ProcessMode

func (Instance) RadianceSize

func (self Instance) RadianceSize() RadianceSize

func (*Instance) SetObject

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

func (Instance) SetProcessMode

func (self Instance) SetProcessMode(value ProcessMode)

func (Instance) SetRadianceSize

func (self Instance) SetRadianceSize(value RadianceSize)

func (Instance) SetSkyMaterial

func (self Instance) SetSkyMaterial(value Material.Instance)

func (Instance) SkyMaterial

func (self Instance) SkyMaterial() Material.Instance

func (Instance) Virtual

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

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
)

Jump to

Keyboard shortcuts

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