Move CubemapLayout out of decal code (#19960)
# Objective - Make bevy_light possible by making it possible to split out clusterable into bevy_camera ## Solution - Move cubemap stuff next to cubemap stuff. ## Testing - 3d_scene runs Note: no breaking changes thanks to re-exports
This commit is contained in:
parent
a869383cda
commit
f987920bbd
@ -363,6 +363,42 @@ impl CubemapFrusta {
|
||||
}
|
||||
}
|
||||
|
||||
/// Cubemap layout defines the order of images in a packed cubemap image.
|
||||
#[derive(Default, Reflect, Debug, Clone, Copy)]
|
||||
pub enum CubemapLayout {
|
||||
/// layout in a vertical cross format
|
||||
/// ```text
|
||||
/// +y
|
||||
/// -x -z +x
|
||||
/// -y
|
||||
/// +z
|
||||
/// ```
|
||||
#[default]
|
||||
CrossVertical = 0,
|
||||
/// layout in a horizontal cross format
|
||||
/// ```text
|
||||
/// +y
|
||||
/// -x -z +x +z
|
||||
/// -y
|
||||
/// ```
|
||||
CrossHorizontal = 1,
|
||||
/// layout in a vertical sequence
|
||||
/// ```text
|
||||
/// +x
|
||||
/// -y
|
||||
/// +y
|
||||
/// -y
|
||||
/// -z
|
||||
/// +z
|
||||
/// ```
|
||||
SequenceVertical = 2,
|
||||
/// layout in a horizontal sequence
|
||||
/// ```text
|
||||
/// +x -y +y -y -z +z
|
||||
/// ```
|
||||
SequenceHorizontal = 3,
|
||||
}
|
||||
|
||||
#[derive(Component, Debug, Default, Reflect, Clone)]
|
||||
#[reflect(Component, Default, Debug, Clone)]
|
||||
pub struct CascadesFrusta {
|
||||
|
@ -32,6 +32,7 @@ use bevy_image::Image;
|
||||
use bevy_math::Mat4;
|
||||
use bevy_platform::collections::HashMap;
|
||||
use bevy_reflect::Reflect;
|
||||
pub use bevy_render::primitives::CubemapLayout;
|
||||
use bevy_render::{
|
||||
extract_component::{ExtractComponent, ExtractComponentPlugin},
|
||||
load_shader_library,
|
||||
@ -95,42 +96,6 @@ pub struct ClusteredDecal {
|
||||
pub tag: u32,
|
||||
}
|
||||
|
||||
/// Cubemap layout defines the order of images in a packed cubemap image.
|
||||
#[derive(Default, Reflect, Debug, Clone, Copy)]
|
||||
pub enum CubemapLayout {
|
||||
/// layout in a vertical cross format
|
||||
/// ```text
|
||||
/// +y
|
||||
/// -x -z +x
|
||||
/// -y
|
||||
/// +z
|
||||
/// ```
|
||||
#[default]
|
||||
CrossVertical = 0,
|
||||
/// layout in a horizontal cross format
|
||||
/// ```text
|
||||
/// +y
|
||||
/// -x -z +x +z
|
||||
/// -y
|
||||
/// ```
|
||||
CrossHorizontal = 1,
|
||||
/// layout in a vertical sequence
|
||||
/// ```text
|
||||
/// +x
|
||||
/// -y
|
||||
/// +y
|
||||
/// -y
|
||||
/// -z
|
||||
/// +z
|
||||
/// ```
|
||||
SequenceVertical = 2,
|
||||
/// layout in a horizontal sequence
|
||||
/// ```text
|
||||
/// +x -y +y -y -z +z
|
||||
/// ```
|
||||
SequenceHorizontal = 3,
|
||||
}
|
||||
|
||||
/// Add to a [`PointLight`] to add a light texture effect.
|
||||
/// A texture mask is applied to the light source to modulate its intensity,
|
||||
/// simulating patterns like window shadows, gobo/cookie effects, or soft falloffs.
|
||||
|
Loading…
Reference in New Issue
Block a user