Bindings
@group(constants::MATERIAL_BIND_GROUP)
@binding(0)
var<storage>
material_indices:
array<CustomMaterialBindings>
@group(constants::MATERIAL_BIND_GROUP)
@binding(4)
var<storage>
material_data:
binding_array<CustomMaterialDataArray>
@group(constants::MATERIAL_BIND_GROUP)
@binding(1)
var<storage>
material_data:
CustomMaterialDataArray
Structures
We need to declare this type because
binding_array<array<CustomMaterialData>> isn’t currently accepted by Naga.
We have to factor the array<CustomMaterialData> out into a separate type.
The custom data that we extract from the ECS and expose to this shader.