Skip to main content

FrameInput

Struct FrameInput 

Source
pub struct FrameInput {
Show 22 fields pub camera: Camera, pub camera_cut: bool, pub elapsed_seconds: f64, pub frame_time_ms: f32, pub visibility_mask: u32, pub environment: FrameEnvironment, pub directional_lights: [Option<DirectionalLight>; 2], pub hemisphere_light: HemisphereLight, pub diffuse_environment: EnvironmentLight, pub backdrop: Backdrop, pub baked_lighting: bool, pub atmosphere: bool, pub fog: Fog, pub mist: Mist, pub reflection_environment: EnvironmentLight, pub exposure: Exposure, pub local_exposure: LocalExposure, pub bloom: BloomParameters, pub motion_blur: MotionBlurParameters, pub color_grading: ColorGrading, pub ambient_occlusion_radius: f32, pub screen_space_indirect_radius: f32,
}
Expand description

One frame’s camera, authored look and per-frame state.

Fields§

§camera: Camera§camera_cut: bool

The camera jumped (a cut, teleport or discontinuous time): history restarts. A target-changing resize and another scene restart it without this.

§elapsed_seconds: f64

Presentation seconds, which place materials’ scrolling normal layers and the mist’s drift. Double precision, so sessions hours long keep their animation smooth.

§frame_time_ms: f32

Milliseconds since the previous frame: FSR’s frameTimeDelta and auto exposure’s time step.

§visibility_mask: u32

Enabled material visibility groups: a material draws while every bit of its visibility_group is set here.

§environment: FrameEnvironment

What surrounds the frame: one of the scene’s environment maps, which lights the frame, draws its sky and backs its reflections, or a procedural sky lit by directional_lights; with None, or a map the scene no longer has, no environment does.

§directional_lights: [Option<DirectionalLight>; 2]

Up to two directional lights; None is no light. Under a procedural sky (FrameEnvironment::Sky) each is its light above the air, which reaches the scene through it.

§hemisphere_light: HemisphereLight§diffuse_environment: EnvironmentLight

How environment lights surfaces’ diffuse lobe. Their specular lobe takes reflection_environment.

§backdrop: Backdrop§baked_lighting: bool

Baked (fixed) lighting: lightmaps, irradiance atlases, instances’ baked irradiance and the irradiance volume.

§atmosphere: bool

The volumetric fog and mist, while Settings::atmosphere is on too. Off by default, as Godot’s volumetric_fog_enabled and fog_enabled: a game turns it on where it wants fog or mist.

§fog: Fog§mist: Mist§reflection_environment: EnvironmentLight

How environment lights surfaces’ specular lobe where no baked probe does: source completion beyond the probes, probe captures’ and ray hits’ environment specular, and the sky probe captures record.

§exposure: Exposure§local_exposure: LocalExposure

Off (1, 1) by default.

§bloom: BloomParameters§motion_blur: MotionBlurParameters

While Settings::motion_blur is on.

§color_grading: ColorGrading§ambient_occlusion_radius: f32

XeGTAO’s search radius in world metres, clamped to 0.01..=10000 (NaN to 0.01). Settings::ambient_occlusion turns ambient occlusion off.

§screen_space_indirect_radius: f32

How far screen-space indirect light reaches, in world metres, clamped to 1..=25 (NaN to 5). Settings::screen_space_indirect turns it on.

Implementations§

Source§

impl FrameInput

Source

pub fn new(camera: Camera) -> Self

camera with no lights, fog medium, mist, visibility groups or environment; the environment’s diffuse lighting, reflections and backdrop unturned at intensity 1; baked lighting on and atmosphere off; a 60 Hz frame time; a fixed exposure of 0 stops and no local exposure; and the default bloom, motion blur and colour grading, an ambient occlusion radius of 0.5 m and a screen-space indirect light radius of 5 m.

Trait Implementations§

Source§

impl Clone for FrameInput

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FrameInput

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,