3 ms·
some precision here: I said "abuse" because it is still a hack to use only one plain GLSL fragment for everything (a fragment shader aims to be used with a ver
by gren 14y ago
some precision here:
I said "abuse" because it is still a hack to use only one plain GLSL fragment for everything (a fragment shader aims to be used with a vertex shader, whereas mine is just static and take one vertex for the whole canvas). BTW, the glsl.heroku.com demoscene platform use exactly the same idea and was an inspiration.
The limit of this hack, is the fact that GLSL fragment uniforms number is limited (depending on the machine, 1024 variables on my macbook).
For instance, a `Ball ball[1000]` wouldn't compile because it is too much variables (if Ball has 2 fields). AFAIK, you could still solve this by using a big Array of float, but it would be less structured then.