LightmapGIData

package
v0.0.0-...-0d6c339 Latest Latest
Warning

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

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

Documentation

Overview

graphics.gd/classdb/LightmapGIData contains baked lightmap and dynamic object probe data for graphics.gd/classdb/LightmapGI. It is replaced every time lightmaps are baked in graphics.gd/classdb/LightmapGI.

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
	AsLightmapGIData() 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]) AsLightmapGIData

func (self *Extension[T]) AsLightmapGIData() 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 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.LightmapGIData

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

func (self Instance) AddUser(path string, uv_scale Rect2.PositionSize, slice_index int, sub_instance int)

Adds an object that is considered baked within this graphics.gd/classdb/LightmapGIData.

func (Instance) AsLightmapGIData

func (self Instance) AsLightmapGIData() 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) ClearUsers

func (self Instance) ClearUsers()

Clear all objects that are considered baked within this graphics.gd/classdb/LightmapGIData.

func (Instance) GetUserCount

func (self Instance) GetUserCount() int

Returns the number of objects that are considered baked within this graphics.gd/classdb/LightmapGIData.

func (Instance) GetUserPath

func (self Instance) GetUserPath(user_idx int) string

Returns the node path of the baked object at index 'user_idx'.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) LightTexture

func (self Instance) LightTexture() TextureLayered.Instance

func (Instance) LightmapTextures

func (self Instance) LightmapTextures() []TextureLayered.Instance

func (Instance) SetLightTexture

func (self Instance) SetLightTexture(value TextureLayered.Instance)

func (Instance) SetLightmapTextures

func (self Instance) SetLightmapTextures(value []TextureLayered.Instance)

func (*Instance) SetObject

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

func (Instance) SetShadowmaskTextures

func (self Instance) SetShadowmaskTextures(value []TextureLayered.Instance)

func (Instance) SetUsesSphericalHarmonics

func (self Instance) SetUsesSphericalHarmonics(value bool)

func (Instance) ShadowmaskTextures

func (self Instance) ShadowmaskTextures() []TextureLayered.Instance

func (Instance) UsesSphericalHarmonics

func (self Instance) UsesSphericalHarmonics() bool

func (Instance) Virtual

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

type ShadowmaskMode

type ShadowmaskMode int //gd:LightmapGIData.ShadowmaskMode
const (
	// Shadowmasking is disabled. No shadowmask texture will be created when baking lightmaps. Existing shadowmask textures will be removed during baking.
	ShadowmaskModeNone ShadowmaskMode = 0
	// Shadowmasking is enabled. Directional shadows that are outside the [graphics.gd/classdb/DirectionalLight3D.Instance.DirectionalShadowMaxDistance] will be rendered using the shadowmask texture. Shadows that are inside the range will be rendered using real-time shadows exclusively. This mode allows for more precise real-time shadows up close, without the potential "smearing" effect that can occur when using lightmaps with a high texel size. The downside is that when the camera moves fast, the transition between the real-time light and shadowmask can be obvious. Also, objects that only have shadows baked in the shadowmask (and no real-time shadows) won't display any shadows up close.
	ShadowmaskModeReplace ShadowmaskMode = 1
	// Shadowmasking is enabled. Directional shadows will be rendered with real-time shadows overlaid on top of the shadowmask texture. This mode makes for smoother shadow transitions when the camera moves fast, at the cost of a potential smearing effect for directional shadows that are up close (due to the real-time shadow being mixed with a low-resolution shadowmask). Objects that only have shadows baked in the shadowmask (and no real-time shadows) will keep their shadows up close.
	ShadowmaskModeOverlay ShadowmaskMode = 2
)

Jump to

Keyboard shortcuts

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