artgl
artgl copied to clipboard
Design a mechnism for sharing uniform inputnode between the shader unform provider
Obviously global uniform map in engine is a bad design. Engine hold a camera that maintain the global map is a bad design too. As we cant share the uniform input node between the uniform decorator, so Its a workaround.
Camera should be a shadergraph decorator that decorate the vertex graph with it s projection matrix. But the uniform should could be used by other decorator/ provider. Maybe a solution is design a shared uniform map in shadergraph, just like engine's, but not as global as that.
To decoupling the name resolve issues. We can just define the related name on their static porperty. KISS
impled , but still have space for improve