DiffuseMaterial

Qualified name: algan.rendering.shaders.materials.DiffuseMaterial

class DiffuseMaterial(color=None, *, emissive=Color([0., 0., 0., 0., 1.]), emissive_intensity=1.0, env_map_intensity=1.0, **kwargs)[source]

Bases: Material

Lambertian (diffuse-only) shading plus emissive.

Methods

get_shader_param_values

Map of {shader_param_name: value} matching this material's shader signature.

shader

MeshLambertMaterial: Lambertian (diffuse-only) lighting plus emissive.

Attributes

applies_color

Whether the material's color should 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, flat_shading=0.0, env_map_intensity=1.0)

MeshLambertMaterial: Lambertian (diffuse-only) lighting plus emissive.

Parameters:
  • light_intensity (float)

  • ambient_light_intensity (float)

  • emissive_intensity (float)

  • flat_shading (float)

  • env_map_intensity (float)