MeshToonMaterial¶
Qualified name: algan.rendering.shaders.materials.MeshToonMaterial
- class MeshToonMaterial(color=None, *, emissive=Color([0., 0., 0., 0., 1.]), emissive_intensity=1.0, bands=3.0, **kwargs)[source]¶
Bases:
MaterialCel-shaded (banded diffuse) material plus emissive.
Three.js drives the bands with
gradientMap; since textures are not sampled, the band count is controlled by the Algan-specificbandsargument (default 3).Methods
Map of
{shader_param_name: value}matching this material's shader signature.MeshToonMaterial: diffuse lighting quantized into flat bands (cel shading).
Attributes
applies_colorWhether the material's
colorshould drive the mob's base color.- get_shader_param_values()[source]¶
Map of
{shader_param_name: value}matching this material’s shader signature. Base materials expose no extra parameters.
- static shader(memory, vertex_location, vertex_normal, albedo_color, camera_location, light_origin, light_color, light_intensity, ambient_light_intensity, emissive=(0.0, 0.0, 0.0), emissive_intensity=1.0, num_bands=3.0, flat_shading=0.0)¶
MeshToonMaterial: diffuse lighting quantized into flat bands (cel shading).
The Three.js
gradientMapis approximated by an evennum_bands-step ramp.- Parameters:
light_intensity (float)
ambient_light_intensity (float)
emissive_intensity (float)
num_bands (float)
flat_shading (float)