Struct shades::FragmentShaderEnv[][src]

pub struct FragmentShaderEnv {
    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 frag_depth: Var<f32>,
    pub sample_mask: Var<[i32]>,
}

Fragment shader environment.

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.

frag_depth: Var<f32>

Depth of the fragment.

sample_mask: Var<[i32]>

Sample mask of the fragment.

Trait Implementations

impl Debug for FragmentShaderEnv[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.