Graphics: Make use of shader binding sets

This commit is contained in:
Jérôme Leclercq
2021-06-16 14:47:54 +02:00
parent 5559fe1af7
commit 3cd9172f7a
49 changed files with 592 additions and 792 deletions

View File

@@ -38,13 +38,24 @@ struct ViewerData
eyePosition: vec3<f32>
}
[set(0)]
external
{
[binding(0)] viewerData: uniform<ViewerData>
}
[set(1)]
external
{
[binding(0)] colorTexture: sampler2D<f32>,
[binding(1)] normalTexture: sampler2D<f32>,
[binding(2)] positionTexture: sampler2D<f32>,
[binding(3)] lightParameters: uniform<SpotLight>,
[binding(4)] viewerData: uniform<ViewerData>
}
[set(2)]
external
{
[binding(0)] lightParameters: uniform<SpotLight>,
}
struct FragIn