Skip to main content

load_blendable_material

Function load_blendable_material 

Source
pub fn load_blendable_material(name: &str, filenames: [&str; 4])
Expand description

Loads a blendable (4-channel, RGB-tintable) matcap material from disk.

Takes a name and 4 image file paths for R, G, B, K matcap channels. The material becomes available in the UI material selector on the next frame.

Supports HDR, JPEG, PNG, EXR, and other image formats.

ยงExample

polyscope_rs::load_blendable_material("metal", [
    "assets/metal_r.hdr",
    "assets/metal_g.hdr",
    "assets/metal_b.hdr",
    "assets/metal_k.hdr",
]);