kovasb / gamma

glsl shaders made simple
Eclipse Public License 1.0
306 stars 20 forks source link

Warn/Error on identical input variables #23

Open sgrove opened 9 years ago

sgrove commented 9 years ago

This one is tough, and may not be easily solvable, but I just lost a lot of time to copy/pasting some code without updating the id...

(def a-position
  (g/attribute "aVertexPosition" :vec3))

(def a-offset
  (g/attribute "aVertexPosition" :vec3))

I thought my shader (which used both a-position and a-offset) took two inputs, but obviously only took one - didn't realize it until I looked at the generated glsl and then the program inputs.

Not sure how to fix this one, but seems likely to be a source of confusion and pain down the road.