Expand description
Material system for surface rendering.
Materials define how surfaces are shaded. Blendable materials (clay, wax, candy, flat) use 4-channel matcap textures (R/G/B/K) for color-tinted lighting. Static materials (mud, ceramic, jade, normal) use a single matcap texture for all channels.
Structs§
- Matcap
Texture Set - Pre-built GPU resources for a matcap material.
- Material
- A material definition for rendering.
- Material
Registry - Registry for managing materials.
- Material
Uniforms - GPU-compatible material uniforms.
Functions§
- create_
matcap_ bind_ group_ layout - Create the matcap bind group layout (5 entries: 4 textures + 1 sampler).
- create_
matcap_ sampler - Create a linear filtering sampler for matcap textures.
- decode_
matcap_ image_ from_ file - Decode an image file from disk into float RGBA pixel data.
- init_
matcap_ textures - Initialize all matcap textures and bind groups.
- upload_
matcap_ texture - Upload a decoded matcap image as a GPU texture.