pub struct EnvironmentMap {
pub texture: Option<AssetUUID>,
}Expand description
Selects the scene’s environment source for the IBL bake.
Registered as a shared resource by the host application. When it names an
equirectangular texture asset (an HDR .hdr/.exr keeps the dynamic range
that makes reflections read well), the bake projects it onto the environment
cube; absent — or naming an asset that has not been loaded — the procedural
sky is baked instead, so a scene without an authored environment still
lights correctly.
The bake is one-time, so the selection is read on the first tick.
Fields§
§texture: Option<AssetUUID>Equirectangular environment texture, as a loaded CpuTexture asset.
Implementations§
Source§impl EnvironmentMap
impl EnvironmentMap
Sourcepub fn from_asset(texture: AssetUUID) -> Self
pub fn from_asset(texture: AssetUUID) -> Self
Points the environment at an equirectangular texture asset.
Trait Implementations§
Source§impl Clone for EnvironmentMap
impl Clone for EnvironmentMap
Source§fn clone(&self) -> EnvironmentMap
fn clone(&self) -> EnvironmentMap
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EnvironmentMap
impl Debug for EnvironmentMap
Source§impl Default for EnvironmentMap
impl Default for EnvironmentMap
Source§fn default() -> EnvironmentMap
fn default() -> EnvironmentMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EnvironmentMap
impl RefUnwindSafe for EnvironmentMap
impl Send for EnvironmentMap
impl Sync for EnvironmentMap
impl Unpin for EnvironmentMap
impl UnsafeUnpin for EnvironmentMap
impl UnwindSafe for EnvironmentMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more