kMaterialTextureBindings top-level constant

List<String> const kMaterialTextureBindings

What the engine binds, and therefore the only names a texture declaration may point at.

A material cannot invent a slot: the renderer binds textures by these names and a name it does not know reaches the GPU as a missing sampler, which on Metal is a crash rather than a black texture. The list is short because the set really is that small — surface.glsl declares them.

Implementation

const List<String> kMaterialTextureBindings = <String>[
  'base_color_texture',
  'normal_texture',
  'occlusion_texture',
  'emissive_texture',
  'metallic_roughness_texture',
];