Compiler bugs
Given this gpu struct:
(defstruct-g material ()
(additive-color :vec3 :accessor additive-color)
(diffuse-color :vec3 :accessor diffuse-color)
(specular-color :vec3 :accessor specular-color)
(specular-exponent :float :accessor specular-exponent)
(background-ammount :float :accessor background-ammount))
Only the call the #'yy
breaks
(varjo::defshader marg ((y material))
(labels ((xx () (additive-color y))
(yy ((x material)) (additive-color x)))
(additive-color y) ;; this works
(xx) ;; so does this
(yy y)) ;; but this doesnt
(v! 0 0 0 0))
Wat?!
In real news I’m catching a good few bugs in varjo today. Can’t wait to squash this one though :p