varjo
varjo copied to clipboard
block array passed to emit causes flow-id error
this code
(glsl-code
(translate
(make-stage :geometry '((pos (:vec2 1)) (id (:int 1))) nil '(:450)
'((declare (output-primitive :kind :triangle-strip :max-vertices 6))
(let* ((size 0.03)
(hsize (* size 0.5)))
(emit () (v! (+ (aref pos 0) (v! (- hsize) hsize)) 0 1)
(v! 0 1)
id)
(emit () (v! (+ (aref pos 0) (v! (- hsize) (- hsize))) 0 1)
(v! 0 0)
id)
(emit () (v! (+ (aref pos 0) (v! hsize (- hsize))) 0 1)
(v! 1 0)
id)
(end-primitive)
(emit () (v! (+ (aref pos 0) (v! (- hsize) hsize)) 0 1)
(v! 0 1)
id)
(emit () (v! (+ (aref pos 0) (v! hsize (- hsize))) 0 1)
(v! 1 0)
id)
(emit () (v! (+ (aref pos 0) (v! hsize hsize)) 0 1)
(v! 1 1)
id)
(end-primitive)
(values)))
nil :triangles)))
gives this
Varjo: compiled object must be given flow id/s when created: type - #(VARJO:V-VEC2
(VARJO::V-BLOCK-ARRAY
"v_in"
VARJO:V-INT
(1)))
[Condition of type VARJO-CONDITIONS:FLOW-IDS-MANDATORY]