PBRMaterial¶
Qualified name: algan.rendering.shaders.materials.PBRMaterial
- class PBRMaterial(color=None, *, roughness=1.0, metalness=0.0, emissive=Color([0., 0., 0., 0., 1.]), emissive_intensity=1.0, env_map_intensity=1.0, **kwargs)[source]¶
Bases:
MaterialMetalness/roughness physically-based (Cook-Torrance) material.
Methods
Map of
{shader_param_name: value}matching this material's shader signature.MeshStandardMaterial: metalness/roughness Cook-Torrance PBR + emissive.
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, roughness=1.0, metalness=0.0, emissive=(0.0, 0.0, 0.0), emissive_intensity=1.0, env_map_intensity=1.0, flat_shading=0.0)¶
MeshStandardMaterial: metalness/roughness Cook-Torrance PBR + emissive.
Implements the GGX NDF, Smith geometry and Schlick Fresnel terms. The image-based environment reflection of the GLSL material is approximated by a constant ambient term scaled by
env_map_intensity.- Parameters:
light_intensity (float)
ambient_light_intensity (float)
roughness (float)
metalness (float)
emissive_intensity (float)
env_map_intensity (float)
flat_shading (float)