Struct shades::input::FragmentShaderInputs
source · [−]pub struct FragmentShaderInputs<I> {Show 13 fields
pub frag_coord: Expr<V4<f32>>,
pub front_facing: Expr<bool>,
pub clip_distance: Expr<[f32]>,
pub cull_distance: Expr<[f32]>,
pub point_coord: Expr<V2<f32>>,
pub primitive_id: Expr<i32>,
pub sample_id: Expr<i32>,
pub sample_position: Expr<V2<f32>>,
pub sample_mask_in: Expr<i32>,
pub layer: Expr<i32>,
pub viewport_index: Expr<i32>,
pub helper_invocation: Expr<bool>,
pub user: I,
}
Expand description
Fragment shader inputs.
This type contains everything you have access to when writing a fragment shader.
Fields
frag_coord: Expr<V4<f32>>
Fragment coordinate in the framebuffer.
front_facing: Expr<bool>
Whether the fragment is front-facing.
clip_distance: Expr<[f32]>
Clip distances to user planes.
This is an array giving the clip distances to each of the user clip planes.
cull_distance: Expr<[f32]>
Cull distances to user planes.
This is an array giving the cull distances to each of the user clip planes.
point_coord: Expr<V2<f32>>
Contains the 2D coordinates of a fragment within a point primitive.
primitive_id: Expr<i32>
ID of the primitive being currently rendered.
sample_id: Expr<i32>
ID of the sample being currently rendered.
sample_position: Expr<V2<f32>>
Sample 2D coordinates.
sample_mask_in: Expr<i32>
Contains the computed sample coverage mask for the current fragment.
layer: Expr<i32>
Layer the fragment will be written to.
viewport_index: Expr<i32>
Viewport index the fragment will be written to.
helper_invocation: Expr<bool>
Indicates whether we are in a helper invocation of a fragment shader.
user: I
Trait Implementations
sourceimpl<I: Debug> Debug for FragmentShaderInputs<I>
impl<I: Debug> Debug for FragmentShaderInputs<I>
Auto Trait Implementations
impl<I> RefUnwindSafe for FragmentShaderInputs<I> where
I: RefUnwindSafe,
impl<I> Send for FragmentShaderInputs<I> where
I: Send,
impl<I> Sync for FragmentShaderInputs<I> where
I: Sync,
impl<I> Unpin for FragmentShaderInputs<I> where
I: Unpin,
impl<I> UnwindSafe for FragmentShaderInputs<I> where
I: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more