mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-24 22:58:08 +00:00
## Summary Add e2e tests for GLSL shader execution ## Changes - **What**: - add test workflows containing GLSL nodes - tests execution, value propagation, error, subgraph handling - adds console warn on invalid shader to surface error and allow test to detect ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11516-tst-add-GLSL-execution-e2e-test-3496d73d36508199a8e0fa341186ee4d) by [Unito](https://www.unito.io)
106 lines
2.5 KiB
JSON
106 lines
2.5 KiB
JSON
{
|
|
"last_node_id": 2,
|
|
"last_link_id": 1,
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"type": "GLSLShader",
|
|
"pos": [400, 200],
|
|
"size": [460, 320],
|
|
"flags": {},
|
|
"order": 1,
|
|
"mode": 0,
|
|
"inputs": [
|
|
{
|
|
"label": "u_float0",
|
|
"localized_name": "floats.u_float0",
|
|
"name": "floats.u_float0",
|
|
"shape": 7,
|
|
"type": "FLOAT",
|
|
"link": 1
|
|
},
|
|
{
|
|
"localized_name": "fragment_shader",
|
|
"name": "fragment_shader",
|
|
"type": "STRING",
|
|
"widget": { "name": "fragment_shader" },
|
|
"link": null
|
|
},
|
|
{
|
|
"localized_name": "size_mode",
|
|
"name": "size_mode",
|
|
"type": "COMFY_DYNAMICCOMBO_V3",
|
|
"widget": { "name": "size_mode" },
|
|
"link": null
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"localized_name": "IMAGE0",
|
|
"name": "IMAGE0",
|
|
"type": "IMAGE",
|
|
"links": null
|
|
},
|
|
{
|
|
"localized_name": "IMAGE1",
|
|
"name": "IMAGE1",
|
|
"type": "IMAGE",
|
|
"links": null
|
|
},
|
|
{
|
|
"localized_name": "IMAGE2",
|
|
"name": "IMAGE2",
|
|
"type": "IMAGE",
|
|
"links": null
|
|
},
|
|
{
|
|
"localized_name": "IMAGE3",
|
|
"name": "IMAGE3",
|
|
"type": "IMAGE",
|
|
"links": null
|
|
}
|
|
],
|
|
"properties": { "Node name for S&R": "GLSLShader" },
|
|
"widgets_values": [
|
|
"#version 300 es\nprecision highp float;\nuniform float u_float0;\nuniform vec2 u_resolution;\nin vec2 v_texCoord;\nlayout(location = 0) out vec4 fragColor0;\nvoid main() {\n fragColor0 = vec4(u_float0, v_texCoord.y, 0.5, 1.0);\n}\n",
|
|
"from_input"
|
|
]
|
|
},
|
|
{
|
|
"id": 2,
|
|
"type": "PrimitiveFloat",
|
|
"pos": [80, 200],
|
|
"size": [270, 58],
|
|
"flags": {},
|
|
"order": 0,
|
|
"mode": 0,
|
|
"inputs": [
|
|
{
|
|
"localized_name": "value",
|
|
"name": "value",
|
|
"type": "FLOAT",
|
|
"widget": { "name": "value" },
|
|
"link": null
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"localized_name": "FLOAT",
|
|
"name": "FLOAT",
|
|
"type": "FLOAT",
|
|
"links": [1]
|
|
}
|
|
],
|
|
"properties": { "Node name for S&R": "PrimitiveFloat" },
|
|
"widgets_values": [0.25]
|
|
}
|
|
],
|
|
"links": [[1, 2, 0, 1, 0, "FLOAT"]],
|
|
"groups": [],
|
|
"config": {},
|
|
"extra": {
|
|
"ds": { "offset": [0, 0], "scale": 1 }
|
|
},
|
|
"version": 0.4
|
|
}
|