NazaraEngine/shaders/BasicMaterial/basicmaterial.frag.shaderflow

598 lines
17 KiB
Plaintext

{
"buffers": [
{
"bindingIndex": 0,
"name": "viewerData",
"setIndex": 0,
"structIndex": 2,
"type": "UniformBufferObject"
},
{
"bindingIndex": 0,
"name": "instanceData",
"setIndex": 1,
"structIndex": 1,
"type": "UniformBufferObject"
},
{
"bindingIndex": 0,
"name": "settings",
"setIndex": 2,
"structIndex": 0,
"type": "UniformBufferObject"
}
],
"conditions": [
{
"name": "HAS_DIFFUSE_TEXTURE"
},
{
"name": "HAS_ALPHA_TEXTURE"
},
{
"name": "ALPHA_TEST"
}
],
"connections": [
{
"in_id": "{fc7542b2-5752-4891-98c1-35b498da257b}",
"in_index": 1,
"out_id": "{743930bd-1d81-4d4c-b7ec-175a34838d69}",
"out_index": 0
},
{
"in_id": "{359a78e1-df0d-467f-907e-7bff04a55db5}",
"in_index": 0,
"out_id": "{becdd0d4-2b28-44f5-86c2-2ed6b846326c}",
"out_index": 0
},
{
"in_id": "{359a78e1-df0d-467f-907e-7bff04a55db5}",
"in_index": 3,
"out_id": "{93fdbb4c-bc81-4100-89a9-b465793099b9}",
"out_index": 0
},
{
"in_id": "{7750a050-b116-4e1b-bd89-b194c366d256}",
"in_index": 1,
"out_id": "{ca2c2ac5-39e0-4814-9432-fbf3e20d3cad}",
"out_index": 0
},
{
"in_id": "{bed466d8-5ed0-4e8a-bba7-1c809cb4c3f7}",
"in_index": 1,
"out_id": "{07a43c79-67e2-46b1-87d4-e00d2da22820}",
"out_index": 0
},
{
"in_id": "{6fcfbcd0-c2df-41dd-bb50-74b455b9021f}",
"in_index": 0,
"out_id": "{7750a050-b116-4e1b-bd89-b194c366d256}",
"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": "{be3547ff-0bf3-4701-9c27-c21e9d1322c3}",
"in_index": 0,
"out_id": "{92d95fe0-84f6-4d27-91ea-992d5f73c04e}",
"out_index": 0
},
{
"in_id": "{fc7542b2-5752-4891-98c1-35b498da257b}",
"in_index": 0,
"out_id": "{bb071807-e65e-4c31-acf0-d296efa665fa}",
"out_index": 3
},
{
"in_id": "{92d95fe0-84f6-4d27-91ea-992d5f73c04e}",
"in_index": 0,
"out_id": "{359a78e1-df0d-467f-907e-7bff04a55db5}",
"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": "{becdd0d4-2b28-44f5-86c2-2ed6b846326c}",
"in_index": 0,
"out_id": "{e1f86d56-eb21-4267-9075-e6b0cc875a6d}",
"out_index": 0
},
{
"in_id": "{7750a050-b116-4e1b-bd89-b194c366d256}",
"in_index": 0,
"out_id": "{f9ba0cce-3b85-4f95-a79e-a2f64d955d89}",
"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": "{e1f86d56-eb21-4267-9075-e6b0cc875a6d}",
"in_index": 1,
"out_id": "{07a43c79-67e2-46b1-87d4-e00d2da22820}",
"out_index": 0
},
{
"in_id": "{3cdb5bb1-f572-4055-a1af-460b152b0c13}",
"in_index": 0,
"out_id": "{d7acd173-9188-43b5-bfa1-31f17dff44ad}",
"out_index": 0
},
{
"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": 0,
"out_id": "{bed466d8-5ed0-4e8a-bba7-1c809cb4c3f7}",
"out_index": 0
},
{
"in_id": "{93fdbb4c-bc81-4100-89a9-b465793099b9}",
"in_index": 1,
"out_id": "{becdd0d4-2b28-44f5-86c2-2ed6b846326c}",
"out_index": 3
},
{
"in_id": "{d7acd173-9188-43b5-bfa1-31f17dff44ad}",
"in_index": 0,
"out_id": "{fc7542b2-5752-4891-98c1-35b498da257b}",
"out_index": 0
},
{
"in_id": "{bed466d8-5ed0-4e8a-bba7-1c809cb4c3f7}",
"in_index": 0,
"out_id": "{fbaddbbe-f9cd-4e8d-b7a8-40c10c96f580}",
"out_index": 0
},
{
"in_id": "{92d95fe0-84f6-4d27-91ea-992d5f73c04e}",
"in_index": 1,
"out_id": "{e1f86d56-eb21-4267-9075-e6b0cc875a6d}",
"out_index": 0
},
{
"in_id": "{fbaddbbe-f9cd-4e8d-b7a8-40c10c96f580}",
"in_index": 1,
"out_id": "{5e4c18b3-9a7f-4c0e-abe4-778be151ad06}",
"out_index": 0
},
{
"in_id": "{bb071807-e65e-4c31-acf0-d296efa665fa}",
"in_index": 0,
"out_id": "{92d95fe0-84f6-4d27-91ea-992d5f73c04e}",
"out_index": 0
}
],
"inputs": [
{
"locationIndex": 0,
"name": "vertUV",
"role": "TexCoord",
"roleIndex": 0,
"type": "Float2"
}
],
"nodes": [
{
"id": "{becdd0d4-2b28-44f5-86c2-2ed6b846326c}",
"model": {
"name": "vec_decompose",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 1005.0000000000002,
"y": 201.76
}
},
{
"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": "{ac98a68f-0160-4189-af31-b8278e7c119c}",
"model": {
"name": "Texture",
"preview_enabled": true,
"preview_height": 64,
"preview_width": 64,
"texture": "MaterialDiffuseMap",
"variable_name": ""
},
"position": {
"x": -10.194444444444457,
"y": 445
}
},
{
"id": "{be3547ff-0bf3-4701-9c27-c21e9d1322c3}",
"model": {
"name": "Output",
"output": "RenderTarget0",
"preview_enabled": true,
"preview_height": 128,
"preview_width": 128,
"variable_name": ""
},
"position": {
"x": 2598.5,
"y": 293.33333333333326
}
},
{
"id": "{93fdbb4c-bc81-4100-89a9-b465793099b9}",
"model": {
"name": "float_mul",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 1209.686666666667,
"y": 316.4066666666666
}
},
{
"id": "{bed466d8-5ed0-4e8a-bba7-1c809cb4c3f7}",
"model": {
"name": "vec_mul",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 377.1388888888888,
"y": 507.83333333333337
}
},
{
"id": "{07a43c79-67e2-46b1-87d4-e00d2da22820}",
"model": {
"buffer": "settings",
"field": "DiffuseColor",
"name": "BufferField",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 135.11111111111126,
"y": 643.5277777777775
}
},
{
"id": "{e1f86d56-eb21-4267-9075-e6b0cc875a6d}",
"model": {
"condition_name": "HAS_DIFFUSE_TEXTURE",
"name": "ConditionalExpression",
"preview_enabled": true,
"preview_height": 128,
"preview_width": 128,
"variable_name": ""
},
"position": {
"x": 602.5,
"y": 566.5
}
},
{
"id": "{ca2c2ac5-39e0-4814-9432-fbf3e20d3cad}",
"model": {
"input": "vertUV",
"name": "Input",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 646.0466666666667,
"y": 47.54000000000002
}
},
{
"id": "{f9ba0cce-3b85-4f95-a79e-a2f64d955d89}",
"model": {
"name": "Texture",
"preview_enabled": true,
"preview_height": 64,
"preview_width": 64,
"texture": "MaterialAlphaMap",
"variable_name": ""
},
"position": {
"x": 592.2799999999996,
"y": -30.780000000000058
}
},
{
"id": "{7750a050-b116-4e1b-bd89-b194c366d256}",
"model": {
"name": "SampleTexture",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 819.5933333333332,
"y": 6.606666666666669
}
},
{
"id": "{6fcfbcd0-c2df-41dd-bb50-74b455b9021f}",
"model": {
"name": "vec_decompose",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 1011.3799999999998,
"y": 21.560000000000016
}
},
{
"id": "{359a78e1-df0d-467f-907e-7bff04a55db5}",
"model": {
"name": "vec_compose4",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 1373.82,
"y": 198.09999999999997
}
},
{
"id": "{92d95fe0-84f6-4d27-91ea-992d5f73c04e}",
"model": {
"condition_name": "HAS_ALPHA_TEXTURE",
"name": "ConditionalExpression",
"preview_enabled": true,
"preview_height": 128,
"preview_width": 128,
"variable_name": ""
},
"position": {
"x": 1619.8933333333334,
"y": 447.44000000000005
}
},
{
"id": "{bb071807-e65e-4c31-acf0-d296efa665fa}",
"model": {
"name": "vec_decompose",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 2270,
"y": 67
}
},
{
"id": "{3cdb5bb1-f572-4055-a1af-460b152b0c13}",
"model": {
"name": "Discard",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 2694,
"y": 4
}
},
{
"id": "{d7acd173-9188-43b5-bfa1-31f17dff44ad}",
"model": {
"condition_name": "ALPHA_TEST",
"name": "ConditionalExpression",
"preview_enabled": true,
"preview_height": 128,
"preview_width": 128,
"variable_name": ""
},
"position": {
"x": 2240,
"y": -174
}
},
{
"id": "{1f9d52d7-4f44-4d96-8edb-fbc1239a93bb}",
"model": {
"name": "bool_constant",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"value": false,
"variable_name": ""
},
"position": {
"x": 2005,
"y": -99
}
},
{
"id": "{fc7542b2-5752-4891-98c1-35b498da257b}",
"model": {
"name": "float_lt",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 2000,
"y": -241
}
},
{
"id": "{743930bd-1d81-4d4c-b7ec-175a34838d69}",
"model": {
"buffer": "settings",
"field": "AlphaThreshold",
"name": "BufferField",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": 1675,
"y": -254
}
},
{
"id": "{5e4c18b3-9a7f-4c0e-abe4-778be151ad06}",
"model": {
"input": "vertUV",
"name": "Input",
"preview_enabled": false,
"preview_height": 64,
"preview_width": 64,
"variable_name": ""
},
"position": {
"x": -5,
"y": 542
}
}
],
"outputs": [
{
"locationIndex": 0,
"name": "RenderTarget0",
"type": "Float4"
}
],
"structs": [
{
"members": [
{
"name": "AlphaThreshold",
"type": "Float"
},
{
"name": "DiffuseColor",
"type": "Float4"
}
],
"name": "BasicSettings"
},
{
"members": [
{
"name": "worldMatrix",
"type": "Mat4x4"
},
{
"name": "invWorldMatrix",
"type": "Mat4x4"
}
],
"name": "InstanceData"
},
{
"members": [
{
"name": "projectionMatrix",
"type": "Mat4x4"
},
{
"name": "invProjectionMatrix",
"type": "Mat4x4"
},
{
"name": "viewMatrix",
"type": "Mat4x4"
},
{
"name": "invViewMatrix",
"type": "Mat4x4"
},
{
"name": "viewProjMatrix",
"type": "Mat4x4"
},
{
"name": "invViewProjMatrix",
"type": "Mat4x4"
},
{
"name": "renderTargetSize",
"type": "Float2"
},
{
"name": "invRenderTargetSize",
"type": "Float2"
},
{
"name": "eyePosition",
"type": "Float3"
}
],
"name": "ViewerData"
}
],
"textures": [
{
"bindingIndex": 2,
"name": "MaterialAlphaMap",
"setIndex": 2,
"type": "Sampler2D"
},
{
"bindingIndex": 1,
"name": "MaterialDiffuseMap",
"setIndex": 2,
"type": "Sampler2D"
}
],
"type": "Fragment"
}