Struct three_d::renderer::material::FragmentAttributes
source · pub struct FragmentAttributes {
pub position: bool,
pub normal: bool,
pub tangents: bool,
pub uv: bool,
pub color: bool,
}
Expand description
Describes the set of attributes provided by a geometry and consumed by a Material, ie. calculated in the vertex shader and then sent to the fragment shader. To use an attribute for a material, add the relevant shader code to the fragment shader source (documented for each attribute) and return this struct from Material::fragment_attributes with the relevant attribute set to true.
Fields§
§position: bool
Position in world space: in vec3 pos;
normal: bool
Normal: in vec3 nor;
,
tangents: bool
Tangent and bitangent: in vec3 tang; in vec3 bitang;
uv: bool
UV coordinates: in vec2 uvs;
color: bool
Color: in vec4 col;
Implementations§
Trait Implementations§
source§impl Clone for FragmentAttributes
impl Clone for FragmentAttributes
source§fn clone(&self) -> FragmentAttributes
fn clone(&self) -> FragmentAttributes
Returns a copy of the value. Read more
1.0.0 · 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 FragmentAttributes
impl Debug for FragmentAttributes
impl Copy for FragmentAttributes
Auto Trait Implementations§
impl RefUnwindSafe for FragmentAttributes
impl Send for FragmentAttributes
impl Sync for FragmentAttributes
impl Unpin for FragmentAttributes
impl UnwindSafe for FragmentAttributes
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