Log inGet started
Package

cel_shaded.material

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

Cel Shaded

A stylised, toon-shaded opaque surface built on @builtin::shaders.extended_material, with a warm red-orange base colour (0.9, 0.3, 0.2). The sun's light is cut into flat bands that multiply the base colour, so every band renders the hue of base_color and only its brightness steps; ambient light lifts the side facing away from the sun in the same hue. High roughness (0.8) keeps the surface matte: its specular term stays below the first band, so each lit band is one flat colour.

Inputs

  • colors.base_color: the surface colour every band renders in, multiplied by base_color_texture.
  • floats.roughness (0.8): the size and strength of the specular highlight, which is banded with the rest of the sun's light; 0 is a small bright highlight. At four bands, a roughness of 0.5 or more keeps the highlight below the first band, so none shows.
  • floats.quantize_steps (4): the number of bands the sun's light is cut into; 0 shades smoothly.
  • textures.base_color_texture: an optional surface texture, drawn multiplied by base_color. Unset, it is white, and the surface renders base_color alone.

Clouds, smoke, fire and fog in the same style

This material styles surfaces. The volumetric media are styled through the lightResponse field of their components (VolumetricSky, Smoke, Fire, Volume, ParticipatingMedium): a .shaderModule that bands their light in flat tones, draws a hard silhouette and cuts a flame into flat bands. @builtin::systems.volumetrics.shaders.medium_light's README states what a response defines.