" (parameters\n"
" (declare (in) vec2 arg0)\n"
" (declare (in) float arg1))\n"
- " ((declare () vec2 result)\n"
- " (assign (constant bool (1)) (swiz x (var_ref result))\n"
- " (expression float % (swiz x (var_ref arg0)) (var_ref arg1)))\n"
- " (assign (constant bool (1)) (swiz y (var_ref result))\n"
- " (expression float % (swiz y (var_ref arg0)) (var_ref arg1)))\n"
- " (return (var_ref result))))\n"
+ " ((return (expression vec2 % (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature vec3\n"
" (parameters\n"
" (declare (in) vec3 arg0)\n"
" (declare (in) float arg1))\n"
- " ((declare () vec3 result)\n"
- " (assign (constant bool (1)) (swiz x (var_ref result))\n"
- " (expression float % (swiz x (var_ref arg0)) (var_ref arg1)))\n"
- " (assign (constant bool (1)) (swiz y (var_ref result))\n"
- " (expression float % (swiz y (var_ref arg0)) (var_ref arg1)))\n"
- " (assign (constant bool (1)) (swiz z (var_ref result))\n"
- " (expression float % (swiz z (var_ref arg0)) (var_ref arg1)))\n"
- " (return (var_ref result))))\n"
+ " ((return (expression vec3 % (var_ref arg0) (var_ref arg1)))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) vec4 arg0)\n"
" (declare (in) float arg1))\n"
- " ((declare () vec4 result)\n"
- " (assign (constant bool (1)) (swiz x (var_ref result))\n"
- " (expression float % (swiz x (var_ref arg0)) (var_ref arg1)))\n"
- " (assign (constant bool (1)) (swiz y (var_ref result))\n"
- " (expression float % (swiz y (var_ref arg0)) (var_ref arg1)))\n"
- " (assign (constant bool (1)) (swiz z (var_ref result))\n"
- " (expression float % (swiz z (var_ref arg0)) (var_ref arg1)))\n"
- " (assign (constant bool (1)) (swiz w (var_ref result))\n"
- " (expression float % (swiz w (var_ref arg0)) (var_ref arg1)))\n"
- " (return (var_ref result))))\n"
+ " ((return (expression vec4 % (var_ref arg0) (var_ref arg1)))))\n"
"))\n"
};
"))\n"
};
+static const char *builtins_130_mix = {
+ "((function mix\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float v1)\n"
+ " (declare (in) float v2)\n"
+ " (declare (in) bool a))\n"
+ " ((assign (var_ref a) (var_ref v1) (var_ref v2))\n"
+ " (return (var_ref v1))))\n"
+ "\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in) vec2 v1)\n"
+ " (declare (in) vec2 v2)\n"
+ " (declare (in) bvec2 a))\n"
+ " ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))\n"
+ " (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))\n"
+ " (return (var_ref v1))))\n"
+ "\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 v1)\n"
+ " (declare (in) vec3 v2)\n"
+ " (declare (in) bvec3 a))\n"
+ " ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))\n"
+ " (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))\n"
+ " (assign (swiz z (var_ref a)) (swiz z (var_ref v1)) (swiz z (var_ref v2)))\n"
+ " (return (var_ref v1))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) vec4 v1)\n"
+ " (declare (in) vec4 v2)\n"
+ " (declare (in) bvec4 a))\n"
+ " ((assign (swiz x (var_ref a)) (swiz x (var_ref v1)) (swiz x (var_ref v2)))\n"
+ " (assign (swiz y (var_ref a)) (swiz y (var_ref v1)) (swiz y (var_ref v2)))\n"
+ " (assign (swiz z (var_ref a)) (swiz z (var_ref v1)) (swiz z (var_ref v2)))\n"
+ " (assign (swiz w (var_ref a)) (swiz w (var_ref v1)) (swiz w (var_ref v2)))\n"
+ " (return (var_ref v1))))\n"
+ "))\n"
+};
+
static const char *builtins_130_notEqual = {
"((function notEqual\n"
" (signature bvec2\n"
" (signature int\n"
" (parameters\n"
" (declare (in) int x))\n"
- " ((return (expression int / (var_ref x) (expression int abs (var_ref x))))))\n"
+ " ((return (expression int sign (var_ref x)))))\n"
"\n"
" (signature ivec2\n"
" (parameters\n"
builtins_130_lessThanEqual,
builtins_130_max,
builtins_130_min,
+ builtins_130_mix,
builtins_130_notEqual,
builtins_130_sign,
builtins_130_sinh,