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

@@ -1,20 +1,23 @@
{
"buffers": [
{
"bindingIndex": 5,
"bindingIndex": 0,
"name": "viewerData",
"setIndex": 0,
"structIndex": 2,
"type": "UniformBufferObject"
},
{
"bindingIndex": 4,
"bindingIndex": 0,
"name": "instanceData",
"setIndex": 1,
"structIndex": 1,
"type": "UniformBufferObject"
},
{
"bindingIndex": 3,
"bindingIndex": 0,
"name": "settings",
"setIndex": 2,
"structIndex": 0,
"type": "UniformBufferObject"
}
@@ -43,12 +46,30 @@
"out_id": "{becdd0d4-2b28-44f5-86c2-2ed6b846326c}",
"out_index": 0
},
{
"in_id": "{92d95fe0-84f6-4d27-91ea-992d5f73c04e}",
"in_index": 1,
"out_id": "{f5a6874b-0559-4fd1-9836-27567f9696a4}",
"out_index": 0
},
{
"in_id": "{92d95fe0-84f6-4d27-91ea-992d5f73c04e}",
"in_index": 0,
"out_id": "{359a78e1-df0d-467f-907e-7bff04a55db5}",
"out_index": 0
},
{
"in_id": "{93fdbb4c-bc81-4100-89a9-b465793099b9}",
"in_index": 0,
"out_id": "{6fcfbcd0-c2df-41dd-bb50-74b455b9021f}",
"out_index": 0
},
{
"in_id": "{359a78e1-df0d-467f-907e-7bff04a55db5}",
"in_index": 1,
"out_id": "{becdd0d4-2b28-44f5-86c2-2ed6b846326c}",
"out_index": 1
},
{
"in_id": "{bed466d8-5ed0-4e8a-bba7-1c809cb4c3f7}",
"in_index": 1,
@@ -56,9 +77,21 @@
"out_index": 0
},
{
"in_id": "{93fdbb4c-bc81-4100-89a9-b465793099b9}",
"in_id": "{fc7542b2-5752-4891-98c1-35b498da257b}",
"in_index": 0,
"out_id": "{6fcfbcd0-c2df-41dd-bb50-74b455b9021f}",
"out_id": "{bb071807-e65e-4c31-acf0-d296efa665fa}",
"out_index": 3
},
{
"in_id": "{d7acd173-9188-43b5-bfa1-31f17dff44ad}",
"in_index": 1,
"out_id": "{1f9d52d7-4f44-4d96-8edb-fbc1239a93bb}",
"out_index": 0
},
{
"in_id": "{7750a050-b116-4e1b-bd89-b194c366d256}",
"in_index": 1,
"out_id": "{ca2c2ac5-39e0-4814-9432-fbf3e20d3cad}",
"out_index": 0
},
{
@@ -74,9 +107,15 @@
"out_index": 0
},
{
"in_id": "{92d95fe0-84f6-4d27-91ea-992d5f73c04e}",
"in_id": "{fbaddbbe-f9cd-4e8d-b7a8-40c10c96f580}",
"in_index": 0,
"out_id": "{ac98a68f-0160-4189-af31-b8278e7c119c}",
"out_index": 0
},
{
"in_id": "{e1f86d56-eb21-4267-9075-e6b0cc875a6d}",
"in_index": 1,
"out_id": "{f5a6874b-0559-4fd1-9836-27567f9696a4}",
"out_id": "{07a43c79-67e2-46b1-87d4-e00d2da22820}",
"out_index": 0
},
{
@@ -98,21 +137,9 @@
"out_index": 3
},
{
"in_id": "{359a78e1-df0d-467f-907e-7bff04a55db5}",
"in_index": 2,
"out_id": "{becdd0d4-2b28-44f5-86c2-2ed6b846326c}",
"out_index": 2
},
{
"in_id": "{fbaddbbe-f9cd-4e8d-b7a8-40c10c96f580}",
"in_id": "{d7acd173-9188-43b5-bfa1-31f17dff44ad}",
"in_index": 0,
"out_id": "{ac98a68f-0160-4189-af31-b8278e7c119c}",
"out_index": 0
},
{
"in_id": "{7750a050-b116-4e1b-bd89-b194c366d256}",
"in_index": 1,
"out_id": "{ca2c2ac5-39e0-4814-9432-fbf3e20d3cad}",
"out_id": "{fc7542b2-5752-4891-98c1-35b498da257b}",
"out_index": 0
},
{
@@ -121,36 +148,24 @@
"out_id": "{d7acd173-9188-43b5-bfa1-31f17dff44ad}",
"out_index": 0
},
{
"in_id": "{359a78e1-df0d-467f-907e-7bff04a55db5}",
"in_index": 2,
"out_id": "{becdd0d4-2b28-44f5-86c2-2ed6b846326c}",
"out_index": 2
},
{
"in_id": "{cf0ae20a-88cd-4788-9ed7-eaf014d8f971}",
"in_index": 0,
"out_id": "{c41cd67b-2f34-4ec4-acc6-2f7285e7c6e3}",
"out_index": 0
},
{
"in_id": "{e1f86d56-eb21-4267-9075-e6b0cc875a6d}",
"in_index": 1,
"out_id": "{07a43c79-67e2-46b1-87d4-e00d2da22820}",
"out_index": 0
},
{
"in_id": "{359a78e1-df0d-467f-907e-7bff04a55db5}",
"in_index": 1,
"out_id": "{becdd0d4-2b28-44f5-86c2-2ed6b846326c}",
"out_index": 1
},
{
"in_id": "{fbaddbbe-f9cd-4e8d-b7a8-40c10c96f580}",
"in_index": 1,
"out_id": "{db10f064-504d-4072-a49e-51a061b2efbe}",
"out_index": 0
},
{
"in_id": "{d7acd173-9188-43b5-bfa1-31f17dff44ad}",
"in_index": 1,
"out_id": "{1f9d52d7-4f44-4d96-8edb-fbc1239a93bb}",
"out_index": 0
},
{
"in_id": "{bed466d8-5ed0-4e8a-bba7-1c809cb4c3f7}",
"in_index": 0,
@@ -187,23 +202,11 @@
"out_id": "{7750a050-b116-4e1b-bd89-b194c366d256}",
"out_index": 0
},
{
"in_id": "{d7acd173-9188-43b5-bfa1-31f17dff44ad}",
"in_index": 0,
"out_id": "{fc7542b2-5752-4891-98c1-35b498da257b}",
"out_index": 0
},
{
"in_id": "{fc7542b2-5752-4891-98c1-35b498da257b}",
"in_index": 1,
"out_id": "{743930bd-1d81-4d4c-b7ec-175a34838d69}",
"out_index": 0
},
{
"in_id": "{fc7542b2-5752-4891-98c1-35b498da257b}",
"in_index": 0,
"out_id": "{bb071807-e65e-4c31-acf0-d296efa665fa}",
"out_index": 3
}
],
"inputs": [
@@ -671,18 +674,15 @@
],
"textures": [
{
"bindingIndex": 0,
"bindingIndex": 2,
"name": "MaterialAlphaMap",
"setIndex": 2,
"type": "Sampler2D"
},
{
"bindingIndex": 1,
"name": "MaterialDiffuseMap",
"type": "Sampler2D"
},
{
"bindingIndex": 2,
"name": "TextureOverlay",
"setIndex": 2,
"type": "Sampler2D"
}
],

