varjo
varjo copied to clipboard
Trying to pass bvecs between stages can cause issues. Real issue we need to check cross stage types
;;;; fragment shader
;; this:
(let ((color (texture (image tex) uv)))
(if (< (.x gl-frag-coord) 400)
(bvec4 nil nil nil t)
color))
;; translates to:
void main()
{
vec4 COLOR = texture(TEX.IMAGE,v_in._GEOMETRY_STAGE_OUT_0);
if ((gl_FragCoord.x < 400))
{
bvec4(false,false,false,true);
}
else
{
COLOR;
}
<invalid> g_GEXPR0_3956 = NIL;
_FRAGMENT_STAGE_OUT_0 = g_GEXPR0_3956;
return;
}"
;; glsl compile log:
0(26) : error C0000: syntax error, unexpected '<', expecting "::" at token "<"
0(51) : error C0000: syntax error, unexpected '<' at token "<"
[Condition of type SIMPLE-ERROR]