pub fn apply_preset(&self, model: &mut crate::Model) -> Attributes {
        let mut preset = model.get_attributes().clone();
        match self.preset {
            Preset::Plain => {
                preset.toon_factor = 0.0;
                preset.vertex_color_mix = 1.0;
                preset.distance_shading_channel = DistanceShadingChannel::None;

                preset.replace_shadows_with_hatching = true;
                preset.hatching_depth = 0.75;
                preset.hatching_steps = 150;
                preset.hatching_frequency = 4;
                preset.hatching_intensity = 0.75;
            }
            Preset::Aerial => {
                preset.toon_factor = 0.0;
                preset.vertex_color_mix = 1.0;
                preset.distance_shading_channel = DistanceShadingChannel::Saturation;
                preset.distance_shading_power = 0.6;

                preset.replace_shadows_with_hatching = true;
                preset.hatching_depth = 0.75;
                preset.hatching_steps = 150;
                preset.hatching_frequency = 4;
                preset.hatching_intensity = 0.75;
            }
            Preset::ChromaDepth => {
                preset.toon_factor = 0.0;
                preset.distance_shading_channel = DistanceShadingChannel::Hue;
                preset.distance_shading_power = 0.6;

                preset.replace_shadows_with_hatching = true;
                preset.hatching_depth = 0.75;
                preset.hatching_steps = 150;
                preset.hatching_frequency = 4;
                preset.hatching_intensity = 0.75;
            }
        };
        model.set_attributes(preset.clone());
        preset
    }
/// Applies a preset to model renderer.
Applies a preset to model renderer.
Applies a preset to model renderer .
pub fn apply_preset(&self, model: &mut crate::Model) -> Attributes {
        let mut preset = model.get_attributes().clone();
        match self.preset {
            Preset::Plain => {
                preset.toon_factor = 0.0;
                preset.vertex_color_mix = 1.0;
                preset.distance_shading_channel = DistanceShadingChannel::None;
                preset.replace_shadows_with_hatching = true;
                preset.hatching_depth = 0.75;
                preset.hatching_steps = 150;
                preset.hatching_frequency = 4;
                preset.hatching_intensity = 0.75;
            }
            Preset::Aerial => {
                preset.toon_factor = 0.0;
                preset.vertex_color_mix = 1.0;
                preset.distance_shading_channel = DistanceShadingChannel::Saturation;
                preset.distance_shading_power = 0.6;
                preset.replace_shadows_with_hatching = true;
                preset.hatching_depth = 0.75;
                preset.hatching_steps = 150;
                preset.hatching_frequency = 4;
                preset.hatching_intensity = 0.75;
            }
            Preset::ChromaDepth => {
                preset.toon_factor = 0.0;
                preset.distance_shading_channel = DistanceShadingChannel::Hue;
                preset.distance_shading_power = 0.6;
                preset.replace_shadows_with_hatching = true;
                preset.hatching_depth = 0.75;
                preset.hatching_steps = 150;
                preset.hatching_frequency = 4;
                preset.hatching_intensity = 0.75;
            }
        };
        model.set_attributes(preset.clone());
        preset
    }
pub fn apply_preset ( & self , model : & mut crate :: Model ) -> Attributes { let mut preset = model . get_attributes ( ) . clone ( ) ; match self . preset { Preset :: Plain => { preset . toon_factor = 0.0 ; preset . vertex_color_mix = 1.0 ; preset . distance_shading_channel = DistanceShadingChannel :: None ; preset . replace_shadows_with_hatching = true ; preset . hatching_depth = 0.75 ; preset . hatching_steps = 150 ; preset . hatching_frequency = 4 ; preset . hatching_intensity = 0.75 ; } Preset :: Aerial => { preset . toon_factor = 0.0 ; preset . vertex_color_mix = 1.0 ; preset . distance_shading_channel = DistanceShadingChannel :: Saturation ; preset . distance_shading_power = 0.6 ; preset . replace_shadows_with_hatching = true ; preset . hatching_depth = 0.75 ; preset . hatching_steps = 150 ; preset . hatching_frequency = 4 ; preset . hatching_intensity = 0.75 ; } Preset :: ChromaDepth => { preset . toon_factor = 0.0 ; preset . distance_shading_channel = DistanceShadingChannel :: Hue ; preset . distance_shading_power = 0.6 ; preset . replace_shadows_with_hatching = true ; preset . hatching_depth = 0.75 ; preset . hatching_steps = 150 ; preset . hatching_frequency = 4 ; preset . hatching_intensity = 0.75 ; } } ; model . set_attributes ( preset . clone ( ) ) ; preset }
Applies a preset to model renderer.
Applies a preset to model renderer .
&self
model
&mut crate::Model
&self
model
&mut crate::Model