API Reference · Materials and textures
ShadingModel
public enum ShadingModelHow a surface turns light into colour.
Four whole models rather than an open-ended shader, which is the deliberate trade — see docs/effects-and-shaders.md. Each one is implemented on all four renderers or reported absent on the ones that cannot manage it, and none of them can draw the wrong picture on a renderer that has no shader stage at all.
Values
| Value | Description |
|---|---|
Standard | Physically based: GGX specular, a diffuse lobe, the environment and every light. |
Unlit | The base colour exactly, with no lighting at all — no key light, no environment, no emissive, occlusion or normal-map term. Alpha included.
|
Toon | Cel shading: the light response is quantised into The specular and environment terms are untouched, so a toon surface still has a highlight and still sits in its scene; it is the direct light that steps. On the CPU renderer the bands come out soft rather than hard, because that renderer lights per vertex and the quantised corners are then interpolated across the triangle — see |
Matcap | The surface is coloured by looking up A matcap is a photograph of a lit sphere, so a mesh wearing one inherits that sphere's material and lighting for nothing. It is what product viewers, CAD previews and model browsers reach for, which is most of what an Avalonia 3D control will spend its life being, and it is the cheapest way to make an untextured mesh look like something. The one thing it is not is lit by the scene: a matcap surface looks the same whatever the lights do, because the lighting is baked into the image. Rotating the camera changes it; moving a lamp does not. |