Documentation ¶
Overview ¶
Package ReflectionProbe provides methods for working with ReflectionProbe object instances.
Index ¶
- type Advanced
- type AmbientMode
- type Any
- type Instance
- func (self Instance) AmbientColor() Color.RGBA
- func (self Instance) AmbientColorEnergy() Float.X
- func (self Instance) AmbientMode() gdclass.ReflectionProbeAmbientMode
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode3D() Node3D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsReflectionProbe() Instance
- func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
- func (self Instance) BoxProjection() bool
- func (self Instance) CullMask() int
- func (self Instance) EnableShadows() bool
- func (self Instance) Intensity() Float.X
- func (self Instance) Interior() bool
- func (self Instance) MaxDistance() Float.X
- func (self Instance) MeshLodThreshold() Float.X
- func (self Instance) OriginOffset() Vector3.XYZ
- func (self Instance) ReflectionMask() int
- func (self Instance) SetAmbientColor(value Color.RGBA)
- func (self Instance) SetAmbientColorEnergy(value Float.X)
- func (self Instance) SetAmbientMode(value gdclass.ReflectionProbeAmbientMode)
- func (self Instance) SetBoxProjection(value bool)
- func (self Instance) SetCullMask(value int)
- func (self Instance) SetEnableShadows(value bool)
- func (self Instance) SetIntensity(value Float.X)
- func (self Instance) SetInterior(value bool)
- func (self Instance) SetMaxDistance(value Float.X)
- func (self Instance) SetMeshLodThreshold(value Float.X)
- func (self Instance) SetOriginOffset(value Vector3.XYZ)
- func (self Instance) SetReflectionMask(value int)
- func (self Instance) SetSize(value Vector3.XYZ)
- func (self Instance) SetUpdateMode(value gdclass.ReflectionProbeUpdateMode)
- func (self Instance) Size() Vector3.XYZ
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) UpdateMode() gdclass.ReflectionProbeUpdateMode
- func (self Instance) Virtual(name string) reflect.Value
- type UpdateMode
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 AmbientMode ¶
type AmbientMode = gdclass.ReflectionProbeAmbientMode //gd:ReflectionProbe.AmbientMode
const ( /*Do not apply any ambient lighting inside the [ReflectionProbe]'s box defined by its [member size].*/ AmbientDisabled AmbientMode = 0 /*Apply automatically-sourced environment lighting inside the [ReflectionProbe]'s box defined by its [member size].*/ AmbientEnvironment AmbientMode = 1 /*Apply custom ambient lighting inside the [ReflectionProbe]'s box defined by its [member size]. See [member ambient_color] and [member ambient_color_energy].*/ AmbientColor AmbientMode = 2 )
type Instance ¶
type Instance [1]gdclass.ReflectionProbe
Captures its surroundings as a cubemap, and stores versions of it with increasing levels of blur to simulate different material roughnesses. The [ReflectionProbe] is used to create high-quality reflections at a low performance cost (when [member update_mode] is [constant UPDATE_ONCE]). [ReflectionProbe]s can be blended together and with the rest of the scene smoothly. [ReflectionProbe]s can also be combined with [VoxelGI], SDFGI ([member Environment.sdfgi_enabled]) and screen-space reflections ([member Environment.ssr_enabled]) to get more accurate reflections in specific areas. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them as-is. [b]Note:[/b] Unlike [VoxelGI] and SDFGI, [ReflectionProbe]s only source their environment from a [WorldEnvironment] node. If you specify an [Environment] resource within a [Camera3D] node, it will be ignored by the [ReflectionProbe]. This can lead to incorrect lighting within the [ReflectionProbe]. [b]Note:[/b] Reflection probes are only supported in the Forward+ and Mobile rendering methods, not Compatibility. When using the Mobile rendering method, only 8 reflection probes can be displayed on each mesh resource. Attempting to display more than 8 reflection probes on a single mesh resource will result in reflection probes flickering in and out as the camera moves. [b]Note:[/b] When using the Mobile rendering method, reflection probes will only correctly affect meshes whose visibility AABB intersects with the reflection probe's AABB. If using a shader to deform the mesh in a way that makes it go outside its AABB, [member GeometryInstance3D.extra_cull_margin] must be increased on the mesh. Otherwise, the reflection probe may not be visible on the mesh.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AmbientColor ¶
func (Instance) AmbientColorEnergy ¶
func (Instance) AmbientMode ¶
func (self Instance) AmbientMode() gdclass.ReflectionProbeAmbientMode
func (Instance) AsReflectionProbe ¶
func (Instance) AsVisualInstance3D ¶
func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
func (Instance) BoxProjection ¶
func (Instance) EnableShadows ¶
func (Instance) MaxDistance ¶
func (Instance) MeshLodThreshold ¶
func (Instance) OriginOffset ¶
func (Instance) ReflectionMask ¶
func (Instance) SetAmbientColor ¶
func (Instance) SetAmbientColorEnergy ¶
func (Instance) SetAmbientMode ¶
func (self Instance) SetAmbientMode(value gdclass.ReflectionProbeAmbientMode)
func (Instance) SetBoxProjection ¶
func (Instance) SetCullMask ¶
func (Instance) SetEnableShadows ¶
func (Instance) SetIntensity ¶
func (Instance) SetInterior ¶
func (Instance) SetMaxDistance ¶
func (Instance) SetMeshLodThreshold ¶
func (Instance) SetOriginOffset ¶
func (Instance) SetReflectionMask ¶
func (Instance) SetUpdateMode ¶
func (self Instance) SetUpdateMode(value gdclass.ReflectionProbeUpdateMode)
func (*Instance) UnsafePointer ¶
func (Instance) UpdateMode ¶
func (self Instance) UpdateMode() gdclass.ReflectionProbeUpdateMode
type UpdateMode ¶
type UpdateMode = gdclass.ReflectionProbeUpdateMode //gd:ReflectionProbe.UpdateMode
const ( /*Update the probe once on the next frame (recommended for most objects). The corresponding radiance map will be generated over the following six frames. This takes more time to update than [constant UPDATE_ALWAYS], but it has a lower performance cost and can result in higher-quality reflections. The ReflectionProbe is updated when its transform changes, but not when nearby geometry changes. You can force a [ReflectionProbe] update by moving the [ReflectionProbe] slightly in any direction.*/ UpdateOnce UpdateMode = 0 /*Update the probe every frame. This provides better results for fast-moving dynamic objects (such as cars). However, it has a significant performance cost. Due to the cost, it's recommended to only use one ReflectionProbe with [constant UPDATE_ALWAYS] at most per scene. For all other use cases, use [constant UPDATE_ONCE].*/ UpdateAlways UpdateMode = 1 )