Documentation ¶
Overview ¶
Package Light3D provides methods for working with Light3D object instances.
Index ¶
- type Advanced
- type Any
- type BakeMode
- type Instance
- func (self Instance) AsLight3D() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode3D() Node3D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
- func (self Instance) DistanceFadeBegin() Float.X
- func (self Instance) DistanceFadeEnabled() bool
- func (self Instance) DistanceFadeLength() Float.X
- func (self Instance) DistanceFadeShadow() Float.X
- func (self Instance) EditorOnly() bool
- func (self Instance) GetCorrelatedColor() Color.RGBA
- func (self Instance) LightAngularDistance() Float.X
- func (self Instance) LightBakeMode() gdclass.Light3DBakeMode
- func (self Instance) LightColor() Color.RGBA
- func (self Instance) LightCullMask() int
- func (self Instance) LightEnergy() Float.X
- func (self Instance) LightIndirectEnergy() Float.X
- func (self Instance) LightIntensityLumens() Float.X
- func (self Instance) LightIntensityLux() Float.X
- func (self Instance) LightNegative() bool
- func (self Instance) LightProjector() [1]gdclass.Texture2D
- func (self Instance) LightSize() Float.X
- func (self Instance) LightSpecular() Float.X
- func (self Instance) LightTemperature() Float.X
- func (self Instance) LightVolumetricFogEnergy() Float.X
- func (self Instance) SetDistanceFadeBegin(value Float.X)
- func (self Instance) SetDistanceFadeEnabled(value bool)
- func (self Instance) SetDistanceFadeLength(value Float.X)
- func (self Instance) SetDistanceFadeShadow(value Float.X)
- func (self Instance) SetEditorOnly(value bool)
- func (self Instance) SetLightAngularDistance(value Float.X)
- func (self Instance) SetLightBakeMode(value gdclass.Light3DBakeMode)
- func (self Instance) SetLightColor(value Color.RGBA)
- func (self Instance) SetLightCullMask(value int)
- func (self Instance) SetLightEnergy(value Float.X)
- func (self Instance) SetLightIndirectEnergy(value Float.X)
- func (self Instance) SetLightIntensityLumens(value Float.X)
- func (self Instance) SetLightIntensityLux(value Float.X)
- func (self Instance) SetLightNegative(value bool)
- func (self Instance) SetLightProjector(value [1]gdclass.Texture2D)
- func (self Instance) SetLightSize(value Float.X)
- func (self Instance) SetLightSpecular(value Float.X)
- func (self Instance) SetLightTemperature(value Float.X)
- func (self Instance) SetLightVolumetricFogEnergy(value Float.X)
- func (self Instance) SetShadowBias(value Float.X)
- func (self Instance) SetShadowBlur(value Float.X)
- func (self Instance) SetShadowEnabled(value bool)
- func (self Instance) SetShadowNormalBias(value Float.X)
- func (self Instance) SetShadowOpacity(value Float.X)
- func (self Instance) SetShadowReverseCullFace(value bool)
- func (self Instance) SetShadowTransmittanceBias(value Float.X)
- func (self Instance) ShadowBias() Float.X
- func (self Instance) ShadowBlur() Float.X
- func (self Instance) ShadowEnabled() bool
- func (self Instance) ShadowNormalBias() Float.X
- func (self Instance) ShadowOpacity() Float.X
- func (self Instance) ShadowReverseCullFace() bool
- func (self Instance) ShadowTransmittanceBias() Float.X
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type Param
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 BakeMode ¶
type BakeMode = gdclass.Light3DBakeMode //gd:Light3D.BakeMode
const ( /*Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights. [b]Note:[/b] Hiding a light does [i]not[/i] affect baking [LightmapGI]. Hiding a light will still affect baking [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled]).*/ BakeDisabled BakeMode = 0 /*Light is taken into account in static baking ([VoxelGI], [LightmapGI], SDFGI ([member Environment.sdfgi_enabled])). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off. [b]Note:[/b] The light is not baked in [LightmapGI] if [member editor_only] is [code]true[/code].*/ BakeStatic BakeMode = 1 /*Light is taken into account in dynamic baking ([VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to [constant BAKE_STATIC]. This has a greater performance cost compared to [constant BAKE_STATIC]. When using SDFGI, the update speed of dynamic lights is affected by [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights].*/ BakeDynamic BakeMode = 2 )
type Instance ¶
Light3D is the [i]abstract[/i] base class for light nodes. As it can't be instantiated, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsVisualInstance3D ¶
func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
func (Instance) DistanceFadeBegin ¶
func (Instance) DistanceFadeEnabled ¶
func (Instance) DistanceFadeLength ¶
func (Instance) DistanceFadeShadow ¶
func (Instance) EditorOnly ¶
func (Instance) GetCorrelatedColor ¶
Returns the [Color] of an idealized blackbody at the given [member light_temperature]. This value is calculated internally based on the [member light_temperature]. This [Color] is multiplied by [member light_color] before being sent to the [RenderingServer].
func (Instance) LightAngularDistance ¶
func (Instance) LightBakeMode ¶
func (self Instance) LightBakeMode() gdclass.Light3DBakeMode
func (Instance) LightColor ¶
func (Instance) LightCullMask ¶
func (Instance) LightEnergy ¶
func (Instance) LightIndirectEnergy ¶
func (Instance) LightIntensityLumens ¶
func (Instance) LightIntensityLux ¶
func (Instance) LightNegative ¶
func (Instance) LightProjector ¶
func (Instance) LightSpecular ¶
func (Instance) LightTemperature ¶
func (Instance) LightVolumetricFogEnergy ¶
func (Instance) SetDistanceFadeBegin ¶
func (Instance) SetDistanceFadeEnabled ¶
func (Instance) SetDistanceFadeLength ¶
func (Instance) SetDistanceFadeShadow ¶
func (Instance) SetEditorOnly ¶
func (Instance) SetLightAngularDistance ¶
func (Instance) SetLightBakeMode ¶
func (self Instance) SetLightBakeMode(value gdclass.Light3DBakeMode)
func (Instance) SetLightColor ¶
func (Instance) SetLightCullMask ¶
func (Instance) SetLightEnergy ¶
func (Instance) SetLightIndirectEnergy ¶
func (Instance) SetLightIntensityLumens ¶
func (Instance) SetLightIntensityLux ¶
func (Instance) SetLightNegative ¶
func (Instance) SetLightProjector ¶
func (Instance) SetLightSize ¶
func (Instance) SetLightSpecular ¶
func (Instance) SetLightTemperature ¶
func (Instance) SetLightVolumetricFogEnergy ¶
func (Instance) SetShadowBias ¶
func (Instance) SetShadowBlur ¶
func (Instance) SetShadowEnabled ¶
func (Instance) SetShadowNormalBias ¶
func (Instance) SetShadowOpacity ¶
func (Instance) SetShadowReverseCullFace ¶
func (Instance) SetShadowTransmittanceBias ¶
func (Instance) ShadowBias ¶
func (Instance) ShadowBlur ¶
func (Instance) ShadowEnabled ¶
func (Instance) ShadowNormalBias ¶
func (Instance) ShadowOpacity ¶
func (Instance) ShadowReverseCullFace ¶
func (Instance) ShadowTransmittanceBias ¶
func (*Instance) UnsafePointer ¶
type Param ¶
type Param = gdclass.Light3DParam //gd:Light3D.Param
const ( /*Constant for accessing [member light_energy].*/ ParamEnergy Param = 0 /*Constant for accessing [member light_indirect_energy].*/ ParamIndirectEnergy Param = 1 /*Constant for accessing [member light_volumetric_fog_energy].*/ ParamVolumetricFogEnergy Param = 2 /*Constant for accessing [member light_specular].*/ ParamSpecular Param = 3 /*Constant for accessing [member OmniLight3D.omni_range] or [member SpotLight3D.spot_range].*/ ParamRange Param = 4 /*Constant for accessing [member light_size].*/ ParamSize Param = 5 /*Constant for accessing [member OmniLight3D.omni_attenuation] or [member SpotLight3D.spot_attenuation].*/ ParamAttenuation Param = 6 /*Constant for accessing [member SpotLight3D.spot_angle].*/ ParamSpotAngle Param = 7 /*Constant for accessing [member SpotLight3D.spot_angle_attenuation].*/ ParamSpotAttenuation Param = 8 /*Constant for accessing [member DirectionalLight3D.directional_shadow_max_distance].*/ ParamShadowMaxDistance Param = 9 /*Constant for accessing [member DirectionalLight3D.directional_shadow_split_1].*/ ParamShadowSplit1Offset Param = 10 /*Constant for accessing [member DirectionalLight3D.directional_shadow_split_2].*/ ParamShadowSplit2Offset Param = 11 /*Constant for accessing [member DirectionalLight3D.directional_shadow_split_3].*/ ParamShadowSplit3Offset Param = 12 /*Constant for accessing [member DirectionalLight3D.directional_shadow_fade_start].*/ ParamShadowFadeStart Param = 13 /*Constant for accessing [member shadow_normal_bias].*/ ParamShadowNormalBias Param = 14 /*Constant for accessing [member shadow_bias].*/ ParamShadowBias Param = 15 /*Constant for accessing [member DirectionalLight3D.directional_shadow_pancake_size].*/ ParamShadowPancakeSize Param = 16 /*Constant for accessing [member shadow_opacity].*/ ParamShadowOpacity Param = 17 /*Constant for accessing [member shadow_blur].*/ ParamShadowBlur Param = 18 /*Constant for accessing [member shadow_transmittance_bias].*/ ParamTransmittanceBias Param = 19 /*Constant for accessing [member light_intensity_lumens] and [member light_intensity_lux]. Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code].*/ ParamIntensity Param = 20 /*Represents the size of the [enum Param] enum.*/ ParamMax Param = 21 )