OK, I got it mostly working, however I think I'm in a spot of trouble. @R0j0hound if you have any ideas that would be fantastic.
My shader has a for loop that loops from a specific value to a specific value. e.g.
- Code: Select all
for (int i = START_VALUE; i < END_VALUE; i++)
In shadertoy, these were just set with consts and life was good. However, it's problematic in C2. Basically, I want to be able to see these loop values at edit-time, presumably via an effect parameter. However GLSL simply will not allow you to use non const loop values at all, even if they are in reality constant.
The reason these need to be set at edit time is that I will need a few instances of this shader, all with different loop values.
Ugh, I have a feeling this won't be possible without an addition to C2's effect system
EDIT: I suppose I could use something like this hack
, but I have a bad feeling that on some hardware I'd pay dearly