t-erxleben / marbellous

An interactive marbling tool
Other
1 stars 0 forks source link

Downgrade GLSL version #177

Closed t-erxleben closed 3 years ago

t-erxleben commented 3 years ago

Falling back to the lowest version might fix #144

t-erxleben commented 3 years ago

From the GLSL 1.0 spec:

Indexing of Arrays, Vectors and Matrices
Definition:
constant-index-expressions are a superset of constant-expressions. Constant-index-expressions can include loop indices as defined in Appendix A section 4.
The following are constant-index-expressions:
• Constant expressions
• Loop indices as defined in section 4
• Expressions composed of both of the above
When used as an index, a constant-index-expression must have integral type.

This is kind of annoying. Every color lookup (c[colCode]) would need to be replaced by for(int i = 0; i < clength; ++i) if(i=colCode) some_var = c[i]. I imagine this to be bad for performance. Since arrays in GLSL don't know their length new uniforms would need to be introduced as well.

I am not sure if downgrading is beneficial given this limitation.

What's your opinion @JBenda @dknigs ?

JBenda commented 3 years ago

I don't think so. Have we already tried if #144 still aprars without full es3?

t-erxleben commented 3 years ago

Still a problem :(

t-erxleben commented 3 years ago

We decided to continue using version ES 3.0