CameraAttributesPractical
Camera settings in an easy to use format.
CameraAttributesPractical.swift:20class CameraAttributesPractical
Controls camera-specific attributes such as auto-exposure, 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.
Superclasses
class CameraAttributes
Parent class for camera settings.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
var autoExposureMaxSensitivity: Double
The maximum sensitivity (in ISO) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright.
var autoExposureMinSensitivity: Double
The minimum sensitivity (in ISO) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark.
var dofBlurAmount: Double
Sets the maximum amount of blur. When using physically-based blur amounts, will instead act as a multiplier. High values lead to an increased amount of blurriness, but can be much more expensive to calculate. It is best to keep this as low as possible for a given art style.
var dofBlurFarDistance: Double
Objects further from the
Camera3D
by this amount will be blurred by the depth of field effect. Measured in meters.var dofBlurFarEnabled: Bool
Enables depth of field blur for objects further than
dofBlurFarDistance
. Strength of blur is controlled bydofBlurAmount
and modulated bydofBlurFarTransition
.var dofBlurFarTransition: Double
When positive, distance over which (starting from
dofBlurFarDistance
) blur effect will scale from 0 todofBlurAmount
. When negative, uses physically-based scaling so depth of field effect will scale from 0 atdofBlurFarDistance
and will increase in a physically accurate way as objects get further from theCamera3D
.var dofBlurNearDistance: Double
Objects closer from the
Camera3D
by this amount will be blurred by the depth of field effect. Measured in meters.var dofBlurNearEnabled: Bool
Enables depth of field blur for objects closer than
dofBlurNearDistance
. Strength of blur is controlled bydofBlurAmount
and modulated bydofBlurNearTransition
.var dofBlurNearTransition: Double
When positive, distance over which blur effect will scale from 0 to
dofBlurAmount
, ending atdofBlurNearDistance
. When negative, uses physically-based scaling so depth of field effect will scale from 0 atdofBlurNearDistance
and will increase in a physically accurate way as objects get closer to theCamera3D
.