CameraAttributes

package
v0.0.0-...-9b8b246 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Controls camera-specific attributes such as depth of field and exposure override.

When used in a WorldEnvironment it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own CameraAttributes, including the editor camera. When used in a Camera3D it will override any CameraAttributes set in the WorldEnvironment. When used in VoxelGI or LightmapGI, only the exposure settings will be used.

See also Environment for general 3D environment settings.

This is a pure virtual class that is inherited by CameraAttributesPhysical and CameraAttributesPractical.

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

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

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

func (self Instance) AsCameraAttributes() 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) AutoExposureEnabled

func (self Instance) AutoExposureEnabled() bool

If true, enables the tonemapping auto exposure mode of the scene renderer. If true, the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light.

func (Instance) AutoExposureScale

func (self Instance) AutoExposureScale() Float.X

The scale of the auto exposure effect. Affects the intensity of auto exposure.

func (Instance) AutoExposureSpeed

func (self Instance) AutoExposureSpeed() Float.X

The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure.

func (Instance) ExposureMultiplier

func (self Instance) ExposureMultiplier() Float.X

Multiplier for the exposure amount. A higher value results in a brighter image.

func (Instance) ExposureSensitivity

func (self Instance) ExposureSensitivity() Float.X

Sensitivity of camera sensors, measured in ISO. A higher sensitivity results in a brighter image.

If AutoExposureEnabled is true, this can be used as a method of exposure compensation, doubling the value will increase the exposure value (measured in EV100) by 1 stop.

Note: Only available when ProjectSettings "rendering/lights_and_shadows/use_physical_light_units" is enabled.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) SetAutoExposureEnabled

func (self Instance) SetAutoExposureEnabled(value bool)

SetAutoExposureEnabled sets the property returned by [IsAutoExposureEnabled].

func (Instance) SetAutoExposureScale

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

SetAutoExposureScale sets the property returned by [GetAutoExposureScale].

func (Instance) SetAutoExposureSpeed

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

SetAutoExposureSpeed sets the property returned by [GetAutoExposureSpeed].

func (Instance) SetExposureMultiplier

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

SetExposureMultiplier sets the property returned by [GetExposureMultiplier].

func (Instance) SetExposureSensitivity

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

SetExposureSensitivity sets the property returned by [GetExposureSensitivity].

func (*Instance) SetObject

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

func (Instance) Virtual

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

Jump to

Keyboard shortcuts

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