Module ssbh_data::matl_data

source ·
Expand description

Types for working with Matl data in .numatb files.

§Examples

The parameters for a single material are grouped into a MatlEntryData. This examples shows accessing the first rasterizer state for each material. This is typically ParamId::RasterizerState0.

use ssbh_data::prelude::*;

let matl = MatlData::from_file("model.numatb")?;

for entry in matl.entries {
    println!(
        "Material: {:?}, Shader: {:?}",
        entry.material_label, entry.shader_label
    );

    let rasterizer_state = &entry.rasterizer_states[0];
    println!("{:?}", rasterizer_state.param_id);
    println!("{:?}", rasterizer_state.data);
}

Modules§

Structs§

Enums§

  • Available blending modes for the source and destination color for alpha blending.
  • Determines the criteria for when to cull a face.
  • Determines how polygons are shaded.
  • Available anistropy levels for anisotropic texture filtering.
  • An enumeration of all possible material parameters. Not all values are used by Smash Ultimate’s shaders. For up to date documentation, see the Material Parameters page on Github.
  • Determines how texture coordinates outside the 0 to 1 range are handled when sampling from the texture.

Type Aliases§