Skip to main content

MToonMaterial

Struct MToonMaterial 

Source
pub struct MToonMaterial {
Show 25 fields pub transparent_with_z_write: bool, pub render_queue_offset_number: i32, pub shade_color: Vec3, pub shade_multiply_texture: Option<TextureInfo>, pub shading_shift_factor: f32, pub shading_shift_texture: Option<TextureInfo>, pub shading_shift_texture_scale: f32, pub shading_toony_factor: f32, pub gi_equalization_factor: f32, pub matcap_factor: Vec3, pub matcap_texture: Option<TextureInfo>, pub parametric_rim_color_factor: Vec3, pub parametric_rim_fresnel_power_factor: f32, pub parametric_rim_lift_factor: f32, pub rim_multiply_texture: Option<TextureInfo>, pub rim_lighting_mix_factor: f32, pub outline_width_mode: OutlineWidthMode, pub outline_width_factor: f32, pub outline_width_multiply_texture: Option<TextureInfo>, pub outline_color_factor: Vec3, pub outline_lighting_mix_factor: f32, pub uv_animation_mask_texture: Option<TextureInfo>, pub uv_animation_scroll_x_speed_factor: f32, pub uv_animation_scroll_y_speed_factor: f32, pub uv_animation_rotation_speed_factor: f32,
}
Expand description

Parameters defined by VRMC_materials_mtoon only.

Fields§

§transparent_with_z_write: bool

Enables depth writes for transparent materials.

§render_queue_offset_number: i32

Offset in the specification-defined MToon render queue range.

§shade_color: Vec3

Linear RGB shadow-side color multiplier.

§shade_multiply_texture: Option<TextureInfo>

Optional texture multiplied into Self::shade_color.

§shading_shift_factor: f32

Shifts the boundary between lit and shaded regions.

§shading_shift_texture: Option<TextureInfo>

Optional texture that varies the shading shift.

§shading_shift_texture_scale: f32

Multiplier applied to the shading-shift texture value.

§shading_toony_factor: f32

Controls the softness of the lit-to-shade transition.

§gi_equalization_factor: f32

Controls how strongly global illumination affects shading.

§matcap_factor: Vec3

Linear RGB multiplier for the matcap contribution.

§matcap_texture: Option<TextureInfo>

Optional sphere-mapped matcap texture.

§parametric_rim_color_factor: Vec3

Linear RGB color of the procedural rim-light contribution.

§parametric_rim_fresnel_power_factor: f32

Fresnel exponent of the procedural rim light.

§parametric_rim_lift_factor: f32

Additive lift applied before evaluating the rim-light Fresnel term.

§rim_multiply_texture: Option<TextureInfo>

Optional texture multiplied into the rim-light contribution.

§rim_lighting_mix_factor: f32

Mix factor between direct and indirect rim lighting.

§outline_width_mode: OutlineWidthMode

Coordinate system used to interpret outline width.

§outline_width_factor: f32

Base outline width in the units selected by Self::outline_width_mode.

§outline_width_multiply_texture: Option<TextureInfo>

Optional texture multiplied into the outline width.

§outline_color_factor: Vec3

Linear RGB outline color.

§outline_lighting_mix_factor: f32

Mix factor between unlit and lit outline color.

§uv_animation_mask_texture: Option<TextureInfo>

Optional mask controlling which pixels receive UV animation.

§uv_animation_scroll_x_speed_factor: f32

Horizontal UV scroll speed in UV units per second.

§uv_animation_scroll_y_speed_factor: f32

Vertical UV scroll speed in UV units per second.

§uv_animation_rotation_speed_factor: f32

Counter-clockwise UV rotation speed in radians per second.

Implementations§

Source§

impl MToonMaterial

Source

pub fn new() -> Self

Creates an MToon configuration using the VRM 1.0 specification defaults.

Trait Implementations§

Source§

impl Clone for MToonMaterial

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MToonMaterial

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MToonMaterial

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.