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: boolThe camera jumped (a cut, teleport or discontinuous time): history restarts. A target-changing resize and another scene restart it without this.
elapsed_seconds: f64Presentation 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: f32Milliseconds since the previous frame: FSR’s frameTimeDelta and
auto exposure’s time step.
visibility_mask: u32Enabled material visibility groups: a material draws while every bit
of its visibility_group is set here.
environment: FrameEnvironmentWhat 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: EnvironmentLightHow environment lights surfaces’ diffuse lobe. Their specular
lobe takes reflection_environment.
backdrop: Backdrop§baked_lighting: boolBaked (fixed) lighting: lightmaps, irradiance atlases, instances’ baked irradiance and the irradiance volume.
atmosphere: boolThe 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: EnvironmentLightHow 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: LocalExposureOff (1, 1) by default.
bloom: BloomParameters§motion_blur: MotionBlurParametersWhile Settings::motion_blur is on.
color_grading: ColorGrading§ambient_occlusion_radius: f32XeGTAO’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: f32How 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
impl FrameInput
Sourcepub fn new(camera: Camera) -> Self
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.