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 ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) AddUser(path string, uv_scale Rect2.PositionSize, slice_index int, sub_instance int)
- func (self Instance) AsLightmapGIData() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) ClearUsers()
- func (self Instance) GetUserCount() int
- func (self Instance) GetUserPath(user_idx int) string
- func (self Instance) ID() ID
- func (self Instance) LightTexture() TextureLayered.Instance
- func (self Instance) LightmapTextures() []TextureLayered.Instance
- func (self Instance) SetLightTexture(value TextureLayered.Instance)
- func (self Instance) SetLightmapTextures(value []TextureLayered.Instance)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetShadowmaskTextures(value []TextureLayered.Instance)
- func (self Instance) SetUsesSphericalHarmonics(value bool)
- func (self Instance) ShadowmaskTextures() []TextureLayered.Instance
- func (self Instance) UsesSphericalHarmonics() bool
- func (self Instance) Virtual(name string) reflect.Value
- type ShadowmaskMode
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]) AsLightmapGIData ¶
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 ¶
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 (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 (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) ClearUsers ¶
func (self Instance) ClearUsers()
Clear all objects that are considered baked within this graphics.gd/classdb/LightmapGIData.
func (Instance) GetUserCount ¶
Returns the number of objects that are considered baked within this graphics.gd/classdb/LightmapGIData.
func (Instance) GetUserPath ¶
Returns the node path of the baked object at index 'user_idx'.
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) SetShadowmaskTextures ¶
func (self Instance) SetShadowmaskTextures(value []TextureLayered.Instance)
func (Instance) SetUsesSphericalHarmonics ¶
func (Instance) ShadowmaskTextures ¶
func (self Instance) ShadowmaskTextures() []TextureLayered.Instance
func (Instance) UsesSphericalHarmonics ¶
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 )