pub struct GeometryPass {
pub enabled: bool,
pub shader_handle: u64,
pub draw_call_count: u32,
pub triangle_count: u64,
pub time_us: u64,
pub depth_test: bool,
pub depth_func: DepthFunction,
pub depth_write: bool,
pub backface_cull: bool,
pub polygon_offset: Option<(f32, f32)>,
pub use_instancing: bool,
pub max_instances_per_draw: u32,
}Expand description
The geometry pass fills the G-Buffer with per-pixel data from scene geometry.
Fields§
§enabled: boolWhether this pass is enabled.
shader_handle: u64Shader program handle.
draw_call_count: u32Number of draw calls executed.
triangle_count: u64Number of triangles rendered.
time_us: u64Time taken (microseconds).
depth_test: boolWhether depth testing is enabled (should be, using pre-pass depth).
depth_func: DepthFunctionDepth function for geometry pass (Equal if depth pre-pass ran, Less otherwise).
depth_write: boolWhether to write depth (false if depth pre-pass already wrote it).
backface_cull: boolWhether backface culling is enabled.
polygon_offset: Option<(f32, f32)>Polygon offset for depth fighting prevention.
use_instancing: boolWhether instanced rendering is used.
max_instances_per_draw: u32Maximum instances per draw call.
Implementations§
Source§impl GeometryPass
impl GeometryPass
pub fn new() -> Self
Sourcepub fn execute(&mut self, queue: &RenderQueue, gbuffer: &mut GBuffer)
pub fn execute(&mut self, queue: &RenderQueue, gbuffer: &mut GBuffer)
Execute the geometry pass.
Sourcepub fn vertex_shader() -> &'static str
pub fn vertex_shader() -> &'static str
Generate the geometry pass vertex shader.
Sourcepub fn fragment_shader() -> &'static str
pub fn fragment_shader() -> &'static str
Generate the geometry pass fragment shader.
Trait Implementations§
Source§impl Debug for GeometryPass
impl Debug for GeometryPass
Auto Trait Implementations§
impl Freeze for GeometryPass
impl RefUnwindSafe for GeometryPass
impl Send for GeometryPass
impl Sync for GeometryPass
impl Unpin for GeometryPass
impl UnsafeUnpin for GeometryPass
impl UnwindSafe for GeometryPass
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.