whatchu want?
The nature of controlling uniforms is difficult, as we MUST know what they are before compiling, to solve this perhaps we can just slap in say, 5 or 10 of EVERY type we can pass to a uniform, then let a user control those via a small node-esk GUI at runtime.
Imagine the system much like how UnrealEngine's blueprint system lets you create Blueprints, you select a data-type (int/float/array etc) then you label it with some String (that we could just have be anything on the backend).
Toggling an editor? key a user could then update this value, which we'd capture to update the resource and pass it down to the shader.
NOTE: the bad thing about this is that it'd bloat our default shader code quite considerably :(, I don't see a good way around this as the import xyzs must be compiled in from the app's source (not assets), and they, as a result of that will not be hot-reloaded when changed.
[] Create the appearance of being able to 'add a uniform at runtime' that's actually just repurposing an existing bound uniform that we've prepared earlier.
[] Have these labelled uniforms adjustable at runtime.
whatchu want? The nature of controlling uniforms is difficult, as we MUST know what they are before compiling, to solve this perhaps we can just slap in say, 5 or 10 of EVERY type we can pass to a uniform, then let a user control those via a small node-esk GUI at runtime.
Imagine the system much like how UnrealEngine's blueprint system lets you create Blueprints, you select a data-type (int/float/array etc) then you label it with some String (that we could just have be anything on the backend).
Toggling an
editor?
key a user could then update this value, which we'd capture to update the resource and pass it down to the shader.