[−][src]Struct gltf_json::Material
The material appearance of a primitive.
Fields
alpha_cutoff: AlphaCutoff
The alpha cutoff value of the material.
alpha_mode: Checked<AlphaMode>
The alpha rendering mode of the material.
The material's alpha rendering mode enumeration specifying the interpretation of the alpha value of the main factor and texture.
-
In
Opaque
mode (default) the alpha value is ignored and the rendered output is fully opaque. -
In
Mask
mode, the rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value. -
In
Blend
mode, the alpha value is used to composite the source and destination areas and the rendered output is combined with the background using the normal painting operation (i.e. the Porter and Duff over operator).
double_sided: bool
Specifies whether the material is double-sided.
-
When this value is false, back-face culling is enabled.
-
When this value is true, back-face culling is disabled and double sided lighting is enabled.
The back-face must have its normals reversed before the lighting equation is evaluated.
pbr_metallic_roughness: PbrMetallicRoughness
A set of parameter values that are used to define the metallic-roughness
material model from Physically-Based Rendering (PBR) methodology. When not
specified, all the default values of pbrMetallicRoughness
apply.
normal_texture: Option<NormalTexture>
A tangent space normal map. The texture contains RGB components in linear space. Each texel represents the XYZ components of a normal vector in tangent space. Red [0 to 255] maps to X [-1 to 1]. Green [0 to 255] maps to Y [-1 to 1]. Blue [128 to 255] maps to Z [1/255 to 1]. The normal vectors use OpenGL conventions where +X is right and +Y is up. +Z points toward the viewer.
occlusion_texture: Option<OcclusionTexture>
The occlusion map texture. The occlusion values are sampled from the R channel. Higher values indicate areas that should receive full indirect lighting and lower values indicate no indirect lighting. These values are linear. If other channels are present (GBA), they are ignored for occlusion calculations.
emissive_texture: Option<Info>
The emissive map controls the color and intensity of the light being emitted by the material. This texture contains RGB components in sRGB color space. If a fourth component (A) is present, it is ignored.
emissive_factor: EmissiveFactor
The emissive color of the material.
extensions: Option<Material>
Extension specific data.
extras: Extras
Optional application specific data.
Trait Implementations
impl<'a> Get<Material> for Root
[src]
impl Validate for Material
[src]
fn validate<P, R>(&self, _root: &Root, _path: P, _report: &mut R) where
P: Fn() -> Path,
R: FnMut(&dyn Fn() -> Path, Error),
[src]
P: Fn() -> Path,
R: FnMut(&dyn Fn() -> Path, Error),
impl Clone for Material
[src]
fn clone(&self) -> Material
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Material
[src]
impl Debug for Material
[src]
impl Serialize for Material
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Material where
Material: Default,
[src]
Material: Default,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Sync for Material
impl Send for Material
impl Unpin for Material
impl RefUnwindSafe for Material
impl UnwindSafe for Material
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,