ReflectionProbe

package
v0.0.0-...-ae8aae0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package ReflectionProbe provides methods for working with ReflectionProbe object instances.

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 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 Any

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

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 New

func New() Instance

func (Instance) AmbientColor

func (self Instance) AmbientColor() Color.RGBA

func (Instance) AmbientColorEnergy

func (self Instance) AmbientColorEnergy() Float.X

func (Instance) AmbientMode

func (self Instance) AmbientMode() gdclass.ReflectionProbeAmbientMode

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode3D

func (self Instance) AsNode3D() Node3D.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsReflectionProbe

func (self Instance) AsReflectionProbe() Instance

func (Instance) AsVisualInstance3D

func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance

func (Instance) BoxProjection

func (self Instance) BoxProjection() bool

func (Instance) CullMask

func (self Instance) CullMask() int

func (Instance) EnableShadows

func (self Instance) EnableShadows() bool

func (Instance) Intensity

func (self Instance) Intensity() Float.X

func (Instance) Interior

func (self Instance) Interior() bool

func (Instance) MaxDistance

func (self Instance) MaxDistance() Float.X

func (Instance) MeshLodThreshold

func (self Instance) MeshLodThreshold() Float.X

func (Instance) OriginOffset

func (self Instance) OriginOffset() Vector3.XYZ

func (Instance) ReflectionMask

func (self Instance) ReflectionMask() int

func (Instance) SetAmbientColor

func (self Instance) SetAmbientColor(value Color.RGBA)

func (Instance) SetAmbientColorEnergy

func (self Instance) SetAmbientColorEnergy(value Float.X)

func (Instance) SetAmbientMode

func (self Instance) SetAmbientMode(value gdclass.ReflectionProbeAmbientMode)

func (Instance) SetBoxProjection

func (self Instance) SetBoxProjection(value bool)

func (Instance) SetCullMask

func (self Instance) SetCullMask(value int)

func (Instance) SetEnableShadows

func (self Instance) SetEnableShadows(value bool)

func (Instance) SetIntensity

func (self Instance) SetIntensity(value Float.X)

func (Instance) SetInterior

func (self Instance) SetInterior(value bool)

func (Instance) SetMaxDistance

func (self Instance) SetMaxDistance(value Float.X)

func (Instance) SetMeshLodThreshold

func (self Instance) SetMeshLodThreshold(value Float.X)

func (Instance) SetOriginOffset

func (self Instance) SetOriginOffset(value Vector3.XYZ)

func (Instance) SetReflectionMask

func (self Instance) SetReflectionMask(value int)

func (Instance) SetSize

func (self Instance) SetSize(value Vector3.XYZ)

func (Instance) SetUpdateMode

func (self Instance) SetUpdateMode(value gdclass.ReflectionProbeUpdateMode)

func (Instance) Size

func (self Instance) Size() Vector3.XYZ

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) UpdateMode

func (self Instance) UpdateMode() gdclass.ReflectionProbeUpdateMode

func (Instance) Virtual

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

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
)

Jump to

Keyboard shortcuts

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