robrix / ui-effects

An experiment towards a UI programming model inspired by algebraic effects.
BSD 3-Clause "New" or "Revised" License
30 stars 1 forks source link

Shader compilation is fragile #26

Open robrix opened 8 years ago

robrix commented 8 years ago

It’s pretty easy to end up with stuff that doesn’t produce valid GLSL because of e.g. a ShaderF constructor with poorly-defined semantics.

robrix commented 8 years ago

Part of the problem here is that we have two different shading languages (a functional surface language which you write shaders in, and an imperative core language which the surface language compiles to) represented in a single ShaderF type.

Distinct surface and core languages would allow us to keep the core language relatively stable while adding features to the surface language.

I think this would also help #24.