kMaterialInputs top-level constant

List<MaterialInput> const kMaterialInputs

Every input, and the single list of them.

The software backend's evaluator has to know each one by name, and a test walks this list to check that it does — a backend that silently returned zero for an input it had not heard of would draw a material that is subtly wrong on one backend only.

Implementation

const List<MaterialInput> kMaterialInputs = <MaterialInput>[
  MaterialInput('albedo', MaterialType.vec3, 's.albedo'),
  MaterialInput('alpha', MaterialType.float, 's.alpha'),
  MaterialInput('normal', MaterialType.vec3, 's.n'),
  MaterialInput('view', MaterialType.vec3, 's.v'),
  MaterialInput('nDotV', MaterialType.float, 's.n_dot_v'),
  MaterialInput('metallic', MaterialType.float, 's.metallic'),
  MaterialInput('roughness', MaterialType.float, 's.roughness'),
  MaterialInput('occlusion', MaterialType.float, 's.occlusion'),
  MaterialInput('emissive', MaterialType.vec3, 's.emissive'),
  MaterialInput('ambient', MaterialType.vec3, 's.ambient'),
  MaterialInput('uv', MaterialType.vec2, 'v_texcoord'),
  MaterialInput('world', MaterialType.vec3, 'v_world_position'),
];