View File

@@ -1,20 +1,23 @@
{
"buffers": [
{
"bindingIndex": 5,
"bindingIndex": 0,
"name": "viewerData",
"setIndex": 0,
"structIndex": 2,
"type": "UniformBufferObject"
},
{
"bindingIndex": 4,
"bindingIndex": 0,
"name": "instanceData",
"setIndex": 1,
"structIndex": 1,
"type": "UniformBufferObject"
},
{
"bindingIndex": 3,
"bindingIndex": 0,
"name": "settings",
"setIndex": 2,
"structIndex": 0,
"type": "UniformBufferObject"
}
@@ -46,6 +49,12 @@
"out_id": "{33840c70-4e37-4127-bab0-23c4a4cb6d7f}",
"out_index": 0
},
{
"in_id": "{0fc53363-dbce-4874-8de5-5ca05ae038b7}",
"in_index": 0,
"out_id": "{412684ce-0ec2-4db5-964c-10e5b68d43e8}",
"out_index": 0
},
{
"in_id": "{63bb13f0-55e3-451b-860e-568b65e09b04}",
"in_index": 0,
@@ -58,12 +67,6 @@
"out_id": "{c3b906bc-d230-4026-a32e-34c00eaf4481}",
"out_index": 0
},
{
"in_id": "{d8f4d14a-c67a-470f-87bf-8f60d9513c3b}",
"in_index": 0,
"out_id": "{d32dfb1d-c8a4-4315-a710-90d2a51f68e8}",
"out_index": 0
},
{
"in_id": "{1bb9712b-8bff-4398-9e4e-fba79a04df0e}",
"in_index": 0,
@@ -71,9 +74,9 @@
"out_index": 0
},
{
"in_id": "{0fc53363-dbce-4874-8de5-5ca05ae038b7}",
"in_id": "{d8f4d14a-c67a-470f-87bf-8f60d9513c3b}",
"in_index": 0,
"out_id": "{412684ce-0ec2-4db5-964c-10e5b68d43e8}",
"out_id": "{d32dfb1d-c8a4-4315-a710-90d2a51f68e8}",
"out_index": 0
},
{

View File

@@ -1,113 +0,0 @@
{
"buffers": [
],
"conditions": [
],
"connections": [
{
"in_id": "{fbaddbbe-f9cd-4e8d-b7a8-40c10c96f580}",
"in_index": 1,
"out_id": "{db10f064-504d-4072-a49e-51a061b2efbe}",
"out_index": 0
},
{
"in_id": "{fbaddbbe-f9cd-4e8d-b7a8-40c10c96f580}",
"in_index": 0,
"out_id": "{04c30f54-5492-4b70-99fd-d6fe96c023e4}",
"out_index": 0
},
{
"in_id": "{38c8bbb6-6c85-49ff-abfa-e409bf0393ef}",
"in_index": 0,
"out_id": "{fbaddbbe-f9cd-4e8d-b7a8-40c10c96f580}",
"out_index": 0
}
],
"inputs": [
{
"locationIndex": 0,
"name": "vertUV",
"role": "TexCoord",
"roleIndex": 0,
"type": "Float2"
}
],
"nodes": [
{
"id": "{fbaddbbe-f9cd-4e8d-b7a8-40c10c96f580}",
"model": {
"name": "SampleTexture",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 167.75,
"y": 473.97222222222194
}
},
{
"id": "{db10f064-504d-4072-a49e-51a061b2efbe}",
"model": {
"input": "vertUV",
"name": "Input",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": -0.19444444444445708,
"y": 554.0000000000001
}
},
{
"id": "{04c30f54-5492-4b70-99fd-d6fe96c023e4}",
"model": {
"name": "Texture",
"preview_enabled": true,
"preview_height": 64,
"preview_width": 64,
"texture": "Texture",
"variable_name": ""
},
"position": {
"x": 21.666666666666668,
"y": 475
}
},
{
"id": "{38c8bbb6-6c85-49ff-abfa-e409bf0393ef}",
"model": {
"name": "Output",
"output": "RenderTarget0",
"preview_enabled": true,
"preview_height": 128,
"preview_width": 128,
"variable_name": ""
},
"position": {
"x": 343,
"y": 482
}
}
],
"outputs": [
{
"locationIndex": 0,
"name": "RenderTarget0",
"type": "Float4"
}
],
"structs": [
],
"textures": [
{
"bindingIndex": 0,
"name": "Texture",
"type": "Sampler2D"
}
],
"type": "Fragment"
}

View File

@@ -1,135 +0,0 @@
{
"buffers": [
],
"conditions": [
],
"connections": [
{
"in_id": "{7ac65f09-7f55-4a6e-9380-1bee5213f079}",
"in_index": 0,
"out_id": "{c3b906bc-d230-4026-a32e-34c00eaf4481}",
"out_index": 0
},
{
"in_id": "{63bb13f0-55e3-451b-860e-568b65e09b04}",
"in_index": 0,
"out_id": "{7ac65f09-7f55-4a6e-9380-1bee5213f079}",
"out_index": 0
},
{
"in_id": "{f8e2a7b7-6780-4014-a803-34020084ceed}",
"in_index": 0,
"out_id": "{6d6b0d04-46ea-4f5f-8e0b-0502adfdc149}",
"out_index": 0
}
],
"inputs": [
{
"locationIndex": 0,
"name": "inPos",
"role": "Position",
"roleIndex": 0,
"type": "Float3"
},
{
"locationIndex": 1,
"name": "inTexCoord",
"role": "TexCoord",
"roleIndex": 0,
"type": "Float2"
}
],
"nodes": [
{
"id": "{c3b906bc-d230-4026-a32e-34c00eaf4481}",
"model": {
"input": "inPos",
"name": "Input",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 216.49999999999997,
"y": 664.1666666666667
}
},
{
"id": "{7ac65f09-7f55-4a6e-9380-1bee5213f079}",
"model": {
"name": "cast_vec4",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"value": [
1,
0,
0,
0
],
"variable_name": ""
},
"position": {
"x": 345,
"y": 668
}
},
{
"id": "{63bb13f0-55e3-451b-860e-568b65e09b04}",
"model": {
"name": "PositionOutputValue",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 521.6666666666667,
"y": 668.1666666666667
}
},
{
"id": "{6d6b0d04-46ea-4f5f-8e0b-0502adfdc149}",
"model": {
"input": "inTexCoord",
"name": "Input",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 208.33333333333334,
"y": 761.666666666667
}
},
{
"id": "{f8e2a7b7-6780-4014-a803-34020084ceed}",
"model": {
"name": "Output",
"output": "vertUV",
"preview_enabled": false,
"preview_height": 128,
"preview_width": 128,
"variable_name": ""
},
"position": {
"x": 492.5,
"y": 765
}
}
],
"outputs": [
{
"locationIndex": 0,
"name": "vertUV",
"type": "Float2"
}
],
"structs": [
],
"textures": [
],
"type": "Vertex"
}