+++ /dev/null
-((function abs
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float abs (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 abs (var_ref arg0)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 abs (var_ref arg0)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 abs (var_ref arg0)))))
-
- (signature int
- (parameters
- (declare (in) int arg0))
- ((return (expression int abs (var_ref arg0)))))
-
- (signature ivec2
- (parameters
- (declare (in) ivec2 arg0))
- ((return (expression ivec2 abs (var_ref arg0)))))
-
- (signature ivec3
- (parameters
- (declare (in) ivec3 arg0))
- ((return (expression ivec3 abs (var_ref arg0)))))
-
- (signature ivec4
- (parameters
- (declare (in) ivec4 arg0))
- ((return (expression ivec4 abs (var_ref arg0)))))
-))
--- /dev/null
+((function abs
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float abs (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 abs (var_ref arg0)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 abs (var_ref arg0)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 abs (var_ref arg0)))))
+
+ (signature int
+ (parameters
+ (declare (in) int arg0))
+ ((return (expression int abs (var_ref arg0)))))
+
+ (signature ivec2
+ (parameters
+ (declare (in) ivec2 arg0))
+ ((return (expression ivec2 abs (var_ref arg0)))))
+
+ (signature ivec3
+ (parameters
+ (declare (in) ivec3 arg0))
+ ((return (expression ivec3 abs (var_ref arg0)))))
+
+ (signature ivec4
+ (parameters
+ (declare (in) ivec4 arg0))
+ ((return (expression ivec4 abs (var_ref arg0)))))
+))
+++ /dev/null
-((function acos
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float - (constant float (1.5707963))
- (call asin ((var_ref x)))))))
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 - (constant float (1.5707963))
- (call asin ((var_ref x)))))))
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 - (constant float (1.5707963))
- (call asin ((var_ref x)))))))
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 - (constant float (1.5707963))
- (call asin ((var_ref x)))))))
-))
--- /dev/null
+((function acos
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float - (constant float (1.5707963))
+ (call asin ((var_ref x)))))))
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression vec2 - (constant float (1.5707963))
+ (call asin ((var_ref x)))))))
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression vec3 - (constant float (1.5707963))
+ (call asin ((var_ref x)))))))
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression vec4 - (constant float (1.5707963))
+ (call asin ((var_ref x)))))))
+))
+++ /dev/null
-((function acosh
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float log (expression float + (var_ref x) (expression float sqrt (expression float - (expression float * (var_ref x) (var_ref x)) (constant float (1)))))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 log (expression vec2 + (var_ref x) (expression vec2 sqrt (expression vec2 - (expression vec2 * (var_ref x) (var_ref x)) (constant float (1)))))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 log (expression vec3 + (var_ref x) (expression vec3 sqrt (expression vec3 - (expression vec3 * (var_ref x) (var_ref x)) (constant float (1)))))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 log (expression vec4 + (var_ref x) (expression vec4 sqrt (expression vec4 - (expression vec4 * (var_ref x) (var_ref x)) (constant float (1)))))))))
-))
--- /dev/null
+((function acosh
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float log (expression float + (var_ref x) (expression float sqrt (expression float - (expression float * (var_ref x) (var_ref x)) (constant float (1)))))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression vec2 log (expression vec2 + (var_ref x) (expression vec2 sqrt (expression vec2 - (expression vec2 * (var_ref x) (var_ref x)) (constant float (1)))))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression vec3 log (expression vec3 + (var_ref x) (expression vec3 sqrt (expression vec3 - (expression vec3 * (var_ref x) (var_ref x)) (constant float (1)))))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression vec4 log (expression vec4 + (var_ref x) (expression vec4 sqrt (expression vec4 - (expression vec4 * (var_ref x) (var_ref x)) (constant float (1)))))))))
+))
+++ /dev/null
-((function all
- (signature bool
- (parameters
- (declare (in) bvec2 arg0))
- ((return (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))))))
-
- (signature bool
- (parameters
- (declare (in) bvec3 arg0))
- ((return (expression bool && (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))))))
-
- (signature bool
- (parameters
- (declare (in) bvec4 arg0))
- ((return (expression bool && (expression bool && (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))) (swiz w (var_ref arg0))))))
-))
--- /dev/null
+((function all
+ (signature bool
+ (parameters
+ (declare (in) bvec2 arg0))
+ ((return (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))))))
+
+ (signature bool
+ (parameters
+ (declare (in) bvec3 arg0))
+ ((return (expression bool && (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))))))
+
+ (signature bool
+ (parameters
+ (declare (in) bvec4 arg0))
+ ((return (expression bool && (expression bool && (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))) (swiz w (var_ref arg0))))))
+))
+++ /dev/null
-((function any
- (signature bool
- (parameters
- (declare (in) bvec2 arg0))
- ((return (expression bool any (var_ref arg0)))))
-
- (signature bool
- (parameters
- (declare (in) bvec3 arg0))
- ((return (expression bool any (var_ref arg0)))))
-
- (signature bool
- (parameters
- (declare (in) bvec4 arg0))
- ((return (expression bool any (var_ref arg0)))))
-))
--- /dev/null
+((function any
+ (signature bool
+ (parameters
+ (declare (in) bvec2 arg0))
+ ((return (expression bool any (var_ref arg0)))))
+
+ (signature bool
+ (parameters
+ (declare (in) bvec3 arg0))
+ ((return (expression bool any (var_ref arg0)))))
+
+ (signature bool
+ (parameters
+ (declare (in) bvec4 arg0))
+ ((return (expression bool any (var_ref arg0)))))
+))
+++ /dev/null
-((function asin
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float *
- (expression float sign (var_ref x))
- (expression float -
- (constant float (1.5707964))
- (expression float *
- (expression float sqrt
- (expression float -
- (constant float (1.0))
- (expression float abs (var_ref x))))
- (expression float +
- (constant float (1.5707964))
- (expression float *
- (expression float abs (var_ref x))
- (expression float +
- (constant float (-0.21460183))
- (expression float *
- (expression float abs (var_ref x))
- (expression float +
- (constant float (0.086566724))
- (expression float *
- (expression float abs (var_ref x))
- (constant float (-0.03102955))
- ))))))))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 *
- (expression vec2 sign (var_ref x))
- (expression vec2 -
- (constant float (1.5707964))
- (expression vec2 *
- (expression vec2 sqrt
- (expression vec2 -
- (constant float (1.0))
- (expression vec2 abs (var_ref x))))
- (expression vec2 +
- (constant float (1.5707964))
- (expression vec2 *
- (expression vec2 abs (var_ref x))
- (expression vec2 +
- (constant float (-0.21460183))
- (expression vec2 *
- (expression vec2 abs (var_ref x))
- (expression vec2 +
- (constant float (0.086566724))
- (expression vec2 *
- (expression vec2 abs (var_ref x))
- (constant float (-0.03102955))
- ))))))))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 *
- (expression vec3 sign (var_ref x))
- (expression vec3 -
- (constant float (1.5707964))
- (expression vec3 *
- (expression vec3 sqrt
- (expression vec3 -
- (constant float (1.0))
- (expression vec3 abs (var_ref x))))
- (expression vec3 +
- (constant float (1.5707964))
- (expression vec3 *
- (expression vec3 abs (var_ref x))
- (expression vec3 +
- (constant float (-0.21460183))
- (expression vec3 *
- (expression vec3 abs (var_ref x))
- (expression vec3 +
- (constant float (0.086566724))
- (expression vec3 *
- (expression vec3 abs (var_ref x))
- (constant float (-0.03102955))
- ))))))))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 *
- (expression vec4 sign (var_ref x))
- (expression vec4 -
- (constant float (1.5707964))
- (expression vec4 *
- (expression vec4 sqrt
- (expression vec4 -
- (constant float (1.0))
- (expression vec4 abs (var_ref x))))
- (expression vec4 +
- (constant float (1.5707964))
- (expression vec4 *
- (expression vec4 abs (var_ref x))
- (expression vec4 +
- (constant float (-0.21460183))
- (expression vec4 *
- (expression vec4 abs (var_ref x))
- (expression vec4 +
- (constant float (0.086566724))
- (expression vec4 *
- (expression vec4 abs (var_ref x))
- (constant float (-0.03102955))
- ))))))))))))
-))
--- /dev/null
+((function asin
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float *
+ (expression float sign (var_ref x))
+ (expression float -
+ (constant float (1.5707964))
+ (expression float *
+ (expression float sqrt
+ (expression float -
+ (constant float (1.0))
+ (expression float abs (var_ref x))))
+ (expression float +
+ (constant float (1.5707964))
+ (expression float *
+ (expression float abs (var_ref x))
+ (expression float +
+ (constant float (-0.21460183))
+ (expression float *
+ (expression float abs (var_ref x))
+ (expression float +
+ (constant float (0.086566724))
+ (expression float *
+ (expression float abs (var_ref x))
+ (constant float (-0.03102955))
+ ))))))))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression vec2 *
+ (expression vec2 sign (var_ref x))
+ (expression vec2 -
+ (constant float (1.5707964))
+ (expression vec2 *
+ (expression vec2 sqrt
+ (expression vec2 -
+ (constant float (1.0))
+ (expression vec2 abs (var_ref x))))
+ (expression vec2 +
+ (constant float (1.5707964))
+ (expression vec2 *
+ (expression vec2 abs (var_ref x))
+ (expression vec2 +
+ (constant float (-0.21460183))
+ (expression vec2 *
+ (expression vec2 abs (var_ref x))
+ (expression vec2 +
+ (constant float (0.086566724))
+ (expression vec2 *
+ (expression vec2 abs (var_ref x))
+ (constant float (-0.03102955))
+ ))))))))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression vec3 *
+ (expression vec3 sign (var_ref x))
+ (expression vec3 -
+ (constant float (1.5707964))
+ (expression vec3 *
+ (expression vec3 sqrt
+ (expression vec3 -
+ (constant float (1.0))
+ (expression vec3 abs (var_ref x))))
+ (expression vec3 +
+ (constant float (1.5707964))
+ (expression vec3 *
+ (expression vec3 abs (var_ref x))
+ (expression vec3 +
+ (constant float (-0.21460183))
+ (expression vec3 *
+ (expression vec3 abs (var_ref x))
+ (expression vec3 +
+ (constant float (0.086566724))
+ (expression vec3 *
+ (expression vec3 abs (var_ref x))
+ (constant float (-0.03102955))
+ ))))))))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression vec4 *
+ (expression vec4 sign (var_ref x))
+ (expression vec4 -
+ (constant float (1.5707964))
+ (expression vec4 *
+ (expression vec4 sqrt
+ (expression vec4 -
+ (constant float (1.0))
+ (expression vec4 abs (var_ref x))))
+ (expression vec4 +
+ (constant float (1.5707964))
+ (expression vec4 *
+ (expression vec4 abs (var_ref x))
+ (expression vec4 +
+ (constant float (-0.21460183))
+ (expression vec4 *
+ (expression vec4 abs (var_ref x))
+ (expression vec4 +
+ (constant float (0.086566724))
+ (expression vec4 *
+ (expression vec4 abs (var_ref x))
+ (constant float (-0.03102955))
+ ))))))))))))
+))
+++ /dev/null
-((function asinh
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float *
- (expression float sign (var_ref x))
- (expression float log
- (expression float +
- (expression float abs (var_ref x))
- (expression float sqrt
- (expression float +
- (expression float * (var_ref x) (var_ref x))
- (constant float (1))))))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 *
- (expression vec2 sign (var_ref x))
- (expression vec2 log
- (expression vec2 +
- (expression vec2 abs (var_ref x))
- (expression vec2 sqrt
- (expression vec2 +
- (expression vec2 * (var_ref x) (var_ref x))
- (constant float (1))))))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 *
- (expression vec3 sign (var_ref x))
- (expression vec3 log
- (expression vec3 +
- (expression vec3 abs (var_ref x))
- (expression vec3 sqrt
- (expression vec3 +
- (expression vec3 * (var_ref x) (var_ref x))
- (constant float (1))))))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 *
- (expression vec4 sign (var_ref x))
- (expression vec4 log
- (expression vec4 +
- (expression vec4 abs (var_ref x))
- (expression vec4 sqrt
- (expression vec4 +
- (expression vec4 * (var_ref x) (var_ref x))
- (constant float (1))))))))))
-))
--- /dev/null
+((function asinh
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float *
+ (expression float sign (var_ref x))
+ (expression float log
+ (expression float +
+ (expression float abs (var_ref x))
+ (expression float sqrt
+ (expression float +
+ (expression float * (var_ref x) (var_ref x))
+ (constant float (1))))))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression vec2 *
+ (expression vec2 sign (var_ref x))
+ (expression vec2 log
+ (expression vec2 +
+ (expression vec2 abs (var_ref x))
+ (expression vec2 sqrt
+ (expression vec2 +
+ (expression vec2 * (var_ref x) (var_ref x))
+ (constant float (1))))))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression vec3 *
+ (expression vec3 sign (var_ref x))
+ (expression vec3 log
+ (expression vec3 +
+ (expression vec3 abs (var_ref x))
+ (expression vec3 sqrt
+ (expression vec3 +
+ (expression vec3 * (var_ref x) (var_ref x))
+ (constant float (1))))))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression vec4 *
+ (expression vec4 sign (var_ref x))
+ (expression vec4 log
+ (expression vec4 +
+ (expression vec4 abs (var_ref x))
+ (expression vec4 sqrt
+ (expression vec4 +
+ (expression vec4 * (var_ref x) (var_ref x))
+ (constant float (1))))))))))
+))
+++ /dev/null
-((function atan
- (signature float
- (parameters
- (declare (in) float y_over_x))
- ((return (call asin ((expression float *
- (var_ref y_over_x)
- (expression float rsq
- (expression float +
- (expression float *
- (var_ref y_over_x)
- (var_ref y_over_x))
- (constant float (1.0))))))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 y_over_x))
- ((return (call asin ((expression vec2 *
- (var_ref y_over_x)
- (expression vec2 rsq
- (expression vec2 +
- (expression vec2 *
- (var_ref y_over_x)
- (var_ref y_over_x))
- (constant float (1.0))))))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 y_over_x))
- ((return (call asin ((expression vec3 *
- (var_ref y_over_x)
- (expression vec3 rsq
- (expression vec3 +
- (expression vec3 *
- (var_ref y_over_x)
- (var_ref y_over_x))
- (constant float (1.0))))))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 y_over_x))
- ((return (call asin ((expression vec4 *
- (var_ref y_over_x)
- (expression vec4 rsq
- (expression vec4 +
- (expression vec4 *
- (var_ref y_over_x)
- (var_ref y_over_x))
- (constant float (1.0))))))))))
-
- (signature float
- (parameters
- (declare (in ) float y)
- (declare (in ) float x)
- )
- (
- (declare () float r)
- (if (expression bool >
- (expression float abs (var_ref x))
- (expression float * (constant float (1.0e-8)) (expression float abs (var_ref y)))) (
- (assign (x) (var_ref r) (call atan ((expression float / (var_ref y) (var_ref x)))))
- (if (expression bool < (var_ref x) (constant float (0.000000)) ) (
- (if (expression bool >= (var_ref y) (constant float (0.000000)) )
- ((assign (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593)))))
- ((assign (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593))))))
- )
- (
- ))
- )
- (
- (declare () float sgn)
- (assign (x) (var_ref sgn) (expression float sign (var_ref y)))
- (assign (x) (var_ref r) (expression float * (var_ref sgn) (constant float (1.5707965))))
- ))
-
- (return (var_ref r) )
- ))
-
-
-
- (signature vec2
- (parameters
- (declare (in) vec2 y)
- (declare (in) vec2 x))
- ((declare () vec2 r)
- (assign (x) (var_ref r)
- (call atan ((swiz x (var_ref y))
- (swiz x (var_ref x)))))
- (assign (y) (var_ref r)
- (call atan ((swiz y (var_ref y))
- (swiz y (var_ref x)))))
- (return (var_ref r))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 y)
- (declare (in) vec3 x))
- ((declare () vec3 r)
- (assign (x) (var_ref r)
- (call atan ((swiz x (var_ref y))
- (swiz x (var_ref x)))))
- (assign (y) (var_ref r)
- (call atan ((swiz y (var_ref y))
- (swiz y (var_ref x)))))
- (assign (z) (var_ref r)
- (call atan ((swiz z (var_ref y))
- (swiz z (var_ref x)))))
- (return (var_ref r))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 y)
- (declare (in) vec4 x))
- ((declare () vec4 r)
- (assign (x) (var_ref r)
- (call atan ((swiz x (var_ref y))
- (swiz x (var_ref x)))))
- (assign (y) (var_ref r)
- (call atan ((swiz y (var_ref y))
- (swiz y (var_ref x)))))
- (assign (z) (var_ref r)
- (call atan ((swiz z (var_ref y))
- (swiz z (var_ref x)))))
- (assign (w) (var_ref r)
- (call atan ((swiz w (var_ref y))
- (swiz w (var_ref x)))))
- (return (var_ref r)))))
-
-))
--- /dev/null
+((function atan
+ (signature float
+ (parameters
+ (declare (in) float y_over_x))
+ ((return (call asin ((expression float *
+ (var_ref y_over_x)
+ (expression float rsq
+ (expression float +
+ (expression float *
+ (var_ref y_over_x)
+ (var_ref y_over_x))
+ (constant float (1.0))))))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 y_over_x))
+ ((return (call asin ((expression vec2 *
+ (var_ref y_over_x)
+ (expression vec2 rsq
+ (expression vec2 +
+ (expression vec2 *
+ (var_ref y_over_x)
+ (var_ref y_over_x))
+ (constant float (1.0))))))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 y_over_x))
+ ((return (call asin ((expression vec3 *
+ (var_ref y_over_x)
+ (expression vec3 rsq
+ (expression vec3 +
+ (expression vec3 *
+ (var_ref y_over_x)
+ (var_ref y_over_x))
+ (constant float (1.0))))))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 y_over_x))
+ ((return (call asin ((expression vec4 *
+ (var_ref y_over_x)
+ (expression vec4 rsq
+ (expression vec4 +
+ (expression vec4 *
+ (var_ref y_over_x)
+ (var_ref y_over_x))
+ (constant float (1.0))))))))))
+
+ (signature float
+ (parameters
+ (declare (in ) float y)
+ (declare (in ) float x)
+ )
+ (
+ (declare () float r)
+ (if (expression bool >
+ (expression float abs (var_ref x))
+ (expression float * (constant float (1.0e-8)) (expression float abs (var_ref y)))) (
+ (assign (x) (var_ref r) (call atan ((expression float / (var_ref y) (var_ref x)))))
+ (if (expression bool < (var_ref x) (constant float (0.000000)) ) (
+ (if (expression bool >= (var_ref y) (constant float (0.000000)) )
+ ((assign (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593)))))
+ ((assign (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593))))))
+ )
+ (
+ ))
+ )
+ (
+ (declare () float sgn)
+ (assign (x) (var_ref sgn) (expression float sign (var_ref y)))
+ (assign (x) (var_ref r) (expression float * (var_ref sgn) (constant float (1.5707965))))
+ ))
+
+ (return (var_ref r) )
+ ))
+
+
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 y)
+ (declare (in) vec2 x))
+ ((declare () vec2 r)
+ (assign (x) (var_ref r)
+ (call atan ((swiz x (var_ref y))
+ (swiz x (var_ref x)))))
+ (assign (y) (var_ref r)
+ (call atan ((swiz y (var_ref y))
+ (swiz y (var_ref x)))))
+ (return (var_ref r))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 y)
+ (declare (in) vec3 x))
+ ((declare () vec3 r)
+ (assign (x) (var_ref r)
+ (call atan ((swiz x (var_ref y))
+ (swiz x (var_ref x)))))
+ (assign (y) (var_ref r)
+ (call atan ((swiz y (var_ref y))
+ (swiz y (var_ref x)))))
+ (assign (z) (var_ref r)
+ (call atan ((swiz z (var_ref y))
+ (swiz z (var_ref x)))))
+ (return (var_ref r))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 y)
+ (declare (in) vec4 x))
+ ((declare () vec4 r)
+ (assign (x) (var_ref r)
+ (call atan ((swiz x (var_ref y))
+ (swiz x (var_ref x)))))
+ (assign (y) (var_ref r)
+ (call atan ((swiz y (var_ref y))
+ (swiz y (var_ref x)))))
+ (assign (z) (var_ref r)
+ (call atan ((swiz z (var_ref y))
+ (swiz z (var_ref x)))))
+ (assign (w) (var_ref r)
+ (call atan ((swiz w (var_ref y))
+ (swiz w (var_ref x)))))
+ (return (var_ref r)))))
+
+))
+++ /dev/null
-((function atanh
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float * (constant float (0.5))
- (expression float log
- (expression float /
- (expression float + (constant float (1)) (var_ref x))
- (expression float - (constant float (1)) (var_ref x))))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 * (constant float (0.5))
- (expression vec2 log
- (expression vec2 /
- (expression vec2 + (constant float (1)) (var_ref x))
- (expression vec2 - (constant float (1)) (var_ref x))))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 * (constant float (0.5))
- (expression vec3 log
- (expression vec3 /
- (expression vec3 + (constant float (1)) (var_ref x))
- (expression vec3 - (constant float (1)) (var_ref x))))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 * (constant float (0.5))
- (expression vec4 log
- (expression vec4 /
- (expression vec4 + (constant float (1)) (var_ref x))
- (expression vec4 - (constant float (1)) (var_ref x))))))))
-))
--- /dev/null
+((function atanh
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float * (constant float (0.5))
+ (expression float log
+ (expression float /
+ (expression float + (constant float (1)) (var_ref x))
+ (expression float - (constant float (1)) (var_ref x))))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression vec2 * (constant float (0.5))
+ (expression vec2 log
+ (expression vec2 /
+ (expression vec2 + (constant float (1)) (var_ref x))
+ (expression vec2 - (constant float (1)) (var_ref x))))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression vec3 * (constant float (0.5))
+ (expression vec3 log
+ (expression vec3 /
+ (expression vec3 + (constant float (1)) (var_ref x))
+ (expression vec3 - (constant float (1)) (var_ref x))))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression vec4 * (constant float (0.5))
+ (expression vec4 log
+ (expression vec4 /
+ (expression vec4 + (constant float (1)) (var_ref x))
+ (expression vec4 - (constant float (1)) (var_ref x))))))))
+))
+++ /dev/null
-((function ceil
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float ceil (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 ceil (var_ref arg0)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 ceil (var_ref arg0)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 ceil (var_ref arg0)))))
-))
--- /dev/null
+((function ceil
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float ceil (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 ceil (var_ref arg0)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 ceil (var_ref arg0)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 ceil (var_ref arg0)))))
+))
+++ /dev/null
-((function clamp
- (signature float
- (parameters
- (declare (in) float arg0)
- (declare (in) float arg1)
- (declare (in) float arg2))
- ((return (expression float max (expression float min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1)
- (declare (in) vec2 arg2))
- ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1)
- (declare (in) vec3 arg2))
- ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1)
- (declare (in) vec4 arg2))
- ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) float arg1)
- (declare (in) float arg2))
- ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) float arg1)
- (declare (in) float arg2))
- ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) float arg1)
- (declare (in) float arg2))
- ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature int
- (parameters
- (declare (in) int arg0)
- (declare (in) int arg1)
- (declare (in) int arg2))
- ((return (expression int max (expression int min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature ivec2
- (parameters
- (declare (in) ivec2 arg0)
- (declare (in) ivec2 arg1)
- (declare (in) ivec2 arg2))
- ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature ivec3
- (parameters
- (declare (in) ivec3 arg0)
- (declare (in) ivec3 arg1)
- (declare (in) ivec3 arg2))
- ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature ivec4
- (parameters
- (declare (in) ivec4 arg0)
- (declare (in) ivec4 arg1)
- (declare (in) ivec4 arg2))
- ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature ivec2
- (parameters
- (declare (in) ivec2 arg0)
- (declare (in) int arg1)
- (declare (in) int arg2))
- ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature ivec3
- (parameters
- (declare (in) ivec3 arg0)
- (declare (in) int arg1)
- (declare (in) int arg2))
- ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature ivec4
- (parameters
- (declare (in) ivec4 arg0)
- (declare (in) int arg1)
- (declare (in) int arg2))
- ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature uint
- (parameters
- (declare (in) uint arg0)
- (declare (in) uint arg1)
- (declare (in) uint arg2))
- ((return (expression uint max (expression uint min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature uvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1)
- (declare (in) uvec2 arg2))
- ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature uvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1)
- (declare (in) uvec3 arg2))
- ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature uvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1)
- (declare (in) uvec4 arg2))
- ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature uvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uint arg1)
- (declare (in) uint arg2))
- ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature uvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uint arg1)
- (declare (in) uint arg2))
- ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-
- (signature uvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uint arg1)
- (declare (in) uint arg2))
- ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
-))
--- /dev/null
+((function clamp
+ (signature float
+ (parameters
+ (declare (in) float arg0)
+ (declare (in) float arg1)
+ (declare (in) float arg2))
+ ((return (expression float max (expression float min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1)
+ (declare (in) vec2 arg2))
+ ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1)
+ (declare (in) vec3 arg2))
+ ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1)
+ (declare (in) vec4 arg2))
+ ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) float arg1)
+ (declare (in) float arg2))
+ ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) float arg1)
+ (declare (in) float arg2))
+ ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) float arg1)
+ (declare (in) float arg2))
+ ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature int
+ (parameters
+ (declare (in) int arg0)
+ (declare (in) int arg1)
+ (declare (in) int arg2))
+ ((return (expression int max (expression int min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature ivec2
+ (parameters
+ (declare (in) ivec2 arg0)
+ (declare (in) ivec2 arg1)
+ (declare (in) ivec2 arg2))
+ ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature ivec3
+ (parameters
+ (declare (in) ivec3 arg0)
+ (declare (in) ivec3 arg1)
+ (declare (in) ivec3 arg2))
+ ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature ivec4
+ (parameters
+ (declare (in) ivec4 arg0)
+ (declare (in) ivec4 arg1)
+ (declare (in) ivec4 arg2))
+ ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature ivec2
+ (parameters
+ (declare (in) ivec2 arg0)
+ (declare (in) int arg1)
+ (declare (in) int arg2))
+ ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature ivec3
+ (parameters
+ (declare (in) ivec3 arg0)
+ (declare (in) int arg1)
+ (declare (in) int arg2))
+ ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature ivec4
+ (parameters
+ (declare (in) ivec4 arg0)
+ (declare (in) int arg1)
+ (declare (in) int arg2))
+ ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature uint
+ (parameters
+ (declare (in) uint arg0)
+ (declare (in) uint arg1)
+ (declare (in) uint arg2))
+ ((return (expression uint max (expression uint min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature uvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1)
+ (declare (in) uvec2 arg2))
+ ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature uvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1)
+ (declare (in) uvec3 arg2))
+ ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature uvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1)
+ (declare (in) uvec4 arg2))
+ ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature uvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uint arg1)
+ (declare (in) uint arg2))
+ ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature uvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uint arg1)
+ (declare (in) uint arg2))
+ ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+
+ (signature uvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uint arg1)
+ (declare (in) uint arg2))
+ ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))
+))
+++ /dev/null
-((function cos
- (signature float
- (parameters
- (declare (in) float angle))
- ((return (expression float cos (var_ref angle)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 angle))
- ((return (expression vec2 cos (var_ref angle)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 angle))
- ((return (expression vec3 cos (var_ref angle)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 angle))
- ((return (expression vec4 cos (var_ref angle)))))
-))
--- /dev/null
+((function cos
+ (signature float
+ (parameters
+ (declare (in) float angle))
+ ((return (expression float cos (var_ref angle)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 angle))
+ ((return (expression vec2 cos (var_ref angle)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 angle))
+ ((return (expression vec3 cos (var_ref angle)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 angle))
+ ((return (expression vec4 cos (var_ref angle)))))
+))
+++ /dev/null
-((function cosh
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float * (constant float (0.5))
- (expression float +
- (expression float exp (var_ref x))
- (expression float exp (expression float neg (var_ref x))))))))
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 * (constant float (0.5))
- (expression vec2 +
- (expression vec2 exp (var_ref x))
- (expression vec2 exp (expression vec2 neg (var_ref x))))))))
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 * (constant float (0.5))
- (expression vec3 +
- (expression vec3 exp (var_ref x))
- (expression vec3 exp (expression vec3 neg (var_ref x))))))))
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 * (constant float (0.5))
- (expression vec4 +
- (expression vec4 exp (var_ref x))
- (expression vec4 exp (expression vec4 neg (var_ref x))))))))
-))
--- /dev/null
+((function cosh
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float * (constant float (0.5))
+ (expression float +
+ (expression float exp (var_ref x))
+ (expression float exp (expression float neg (var_ref x))))))))
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression vec2 * (constant float (0.5))
+ (expression vec2 +
+ (expression vec2 exp (var_ref x))
+ (expression vec2 exp (expression vec2 neg (var_ref x))))))))
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression vec3 * (constant float (0.5))
+ (expression vec3 +
+ (expression vec3 exp (var_ref x))
+ (expression vec3 exp (expression vec3 neg (var_ref x))))))))
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression vec4 * (constant float (0.5))
+ (expression vec4 +
+ (expression vec4 exp (var_ref x))
+ (expression vec4 exp (expression vec4 neg (var_ref x))))))))
+))
+++ /dev/null
-((function cross
- (signature vec3
- (parameters
- (declare (in) vec3 a)
- (declare (in) vec3 b))
- ((return (expression vec3 -
- (expression vec3 * (swiz yzx (var_ref a)) (swiz zxy (var_ref b)))
- (expression vec3 * (swiz zxy (var_ref a)) (swiz yzx (var_ref b)))))))
-))
--- /dev/null
+((function cross
+ (signature vec3
+ (parameters
+ (declare (in) vec3 a)
+ (declare (in) vec3 b))
+ ((return (expression vec3 -
+ (expression vec3 * (swiz yzx (var_ref a)) (swiz zxy (var_ref b)))
+ (expression vec3 * (swiz zxy (var_ref a)) (swiz yzx (var_ref b)))))))
+))
+++ /dev/null
-((function dFdx
- (signature float
- (parameters
- (declare (in) float p))
- ((return (expression float dFdx (var_ref p)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 p))
- ((return (expression vec2 dFdx (var_ref p)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 p))
- ((return (expression vec3 dFdx (var_ref p)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 p))
- ((return (expression vec4 dFdx (var_ref p)))))
-))
--- /dev/null
+((function dFdx
+ (signature float
+ (parameters
+ (declare (in) float p))
+ ((return (expression float dFdx (var_ref p)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 p))
+ ((return (expression vec2 dFdx (var_ref p)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 p))
+ ((return (expression vec3 dFdx (var_ref p)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 p))
+ ((return (expression vec4 dFdx (var_ref p)))))
+))
+++ /dev/null
-((function dFdy
- (signature float
- (parameters
- (declare (in) float p))
- ((return (expression float dFdy (var_ref p)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 p))
- ((return (expression vec2 dFdy (var_ref p)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 p))
- ((return (expression vec3 dFdy (var_ref p)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 p))
- ((return (expression vec4 dFdy (var_ref p)))))
-))
--- /dev/null
+((function dFdy
+ (signature float
+ (parameters
+ (declare (in) float p))
+ ((return (expression float dFdy (var_ref p)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 p))
+ ((return (expression vec2 dFdy (var_ref p)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 p))
+ ((return (expression vec3 dFdy (var_ref p)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 p))
+ ((return (expression vec4 dFdy (var_ref p)))))
+))
+++ /dev/null
-((function degrees
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float * (var_ref arg0) (constant float (57.295780))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 * (var_ref arg0) (constant float (57.295780))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 * (var_ref arg0) (constant float (57.295780))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 * (var_ref arg0) (constant float (57.295780))))))
-))
--- /dev/null
+((function degrees
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float * (var_ref arg0) (constant float (57.295780))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 * (var_ref arg0) (constant float (57.295780))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 * (var_ref arg0) (constant float (57.295780))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 * (var_ref arg0) (constant float (57.295780))))))
+))
+++ /dev/null
-((function distance
- (signature float
- (parameters
- (declare (in) float p0)
- (declare (in) float p1))
- ((return (expression float abs (expression float - (var_ref p0) (var_ref p1))))))
-
- (signature float
- (parameters
- (declare (in) vec2 p0)
- (declare (in) vec2 p1))
- ((declare () vec2 p)
- (assign (xy) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))
- (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
-
- (signature float
- (parameters
- (declare (in) vec3 p0)
- (declare (in) vec3 p1))
- ((declare () vec3 p)
- (assign (xyz) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))
- (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
-
- (signature float
- (parameters
- (declare (in) vec4 p0)
- (declare (in) vec4 p1))
- ((declare () vec4 p)
- (assign (xyzw) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))
- (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
-))
--- /dev/null
+((function distance
+ (signature float
+ (parameters
+ (declare (in) float p0)
+ (declare (in) float p1))
+ ((return (expression float abs (expression float - (var_ref p0) (var_ref p1))))))
+
+ (signature float
+ (parameters
+ (declare (in) vec2 p0)
+ (declare (in) vec2 p1))
+ ((declare () vec2 p)
+ (assign (xy) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))
+ (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
+
+ (signature float
+ (parameters
+ (declare (in) vec3 p0)
+ (declare (in) vec3 p1))
+ ((declare () vec3 p)
+ (assign (xyz) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))
+ (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
+
+ (signature float
+ (parameters
+ (declare (in) vec4 p0)
+ (declare (in) vec4 p1))
+ ((declare () vec4 p)
+ (assign (xyzw) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))
+ (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
+))
+++ /dev/null
-((function dot
- (signature float
- (parameters
- (declare (in) float arg0)
- (declare (in) float arg1))
- ((return (expression float * (var_ref arg0) (var_ref arg1)))))
-
- (signature float
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression float dot (var_ref arg0) (var_ref arg1)))))
-
- (signature float
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression float dot (var_ref arg0) (var_ref arg1)))))
-
- (signature float
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression float dot (var_ref arg0) (var_ref arg1)))))
-))
--- /dev/null
+((function dot
+ (signature float
+ (parameters
+ (declare (in) float arg0)
+ (declare (in) float arg1))
+ ((return (expression float * (var_ref arg0) (var_ref arg1)))))
+
+ (signature float
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression float dot (var_ref arg0) (var_ref arg1)))))
+
+ (signature float
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression float dot (var_ref arg0) (var_ref arg1)))))
+
+ (signature float
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression float dot (var_ref arg0) (var_ref arg1)))))
+))
+++ /dev/null
-((function equal
- (signature bvec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) bvec2 arg0)
- (declare (in) bvec2 arg1))
- ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) bvec3 arg0)
- (declare (in) bvec3 arg1))
- ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) bvec4 arg0)
- (declare (in) bvec4 arg1))
- ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) ivec2 arg0)
- (declare (in) ivec2 arg1))
- ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) ivec3 arg0)
- (declare (in) ivec3 arg1))
- ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) ivec4 arg0)
- (declare (in) ivec4 arg1))
- ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))
-))
--- /dev/null
+((function equal
+ (signature bvec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) bvec2 arg0)
+ (declare (in) bvec2 arg1))
+ ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) bvec3 arg0)
+ (declare (in) bvec3 arg1))
+ ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) bvec4 arg0)
+ (declare (in) bvec4 arg1))
+ ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) ivec2 arg0)
+ (declare (in) ivec2 arg1))
+ ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) ivec3 arg0)
+ (declare (in) ivec3 arg1))
+ ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) ivec4 arg0)
+ (declare (in) ivec4 arg1))
+ ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))
+))
+++ /dev/null
-((function exp
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float exp (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 exp (var_ref arg0)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 exp (var_ref arg0)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 exp (var_ref arg0)))))
-))
--- /dev/null
+((function exp
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float exp (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 exp (var_ref arg0)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 exp (var_ref arg0)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 exp (var_ref arg0)))))
+))
+++ /dev/null
-((function exp2
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float exp2 (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 exp2 (var_ref arg0)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 exp2 (var_ref arg0)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 exp2 (var_ref arg0)))))
-))
--- /dev/null
+((function exp2
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float exp2 (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 exp2 (var_ref arg0)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 exp2 (var_ref arg0)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 exp2 (var_ref arg0)))))
+))
+++ /dev/null
-((function faceforward
- (signature float
- (parameters
- (declare (in) float N)
- (declare (in) float I)
- (declare (in) float Nref))
- ((if (expression bool < (expression float * (var_ref Nref) (var_ref I)) (constant float (0)))
- ((return (var_ref N)))
- ((return (expression float neg (var_ref N)))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 N)
- (declare (in) vec2 I)
- (declare (in) vec2 Nref))
- ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))
- ((return (var_ref N)))
- ((return (expression vec2 neg (var_ref N)))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 N)
- (declare (in) vec3 I)
- (declare (in) vec3 Nref))
- ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))
- ((return (var_ref N)))
- ((return (expression vec3 neg (var_ref N)))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 N)
- (declare (in) vec4 I)
- (declare (in) vec4 Nref))
- ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))
- ((return (var_ref N)))
- ((return (expression vec4 neg (var_ref N)))))))
-))
--- /dev/null
+((function faceforward
+ (signature float
+ (parameters
+ (declare (in) float N)
+ (declare (in) float I)
+ (declare (in) float Nref))
+ ((if (expression bool < (expression float * (var_ref Nref) (var_ref I)) (constant float (0)))
+ ((return (var_ref N)))
+ ((return (expression float neg (var_ref N)))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 N)
+ (declare (in) vec2 I)
+ (declare (in) vec2 Nref))
+ ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))
+ ((return (var_ref N)))
+ ((return (expression vec2 neg (var_ref N)))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 N)
+ (declare (in) vec3 I)
+ (declare (in) vec3 Nref))
+ ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))
+ ((return (var_ref N)))
+ ((return (expression vec3 neg (var_ref N)))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 N)
+ (declare (in) vec4 I)
+ (declare (in) vec4 Nref))
+ ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))
+ ((return (var_ref N)))
+ ((return (expression vec4 neg (var_ref N)))))))
+))
+++ /dev/null
-((function floor
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float floor (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 floor (var_ref arg0)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 floor (var_ref arg0)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 floor (var_ref arg0)))))
-))
--- /dev/null
+((function floor
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float floor (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 floor (var_ref arg0)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 floor (var_ref arg0)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 floor (var_ref arg0)))))
+))
+++ /dev/null
-((function fract
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float fract (var_ref x)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 fract (var_ref x)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 fract (var_ref x)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 fract (var_ref x)))))
-))
-
--- /dev/null
+((function fract
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float fract (var_ref x)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression vec2 fract (var_ref x)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression vec3 fract (var_ref x)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression vec4 fract (var_ref x)))))
+))
+
+++ /dev/null
-((declare (uniform) mat4 gl_ModelViewProjectionMatrix)
- (declare (in) vec4 gl_Vertex)
- (function ftransform
- (signature vec4
- (parameters)
- ((return (expression vec4 *
- (var_ref gl_ModelViewProjectionMatrix)
- (var_ref gl_Vertex)))))
-))
--- /dev/null
+((declare (uniform) mat4 gl_ModelViewProjectionMatrix)
+ (declare (in) vec4 gl_Vertex)
+ (function ftransform
+ (signature vec4
+ (parameters)
+ ((return (expression vec4 *
+ (var_ref gl_ModelViewProjectionMatrix)
+ (var_ref gl_Vertex)))))
+))
+++ /dev/null
-((function fwidth
- (signature float
- (parameters
- (declare (in) float p))
- ((return (expression float +
- (expression float abs (expression float dFdx (var_ref p)))
- (expression float abs (expression float dFdy (var_ref p)))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 p))
- ((return (expression vec2 +
- (expression vec2 abs (expression vec2 dFdx (var_ref p)))
- (expression vec2 abs (expression vec2 dFdy (var_ref p)))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 p))
- ((return (expression vec3 +
- (expression vec3 abs (expression vec3 dFdx (var_ref p)))
- (expression vec3 abs (expression vec3 dFdy (var_ref p)))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 p))
- ((return (expression vec4 +
- (expression vec4 abs (expression vec4 dFdx (var_ref p)))
- (expression vec4 abs (expression vec4 dFdy (var_ref p)))))))
-))
--- /dev/null
+((function fwidth
+ (signature float
+ (parameters
+ (declare (in) float p))
+ ((return (expression float +
+ (expression float abs (expression float dFdx (var_ref p)))
+ (expression float abs (expression float dFdy (var_ref p)))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 p))
+ ((return (expression vec2 +
+ (expression vec2 abs (expression vec2 dFdx (var_ref p)))
+ (expression vec2 abs (expression vec2 dFdy (var_ref p)))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 p))
+ ((return (expression vec3 +
+ (expression vec3 abs (expression vec3 dFdx (var_ref p)))
+ (expression vec3 abs (expression vec3 dFdy (var_ref p)))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 p))
+ ((return (expression vec4 +
+ (expression vec4 abs (expression vec4 dFdx (var_ref p)))
+ (expression vec4 abs (expression vec4 dFdy (var_ref p)))))))
+))
+++ /dev/null
-((function greaterThan
- (signature bvec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) ivec2 arg0)
- (declare (in) ivec2 arg1))
- ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) ivec3 arg0)
- (declare (in) ivec3 arg1))
- ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) ivec4 arg0)
- (declare (in) ivec4 arg1))
- ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))
-))
--- /dev/null
+((function greaterThan
+ (signature bvec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) ivec2 arg0)
+ (declare (in) ivec2 arg1))
+ ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) ivec3 arg0)
+ (declare (in) ivec3 arg1))
+ ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) ivec4 arg0)
+ (declare (in) ivec4 arg1))
+ ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))
+))
+++ /dev/null
-((function greaterThanEqual
- (signature bvec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) ivec2 arg0)
- (declare (in) ivec2 arg1))
- ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) ivec3 arg0)
- (declare (in) ivec3 arg1))
- ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) ivec4 arg0)
- (declare (in) ivec4 arg1))
- ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))
-))
--- /dev/null
+((function greaterThanEqual
+ (signature bvec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) ivec2 arg0)
+ (declare (in) ivec2 arg1))
+ ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) ivec3 arg0)
+ (declare (in) ivec3 arg1))
+ ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) ivec4 arg0)
+ (declare (in) ivec4 arg1))
+ ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))
+))
+++ /dev/null
-((function inversesqrt
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float rsq (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 rsq (var_ref arg0)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 rsq (var_ref arg0)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 rsq (var_ref arg0)))))
-))
--- /dev/null
+((function inversesqrt
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float rsq (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 rsq (var_ref arg0)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 rsq (var_ref arg0)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 rsq (var_ref arg0)))))
+))
+++ /dev/null
-((function length
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float abs (var_ref arg0)))))
-
- (signature float
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))
-
- (signature float
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))
-
- (signature float
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))
-))
--- /dev/null
+((function length
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float abs (var_ref arg0)))))
+
+ (signature float
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))
+
+ (signature float
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))
+
+ (signature float
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))
+))
+++ /dev/null
-((function lessThan
- (signature bvec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) ivec2 arg0)
- (declare (in) ivec2 arg1))
- ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) ivec3 arg0)
- (declare (in) ivec3 arg1))
- ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) ivec4 arg0)
- (declare (in) ivec4 arg1))
- ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))
-))
--- /dev/null
+((function lessThan
+ (signature bvec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) ivec2 arg0)
+ (declare (in) ivec2 arg1))
+ ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) ivec3 arg0)
+ (declare (in) ivec3 arg1))
+ ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) ivec4 arg0)
+ (declare (in) ivec4 arg1))
+ ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))
+))
+++ /dev/null
-((function lessThanEqual
- (signature bvec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) ivec2 arg0)
- (declare (in) ivec2 arg1))
- ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) ivec3 arg0)
- (declare (in) ivec3 arg1))
- ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) ivec4 arg0)
- (declare (in) ivec4 arg1))
- ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))
-))
--- /dev/null
+((function lessThanEqual
+ (signature bvec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) ivec2 arg0)
+ (declare (in) ivec2 arg1))
+ ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) ivec3 arg0)
+ (declare (in) ivec3 arg1))
+ ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) ivec4 arg0)
+ (declare (in) ivec4 arg1))
+ ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))
+))
+++ /dev/null
-((function log
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float log (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 log (var_ref arg0)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 log (var_ref arg0)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 log (var_ref arg0)))))
-))
--- /dev/null
+((function log
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float log (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 log (var_ref arg0)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 log (var_ref arg0)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 log (var_ref arg0)))))
+))
+++ /dev/null
-((function log2
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float log2 (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 log2 (var_ref arg0)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 log2 (var_ref arg0)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 log2 (var_ref arg0)))))
-))
--- /dev/null
+((function log2
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float log2 (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 log2 (var_ref arg0)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 log2 (var_ref arg0)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 log2 (var_ref arg0)))))
+))
+++ /dev/null
-((function matrixCompMult
- (signature mat2
- (parameters
- (declare (in) mat2 x)
- (declare (in) mat2 y))
- ((declare () mat2 z)
- (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-(return (var_ref z))))
-
- (signature mat3
- (parameters
- (declare (in) mat3 x)
- (declare (in) mat3 y))
- ((declare () mat3 z)
- (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
-(return (var_ref z))))
-
- (signature mat4
- (parameters
- (declare (in) mat4 x)
- (declare (in) mat4 y))
- ((declare () mat4 z)
- (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
- (assign (xyzw) (array_ref (var_ref z) (constant int (3))) (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
-(return (var_ref z))))
-
- (signature mat2x3
- (parameters
- (declare (in) mat2x3 x)
- (declare (in) mat2x3 y))
- ((declare () mat2x3 z)
- (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-(return (var_ref z))))
-
- (signature mat3x2
- (parameters
- (declare (in) mat3x2 x)
- (declare (in) mat3x2 y))
- ((declare () mat3x2 z)
- (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
-(return (var_ref z))))
-
- (signature mat2x4
- (parameters
- (declare (in) mat2x4 x)
- (declare (in) mat2x4 y))
- ((declare () mat2x4 z)
- (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
-(return (var_ref z))))
-
- (signature mat4x2
- (parameters
- (declare (in) mat4x2 x)
- (declare (in) mat4x2 y))
- ((declare () mat4x2 z)
- (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
- (assign (xy) (array_ref (var_ref z) (constant int (3))) (expression vec2 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
-(return (var_ref z))))
-
- (signature mat3x4
- (parameters
- (declare (in) mat3x4 x)
- (declare (in) mat3x4 y))
- ((declare () mat3x4 z)
- (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
-(return (var_ref z))))
-
- (signature mat4x3
- (parameters
- (declare (in) mat4x3 x)
- (declare (in) mat4x3 y))
- ((declare () mat4x3 z)
- (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
- (assign (xyz) (array_ref (var_ref z) (constant int (3))) (expression vec3 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
-(return (var_ref z))))
-))
--- /dev/null
+((function matrixCompMult
+ (signature mat2
+ (parameters
+ (declare (in) mat2 x)
+ (declare (in) mat2 y))
+ ((declare () mat2 z)
+ (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+(return (var_ref z))))
+
+ (signature mat3
+ (parameters
+ (declare (in) mat3 x)
+ (declare (in) mat3 y))
+ ((declare () mat3 z)
+ (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+(return (var_ref z))))
+
+ (signature mat4
+ (parameters
+ (declare (in) mat4 x)
+ (declare (in) mat4 y))
+ ((declare () mat4 z)
+ (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (3))) (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
+(return (var_ref z))))
+
+ (signature mat2x3
+ (parameters
+ (declare (in) mat2x3 x)
+ (declare (in) mat2x3 y))
+ ((declare () mat2x3 z)
+ (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+(return (var_ref z))))
+
+ (signature mat3x2
+ (parameters
+ (declare (in) mat3x2 x)
+ (declare (in) mat3x2 y))
+ ((declare () mat3x2 z)
+ (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+(return (var_ref z))))
+
+ (signature mat2x4
+ (parameters
+ (declare (in) mat2x4 x)
+ (declare (in) mat2x4 y))
+ ((declare () mat2x4 z)
+ (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+(return (var_ref z))))
+
+ (signature mat4x2
+ (parameters
+ (declare (in) mat4x2 x)
+ (declare (in) mat4x2 y))
+ ((declare () mat4x2 z)
+ (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (3))) (expression vec2 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
+(return (var_ref z))))
+
+ (signature mat3x4
+ (parameters
+ (declare (in) mat3x4 x)
+ (declare (in) mat3x4 y))
+ ((declare () mat3x4 z)
+ (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+(return (var_ref z))))
+
+ (signature mat4x3
+ (parameters
+ (declare (in) mat4x3 x)
+ (declare (in) mat4x3 y))
+ ((declare () mat4x3 z)
+ (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (3))) (expression vec3 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
+(return (var_ref z))))
+))
+++ /dev/null
-((function max
- (signature float
- (parameters
- (declare (in) float arg0)
- (declare (in) float arg1))
- ((return (expression float max (var_ref arg0) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) float arg1))
- ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) float arg1))
- ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) float arg1))
- ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))
-
- (signature int
- (parameters
- (declare (in) int arg0)
- (declare (in) int arg1))
- ((return (expression int max (var_ref arg0) (var_ref arg1)))))
-
- (signature ivec2
- (parameters
- (declare (in) ivec2 arg0)
- (declare (in) ivec2 arg1))
- ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))
-
- (signature ivec3
- (parameters
- (declare (in) ivec3 arg0)
- (declare (in) ivec3 arg1))
- ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))
-
- (signature ivec4
- (parameters
- (declare (in) ivec4 arg0)
- (declare (in) ivec4 arg1))
- ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))
-
- (signature ivec2
- (parameters
- (declare (in) ivec2 arg0)
- (declare (in) int arg1))
- ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))
-
- (signature ivec3
- (parameters
- (declare (in) ivec3 arg0)
- (declare (in) int arg1))
- ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))
-
- (signature ivec4
- (parameters
- (declare (in) ivec4 arg0)
- (declare (in) int arg1))
- ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))
-
- (signature uint
- (parameters
- (declare (in) uint arg0)
- (declare (in) uint arg1))
- ((return (expression uint max (var_ref arg0) (var_ref arg1)))))
-
- (signature uvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))
-
- (signature uvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))
-
- (signature uvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))
-
- (signature uvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uint arg1))
- ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))
-
- (signature uvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uint arg1))
- ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))
-
- (signature uvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uint arg1))
- ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))
-))
--- /dev/null
+((function max
+ (signature float
+ (parameters
+ (declare (in) float arg0)
+ (declare (in) float arg1))
+ ((return (expression float max (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature int
+ (parameters
+ (declare (in) int arg0)
+ (declare (in) int arg1))
+ ((return (expression int max (var_ref arg0) (var_ref arg1)))))
+
+ (signature ivec2
+ (parameters
+ (declare (in) ivec2 arg0)
+ (declare (in) ivec2 arg1))
+ ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature ivec3
+ (parameters
+ (declare (in) ivec3 arg0)
+ (declare (in) ivec3 arg1))
+ ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature ivec4
+ (parameters
+ (declare (in) ivec4 arg0)
+ (declare (in) ivec4 arg1))
+ ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature ivec2
+ (parameters
+ (declare (in) ivec2 arg0)
+ (declare (in) int arg1))
+ ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature ivec3
+ (parameters
+ (declare (in) ivec3 arg0)
+ (declare (in) int arg1))
+ ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature ivec4
+ (parameters
+ (declare (in) ivec4 arg0)
+ (declare (in) int arg1))
+ ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature uint
+ (parameters
+ (declare (in) uint arg0)
+ (declare (in) uint arg1))
+ ((return (expression uint max (var_ref arg0) (var_ref arg1)))))
+
+ (signature uvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature uvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature uvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature uvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uint arg1))
+ ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature uvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uint arg1))
+ ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))
+
+ (signature uvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uint arg1))
+ ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))
+))
+++ /dev/null
-((function min
- (signature float
- (parameters
- (declare (in) float arg0)
- (declare (in) float arg1))
- ((return (expression float min (var_ref arg0) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) float arg1))
- ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) float arg1))
- ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) float arg1))
- ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))
-
- (signature int
- (parameters
- (declare (in) int arg0)
- (declare (in) int arg1))
- ((return (expression int min (var_ref arg0) (var_ref arg1)))))
-
- (signature ivec2
- (parameters
- (declare (in) ivec2 arg0)
- (declare (in) ivec2 arg1))
- ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))
-
- (signature ivec3
- (parameters
- (declare (in) ivec3 arg0)
- (declare (in) ivec3 arg1))
- ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))
-
- (signature ivec4
- (parameters
- (declare (in) ivec4 arg0)
- (declare (in) ivec4 arg1))
- ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))
-
- (signature ivec2
- (parameters
- (declare (in) ivec2 arg0)
- (declare (in) int arg1))
- ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))
-
- (signature ivec3
- (parameters
- (declare (in) ivec3 arg0)
- (declare (in) int arg1))
- ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))
-
- (signature ivec4
- (parameters
- (declare (in) ivec4 arg0)
- (declare (in) int arg1))
- ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))
-
- (signature uint
- (parameters
- (declare (in) uint arg0)
- (declare (in) uint arg1))
- ((return (expression uint min (var_ref arg0) (var_ref arg1)))))
-
- (signature uvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))
-
- (signature uvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))
-
- (signature uvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))
-
- (signature uvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uint arg1))
- ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))
-
- (signature uvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uint arg1))
- ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))
-
- (signature uvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uint arg1))
- ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))
-))
--- /dev/null
+((function min
+ (signature float
+ (parameters
+ (declare (in) float arg0)
+ (declare (in) float arg1))
+ ((return (expression float min (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature int
+ (parameters
+ (declare (in) int arg0)
+ (declare (in) int arg1))
+ ((return (expression int min (var_ref arg0) (var_ref arg1)))))
+
+ (signature ivec2
+ (parameters
+ (declare (in) ivec2 arg0)
+ (declare (in) ivec2 arg1))
+ ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature ivec3
+ (parameters
+ (declare (in) ivec3 arg0)
+ (declare (in) ivec3 arg1))
+ ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature ivec4
+ (parameters
+ (declare (in) ivec4 arg0)
+ (declare (in) ivec4 arg1))
+ ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature ivec2
+ (parameters
+ (declare (in) ivec2 arg0)
+ (declare (in) int arg1))
+ ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature ivec3
+ (parameters
+ (declare (in) ivec3 arg0)
+ (declare (in) int arg1))
+ ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature ivec4
+ (parameters
+ (declare (in) ivec4 arg0)
+ (declare (in) int arg1))
+ ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature uint
+ (parameters
+ (declare (in) uint arg0)
+ (declare (in) uint arg1))
+ ((return (expression uint min (var_ref arg0) (var_ref arg1)))))
+
+ (signature uvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature uvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature uvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature uvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uint arg1))
+ ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature uvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uint arg1))
+ ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))
+
+ (signature uvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uint arg1))
+ ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))
+))
+++ /dev/null
-((function mix
- (signature float
- (parameters
- (declare (in) float arg0)
- (declare (in) float arg1)
- (declare (in) float arg2))
- ((return (expression float + (expression float * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression float * (var_ref arg1) (var_ref arg2))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1)
- (declare (in) vec2 arg2))
- ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression vec2 - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1)
- (declare (in) vec3 arg2))
- ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression vec3 - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1)
- (declare (in) vec4 arg2))
- ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression vec4 - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1)
- (declare (in) float arg2))
- ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1)
- (declare (in) float arg2))
- ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1)
- (declare (in) float arg2))
- ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))
-
- (signature float
- (parameters
- (declare (in) float v1)
- (declare (in) float v2)
- (declare (in) bool a))
- ((assign (var_ref a) (var_ref v1) (var_ref v2))
- (return (var_ref v1))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 v1)
- (declare (in) vec2 v2)
- (declare (in) bvec2 a))
- ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))
- (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))
- (return (var_ref v1))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 v1)
- (declare (in) vec3 v2)
- (declare (in) bvec3 a))
- ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))
- (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))
- (assign (swiz z (var_ref a)) (z) (var_ref v1) (swiz z (var_ref v2)))
- (return (var_ref v1))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 v1)
- (declare (in) vec4 v2)
- (declare (in) bvec4 a))
- ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))
- (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))
- (assign (swiz z (var_ref a)) (z) (var_ref v1) (swiz z (var_ref v2)))
- (assign (swiz w (var_ref a)) (w) (var_ref v1) (swiz w (var_ref v2)))
- (return (var_ref v1))))
-))
--- /dev/null
+((function mix
+ (signature float
+ (parameters
+ (declare (in) float arg0)
+ (declare (in) float arg1)
+ (declare (in) float arg2))
+ ((return (expression float + (expression float * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression float * (var_ref arg1) (var_ref arg2))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1)
+ (declare (in) vec2 arg2))
+ ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression vec2 - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1)
+ (declare (in) vec3 arg2))
+ ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression vec3 - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1)
+ (declare (in) vec4 arg2))
+ ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression vec4 - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1)
+ (declare (in) float arg2))
+ ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1)
+ (declare (in) float arg2))
+ ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1)
+ (declare (in) float arg2))
+ ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))
+
+ (signature float
+ (parameters
+ (declare (in) float v1)
+ (declare (in) float v2)
+ (declare (in) bool a))
+ ((assign (var_ref a) (var_ref v1) (var_ref v2))
+ (return (var_ref v1))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 v1)
+ (declare (in) vec2 v2)
+ (declare (in) bvec2 a))
+ ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))
+ (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))
+ (return (var_ref v1))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 v1)
+ (declare (in) vec3 v2)
+ (declare (in) bvec3 a))
+ ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))
+ (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))
+ (assign (swiz z (var_ref a)) (z) (var_ref v1) (swiz z (var_ref v2)))
+ (return (var_ref v1))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 v1)
+ (declare (in) vec4 v2)
+ (declare (in) bvec4 a))
+ ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))
+ (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))
+ (assign (swiz z (var_ref a)) (z) (var_ref v1) (swiz z (var_ref v2)))
+ (assign (swiz w (var_ref a)) (w) (var_ref v1) (swiz w (var_ref v2)))
+ (return (var_ref v1))))
+))
+++ /dev/null
-((function mod
- (signature float
- (parameters
- (declare (in) float arg0)
- (declare (in) float arg1))
- ((return (expression float % (var_ref arg0) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression vec2 % (var_ref arg0) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression vec3 % (var_ref arg0) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression vec4 % (var_ref arg0) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) float arg1))
- ((return (expression vec2 % (var_ref arg0) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) float arg1))
- ((return (expression vec3 % (var_ref arg0) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) float arg1))
- ((return (expression vec4 % (var_ref arg0) (var_ref arg1)))))
-))
--- /dev/null
+((function mod
+ (signature float
+ (parameters
+ (declare (in) float arg0)
+ (declare (in) float arg1))
+ ((return (expression float % (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression vec2 % (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression vec3 % (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression vec4 % (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec2 % (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec3 % (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) float arg1))
+ ((return (expression vec4 % (var_ref arg0) (var_ref arg1)))))
+))
+++ /dev/null
-((function modf
- (signature float
- (parameters
- (declare (in) float x)
- (declare (out) float i))
- ((declare () float t)
- (assign (x) (var_ref t) (expression float trunc (var_ref x)))
- (assign (x) (var_ref i) (var_ref t))
- (return (expression float - (var_ref x) (var_ref t)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 x)
- (declare (out) vec2 i))
- ((declare () vec2 t)
- (assign (xy) (var_ref t) (expression vec2 trunc (var_ref x)))
- (assign (xy) (var_ref i) (var_ref t))
- (return (expression vec2 - (var_ref x) (var_ref t)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 x)
- (declare (out) vec3 i))
- ((declare () vec3 t)
- (assign (xyz) (var_ref t) (expression vec3 trunc (var_ref x)))
- (assign (xyz) (var_ref i) (var_ref t))
- (return (expression vec3 - (var_ref x) (var_ref t)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 x)
- (declare (out) vec4 i))
- ((declare () vec4 t)
- (assign (xyzw) (var_ref t) (expression vec4 trunc (var_ref x)))
- (assign (xyzw) (var_ref i) (var_ref t))
- (return (expression vec4 - (var_ref x) (var_ref t)))))
-))
--- /dev/null
+((function modf
+ (signature float
+ (parameters
+ (declare (in) float x)
+ (declare (out) float i))
+ ((declare () float t)
+ (assign (x) (var_ref t) (expression float trunc (var_ref x)))
+ (assign (x) (var_ref i) (var_ref t))
+ (return (expression float - (var_ref x) (var_ref t)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x)
+ (declare (out) vec2 i))
+ ((declare () vec2 t)
+ (assign (xy) (var_ref t) (expression vec2 trunc (var_ref x)))
+ (assign (xy) (var_ref i) (var_ref t))
+ (return (expression vec2 - (var_ref x) (var_ref t)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x)
+ (declare (out) vec3 i))
+ ((declare () vec3 t)
+ (assign (xyz) (var_ref t) (expression vec3 trunc (var_ref x)))
+ (assign (xyz) (var_ref i) (var_ref t))
+ (return (expression vec3 - (var_ref x) (var_ref t)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x)
+ (declare (out) vec4 i))
+ ((declare () vec4 t)
+ (assign (xyzw) (var_ref t) (expression vec4 trunc (var_ref x)))
+ (assign (xyzw) (var_ref i) (var_ref t))
+ (return (expression vec4 - (var_ref x) (var_ref t)))))
+))
+++ /dev/null
-((function noise1
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float noise (var_ref x)))))
- (signature float
- (parameters
- (declare (in) vec2 x))
- ((return (expression float noise (var_ref x)))))
- (signature float
- (parameters
- (declare (in) vec3 x))
- ((return (expression float noise (var_ref x)))))
- (signature float
- (parameters
- (declare (in) vec4 x))
- ((return (expression float noise (var_ref x)))))
-))
--- /dev/null
+((function noise1
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float noise (var_ref x)))))
+ (signature float
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression float noise (var_ref x)))))
+ (signature float
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression float noise (var_ref x)))))
+ (signature float
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression float noise (var_ref x)))))
+))
+++ /dev/null
-((function noise2
- (signature vec2
- (parameters (declare (in) vec4 p))
- (
- (declare () float a)
- (declare () float b)
- (declare () vec2 t)
-
- (assign (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (return (var_ref t))
- ))
-
- (signature vec2
- (parameters (declare (in) vec3 p))
- (
- (declare () float a)
- (declare () float b)
- (declare () vec2 t)
-
- (assign (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (return (var_ref t))
- ))
-
- (signature vec2
- (parameters
- (declare (in ) vec2 p)
- )
- (
- (declare () float a)
- (declare () float b)
- (declare () vec2 t)
-
- (assign (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (return (var_ref t))
- ))
-
- (signature vec2
- (parameters
- (declare (in ) float p)
- )
- (
- (declare () float a)
- (declare () float b)
- (declare () vec2 t)
-
- (assign (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (return (var_ref t))
- ))
-))
--- /dev/null
+((function noise2
+ (signature vec2
+ (parameters (declare (in) vec4 p))
+ (
+ (declare () float a)
+ (declare () float b)
+ (declare () vec2 t)
+
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
+ (return (var_ref t))
+ ))
+
+ (signature vec2
+ (parameters (declare (in) vec3 p))
+ (
+ (declare () float a)
+ (declare () float b)
+ (declare () vec2 t)
+
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
+ (return (var_ref t))
+ ))
+
+ (signature vec2
+ (parameters
+ (declare (in ) vec2 p)
+ )
+ (
+ (declare () float a)
+ (declare () float b)
+ (declare () vec2 t)
+
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
+ (return (var_ref t))
+ ))
+
+ (signature vec2
+ (parameters
+ (declare (in ) float p)
+ )
+ (
+ (declare () float a)
+ (declare () float b)
+ (declare () vec2 t)
+
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
+ (return (var_ref t))
+ ))
+))
+++ /dev/null
-((function noise3
- (signature vec3
- (parameters (declare (in) vec4 p))
- (
- (declare () float a)
- (declare () float b)
- (declare () float c)
- (declare () vec3 t)
-
- (assign (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
- (assign (x) (var_ref c) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0)))))
-
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (assign (z) (var_ref t) (var_ref c))
- (return (var_ref t))
- ))
-
- (signature vec3
- (parameters (declare (in) vec3 p))
- (
- (declare () float a)
- (declare () float b)
- (declare () float c)
- (declare () vec3 t)
-
- (assign (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
- (assign (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))
-
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (assign (z) (var_ref t) (var_ref c))
- (return (var_ref t))
- ))
-
- (signature vec3
- (parameters (declare (in) vec2 p))
- (
- (declare () float a)
- (declare () float b)
- (declare () float c)
- (declare () vec3 t)
-
- (assign (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
- (assign (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))
-
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (assign (z) (var_ref t) (var_ref c))
- (return (var_ref t))
- ))
-
- (signature vec3
- (parameters (declare (in) float p))
- (
- (declare () float a)
- (declare () float b)
- (declare () float c)
- (declare () vec3 t)
-
- (assign (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
- (assign (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))
-
- (assign (x) (var_ref t) (var_ref a))
- (assign (y) (var_ref t) (var_ref b))
- (assign (z) (var_ref t) (var_ref c))
- (return (var_ref t))
- ))
-))
--- /dev/null
+((function noise3
+ (signature vec3
+ (parameters (declare (in) vec4 p))
+ (
+ (declare () float a)
+ (declare () float b)
+ (declare () float c)
+ (declare () vec3 t)
+
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
+ (assign (x) (var_ref c) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0)))))
+
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
+ (assign (z) (var_ref t) (var_ref c))
+ (return (var_ref t))
+ ))
+
+ (signature vec3
+ (parameters (declare (in) vec3 p))
+ (
+ (declare () float a)
+ (declare () float b)
+ (declare () float c)
+ (declare () vec3 t)
+
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
+ (assign (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))
+
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
+ (assign (z) (var_ref t) (var_ref c))
+ (return (var_ref t))
+ ))
+
+ (signature vec3
+ (parameters (declare (in) vec2 p))
+ (
+ (declare () float a)
+ (declare () float b)
+ (declare () float c)
+ (declare () vec3 t)
+
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
+ (assign (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))
+
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
+ (assign (z) (var_ref t) (var_ref c))
+ (return (var_ref t))
+ ))
+
+ (signature vec3
+ (parameters (declare (in) float p))
+ (
+ (declare () float a)
+ (declare () float b)
+ (declare () float c)
+ (declare () vec3 t)
+
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
+ (assign (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))
+
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
+ (assign (z) (var_ref t) (var_ref c))
+ (return (var_ref t))
+ ))
+))
+++ /dev/null
-((function noise4
- (signature vec4
- (parameters (declare (in) vec4 p))
- (
- (declare () float _x)
- (declare () float _y)
- (declare () float _z)
- (declare () float _w)
- (declare () vec4 _r)
-
- (declare () vec4 _p)
- (assign (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )
-
- (assign (x) (var_ref _x) (expression float noise(var_ref p)))
- (assign (x) (var_ref _y) (expression float noise(expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
- (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
- (assign (x) (var_ref _w) (expression float noise(expression vec4 + (var_ref _p) (constant vec4 (601.0 313.0 29.0 277.0)))))
-
- (assign (x) (var_ref _r) (var_ref _x))
- (assign (y) (var_ref _r) (var_ref _y))
- (assign (z) (var_ref _r) (var_ref _z))
- (assign (w) (var_ref _r) (var_ref _w))
- (return (var_ref _r))
- ))
-
- (signature vec4
- (parameters (declare (in) vec3 p))
- (
- (declare () float _x)
- (declare () float _y)
- (declare () float _z)
- (declare () float _w)
- (declare () vec4 _r)
-
- (declare () vec3 _p)
- (assign (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )
-
- (assign (x) (var_ref _x) (expression float noise(var_ref p)))
- (assign (x) (var_ref _y) (expression float noise(expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
- (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
- (assign (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0)))))
-
- (assign (x) (var_ref _r) (var_ref _x))
- (assign (y) (var_ref _r) (var_ref _y))
- (assign (z) (var_ref _r) (var_ref _z))
- (assign (w) (var_ref _r) (var_ref _w))
- (return (var_ref _r))
- ))
-
- (signature vec4
- (parameters (declare (in) vec2 p))
- (
- (declare () float _x)
- (declare () float _y)
- (declare () float _z)
- (declare () float _w)
- (declare () vec4 _r)
-
- (declare () vec2 _p)
- (assign (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )
-
- (assign (x) (var_ref _x) (expression float noise(var_ref p)))
- (assign (x) (var_ref _y) (expression float noise(expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
- (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
- (assign (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0)))))
-
- (assign (x) (var_ref _r) (var_ref _x))
- (assign (y) (var_ref _r) (var_ref _y))
- (assign (z) (var_ref _r) (var_ref _z))
- (assign (w) (var_ref _r) (var_ref _w))
- (return (var_ref _r))
- ))
-
- (signature vec4
- (parameters (declare (in) float p))
- (
- (declare () float _x)
- (declare () float _y)
- (declare () float _z)
- (declare () float _w)
- (declare () vec4 _r)
-
- (declare () float _p)
- (assign (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )
-
- (assign (x) (var_ref _x) (expression float noise(var_ref p)))
- (assign (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0)))))
- (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
- (assign (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0)))))
-
- (assign (x) (var_ref _r) (var_ref _x))
- (assign (y) (var_ref _r) (var_ref _y))
- (assign (z) (var_ref _r) (var_ref _z))
- (assign (w) (var_ref _r) (var_ref _w))
- (return (var_ref _r))
- ))
-))
--- /dev/null
+((function noise4
+ (signature vec4
+ (parameters (declare (in) vec4 p))
+ (
+ (declare () float _x)
+ (declare () float _y)
+ (declare () float _z)
+ (declare () float _w)
+ (declare () vec4 _r)
+
+ (declare () vec4 _p)
+ (assign (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )
+
+ (assign (x) (var_ref _x) (expression float noise(var_ref p)))
+ (assign (x) (var_ref _y) (expression float noise(expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
+ (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
+ (assign (x) (var_ref _w) (expression float noise(expression vec4 + (var_ref _p) (constant vec4 (601.0 313.0 29.0 277.0)))))
+
+ (assign (x) (var_ref _r) (var_ref _x))
+ (assign (y) (var_ref _r) (var_ref _y))
+ (assign (z) (var_ref _r) (var_ref _z))
+ (assign (w) (var_ref _r) (var_ref _w))
+ (return (var_ref _r))
+ ))
+
+ (signature vec4
+ (parameters (declare (in) vec3 p))
+ (
+ (declare () float _x)
+ (declare () float _y)
+ (declare () float _z)
+ (declare () float _w)
+ (declare () vec4 _r)
+
+ (declare () vec3 _p)
+ (assign (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )
+
+ (assign (x) (var_ref _x) (expression float noise(var_ref p)))
+ (assign (x) (var_ref _y) (expression float noise(expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
+ (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
+ (assign (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0)))))
+
+ (assign (x) (var_ref _r) (var_ref _x))
+ (assign (y) (var_ref _r) (var_ref _y))
+ (assign (z) (var_ref _r) (var_ref _z))
+ (assign (w) (var_ref _r) (var_ref _w))
+ (return (var_ref _r))
+ ))
+
+ (signature vec4
+ (parameters (declare (in) vec2 p))
+ (
+ (declare () float _x)
+ (declare () float _y)
+ (declare () float _z)
+ (declare () float _w)
+ (declare () vec4 _r)
+
+ (declare () vec2 _p)
+ (assign (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )
+
+ (assign (x) (var_ref _x) (expression float noise(var_ref p)))
+ (assign (x) (var_ref _y) (expression float noise(expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
+ (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
+ (assign (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0)))))
+
+ (assign (x) (var_ref _r) (var_ref _x))
+ (assign (y) (var_ref _r) (var_ref _y))
+ (assign (z) (var_ref _r) (var_ref _z))
+ (assign (w) (var_ref _r) (var_ref _w))
+ (return (var_ref _r))
+ ))
+
+ (signature vec4
+ (parameters (declare (in) float p))
+ (
+ (declare () float _x)
+ (declare () float _y)
+ (declare () float _z)
+ (declare () float _w)
+ (declare () vec4 _r)
+
+ (declare () float _p)
+ (assign (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )
+
+ (assign (x) (var_ref _x) (expression float noise(var_ref p)))
+ (assign (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0)))))
+ (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
+ (assign (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0)))))
+
+ (assign (x) (var_ref _r) (var_ref _x))
+ (assign (y) (var_ref _r) (var_ref _y))
+ (assign (z) (var_ref _r) (var_ref _z))
+ (assign (w) (var_ref _r) (var_ref _w))
+ (return (var_ref _r))
+ ))
+))
+++ /dev/null
-((function normalize
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float sign (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))
-))
--- /dev/null
+((function normalize
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float sign (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))
+))
+++ /dev/null
-((function not
- (signature bvec2
- (parameters
- (declare (in) bvec2 arg0))
- ((return (expression bvec2 ! (var_ref arg0)))))
-
- (signature bvec3
- (parameters
- (declare (in) bvec3 arg0))
- ((return (expression bvec3 ! (var_ref arg0)))))
-
- (signature bvec4
- (parameters
- (declare (in) bvec4 arg0))
- ((return (expression bvec4 ! (var_ref arg0)))))
-))
--- /dev/null
+((function not
+ (signature bvec2
+ (parameters
+ (declare (in) bvec2 arg0))
+ ((return (expression bvec2 ! (var_ref arg0)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) bvec3 arg0))
+ ((return (expression bvec3 ! (var_ref arg0)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) bvec4 arg0))
+ ((return (expression bvec4 ! (var_ref arg0)))))
+))
+++ /dev/null
-((function notEqual
- (signature bvec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) bvec2 arg0)
- (declare (in) bvec2 arg1))
- ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) bvec3 arg0)
- (declare (in) bvec3 arg1))
- ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) bvec4 arg0)
- (declare (in) bvec4 arg1))
- ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) ivec2 arg0)
- (declare (in) ivec2 arg1))
- ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) ivec3 arg0)
- (declare (in) ivec3 arg1))
- ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) ivec4 arg0)
- (declare (in) ivec4 arg1))
- ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec2
- (parameters
- (declare (in) uvec2 arg0)
- (declare (in) uvec2 arg1))
- ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec3
- (parameters
- (declare (in) uvec3 arg0)
- (declare (in) uvec3 arg1))
- ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))
-
- (signature bvec4
- (parameters
- (declare (in) uvec4 arg0)
- (declare (in) uvec4 arg1))
- ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))
-))
--- /dev/null
+((function notEqual
+ (signature bvec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) bvec2 arg0)
+ (declare (in) bvec2 arg1))
+ ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) bvec3 arg0)
+ (declare (in) bvec3 arg1))
+ ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) bvec4 arg0)
+ (declare (in) bvec4 arg1))
+ ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) ivec2 arg0)
+ (declare (in) ivec2 arg1))
+ ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) ivec3 arg0)
+ (declare (in) ivec3 arg1))
+ ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) ivec4 arg0)
+ (declare (in) ivec4 arg1))
+ ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec2
+ (parameters
+ (declare (in) uvec2 arg0)
+ (declare (in) uvec2 arg1))
+ ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec3
+ (parameters
+ (declare (in) uvec3 arg0)
+ (declare (in) uvec3 arg1))
+ ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))
+
+ (signature bvec4
+ (parameters
+ (declare (in) uvec4 arg0)
+ (declare (in) uvec4 arg1))
+ ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))
+))
+++ /dev/null
-((function outerProduct
- (signature mat2
- (parameters
- (declare (in) vec2 u)
- (declare (in) vec2 v))
- ((declare () mat2 m)
- (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
- (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
- (return (var_ref m))))
-
- (signature mat2x3
- (parameters
- (declare (in) vec3 u)
- (declare (in) vec2 v))
- ((declare () mat2x3 m)
- (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
- (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
- (return (var_ref m))))
-
- (signature mat2x4
- (parameters
- (declare (in) vec4 u)
- (declare (in) vec2 v))
- ((declare () mat2x4 m)
- (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
- (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
- (return (var_ref m))))
-
- (signature mat3x2
- (parameters
- (declare (in) vec2 u)
- (declare (in) vec3 v))
- ((declare () mat3x2 m)
- (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
- (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
- (assign (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))
- (return (var_ref m))
- ))
-
- (signature mat3
- (parameters
- (declare (in) vec3 u)
- (declare (in) vec3 v))
- ((declare () mat3 m)
- (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
- (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
- (assign (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))
- (return (var_ref m))))
-
- (signature mat3x4
- (parameters
- (declare (in) vec4 u)
- (declare (in) vec3 v))
- ((declare () mat3x4 m)
- (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
- (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
- (assign (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))
- (return (var_ref m))))
-
- (signature mat4x2
- (parameters
- (declare (in) vec2 u)
- (declare (in) vec4 v))
- ((declare () mat4x2 m)
- (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
- (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
- (assign (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))
- (assign (xy) (array_ref (var_ref m) (constant int (3))) (expression vec2 * (var_ref u) (swiz w (var_ref v))))
- (return (var_ref m))))
-
- (signature mat4x3
- (parameters
- (declare (in) vec3 u)
- (declare (in) vec4 v))
- ((declare () mat4x3 m)
- (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
- (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
- (assign (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))
- (assign (xyz) (array_ref (var_ref m) (constant int (3))) (expression vec3 * (var_ref u) (swiz w (var_ref v))))
- (return (var_ref m))))
-
- (signature mat4
- (parameters
- (declare (in) vec4 u)
- (declare (in) vec4 v))
- ((declare () mat4 m)
- (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
- (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
- (assign (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))
- (assign (xyzw) (array_ref (var_ref m) (constant int (3))) (expression vec4 * (var_ref u) (swiz w (var_ref v))))
- (return (var_ref m))))
-))
--- /dev/null
+((function outerProduct
+ (signature mat2
+ (parameters
+ (declare (in) vec2 u)
+ (declare (in) vec2 v))
+ ((declare () mat2 m)
+ (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
+ (return (var_ref m))))
+
+ (signature mat2x3
+ (parameters
+ (declare (in) vec3 u)
+ (declare (in) vec2 v))
+ ((declare () mat2x3 m)
+ (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
+ (return (var_ref m))))
+
+ (signature mat2x4
+ (parameters
+ (declare (in) vec4 u)
+ (declare (in) vec2 v))
+ ((declare () mat2x4 m)
+ (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
+ (return (var_ref m))))
+
+ (signature mat3x2
+ (parameters
+ (declare (in) vec2 u)
+ (declare (in) vec3 v))
+ ((declare () mat3x2 m)
+ (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))
+ (return (var_ref m))
+ ))
+
+ (signature mat3
+ (parameters
+ (declare (in) vec3 u)
+ (declare (in) vec3 v))
+ ((declare () mat3 m)
+ (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))
+ (return (var_ref m))))
+
+ (signature mat3x4
+ (parameters
+ (declare (in) vec4 u)
+ (declare (in) vec3 v))
+ ((declare () mat3x4 m)
+ (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))
+ (return (var_ref m))))
+
+ (signature mat4x2
+ (parameters
+ (declare (in) vec2 u)
+ (declare (in) vec4 v))
+ ((declare () mat4x2 m)
+ (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (3))) (expression vec2 * (var_ref u) (swiz w (var_ref v))))
+ (return (var_ref m))))
+
+ (signature mat4x3
+ (parameters
+ (declare (in) vec3 u)
+ (declare (in) vec4 v))
+ ((declare () mat4x3 m)
+ (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (3))) (expression vec3 * (var_ref u) (swiz w (var_ref v))))
+ (return (var_ref m))))
+
+ (signature mat4
+ (parameters
+ (declare (in) vec4 u)
+ (declare (in) vec4 v))
+ ((declare () mat4 m)
+ (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (3))) (expression vec4 * (var_ref u) (swiz w (var_ref v))))
+ (return (var_ref m))))
+))
+++ /dev/null
-((function pow
- (signature float
- (parameters
- (declare (in) float arg0)
- (declare (in) float arg1))
- ((return (expression float pow (var_ref arg0) (var_ref arg1)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0)
- (declare (in) vec2 arg1))
- ((return (expression vec2 pow (var_ref arg0) (var_ref arg1)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0)
- (declare (in) vec3 arg1))
- ((return (expression vec3 pow (var_ref arg0) (var_ref arg1)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0)
- (declare (in) vec4 arg1))
- ((return (expression vec4 pow (var_ref arg0) (var_ref arg1)))))
-))
--- /dev/null
+((function pow
+ (signature float
+ (parameters
+ (declare (in) float arg0)
+ (declare (in) float arg1))
+ ((return (expression float pow (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0)
+ (declare (in) vec2 arg1))
+ ((return (expression vec2 pow (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((return (expression vec3 pow (var_ref arg0) (var_ref arg1)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0)
+ (declare (in) vec4 arg1))
+ ((return (expression vec4 pow (var_ref arg0) (var_ref arg1)))))
+))
+++ /dev/null
-((function radians
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float * (var_ref arg0) (constant float (0.0174532925))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 * (var_ref arg0) (constant float (0.0174532925))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 * (var_ref arg0) (constant float (0.0174532925))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 * (var_ref arg0) (constant float (0.0174532925))))))
-))
--- /dev/null
+((function radians
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float * (var_ref arg0) (constant float (0.0174532925))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 * (var_ref arg0) (constant float (0.0174532925))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 * (var_ref arg0) (constant float (0.0174532925))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 * (var_ref arg0) (constant float (0.0174532925))))))
+))
+++ /dev/null
-((function reflect
- (signature float
- (parameters
- (declare (in) float i)
- (declare (in) float n))
- ((return (expression float -
- (var_ref i)
- (expression float *
- (constant float (2.0))
- (expression float *
- (expression float *
- (var_ref n)
- (var_ref i))
- (var_ref n)))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 i)
- (declare (in) vec2 n))
- ((return (expression vec2 -
- (var_ref i)
- (expression vec2 *
- (constant float (2.0))
- (expression vec2 *
- (expression float dot
- (var_ref n)
- (var_ref i))
- (var_ref n)))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 i)
- (declare (in) vec3 n))
- ((return (expression vec3 -
- (var_ref i)
- (expression vec3 *
- (constant float (2.0))
- (expression vec3 *
- (expression float dot
- (var_ref n)
- (var_ref i))
- (var_ref n)))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 i)
- (declare (in) vec4 n))
- ((return (expression vec4 -
- (var_ref i)
- (expression vec4 *
- (constant float (2.0))
- (expression vec4 *
- (expression float dot
- (var_ref n)
- (var_ref i))
- (var_ref n)))))))
-
-))
--- /dev/null
+((function reflect
+ (signature float
+ (parameters
+ (declare (in) float i)
+ (declare (in) float n))
+ ((return (expression float -
+ (var_ref i)
+ (expression float *
+ (constant float (2.0))
+ (expression float *
+ (expression float *
+ (var_ref n)
+ (var_ref i))
+ (var_ref n)))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 i)
+ (declare (in) vec2 n))
+ ((return (expression vec2 -
+ (var_ref i)
+ (expression vec2 *
+ (constant float (2.0))
+ (expression vec2 *
+ (expression float dot
+ (var_ref n)
+ (var_ref i))
+ (var_ref n)))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 i)
+ (declare (in) vec3 n))
+ ((return (expression vec3 -
+ (var_ref i)
+ (expression vec3 *
+ (constant float (2.0))
+ (expression vec3 *
+ (expression float dot
+ (var_ref n)
+ (var_ref i))
+ (var_ref n)))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 i)
+ (declare (in) vec4 n))
+ ((return (expression vec4 -
+ (var_ref i)
+ (expression vec4 *
+ (constant float (2.0))
+ (expression vec4 *
+ (expression float dot
+ (var_ref n)
+ (var_ref i))
+ (var_ref n)))))))
+
+))
+++ /dev/null
-((function refract
- (signature float
- (parameters
- (declare (in) float i)
- (declare (in) float n)
- (declare (in) float eta))
- ((declare () float k)
- (assign (x) (var_ref k)
- (expression float - (constant float (1.0))
- (expression float * (var_ref eta)
- (expression float * (var_ref eta)
- (expression float - (constant float (1.0))
- (expression float *
- (expression float * (var_ref n) (var_ref i))
- (expression float * (var_ref n) (var_ref i))))))))
- (if (expression bool < (var_ref k) (constant float (0.0)))
- ((return (constant float (0.0))))
- ((return (expression float -
- (expression float * (var_ref eta) (var_ref i))
- (expression float *
- (expression float +
- (expression float * (var_ref eta)
- (expression float * (var_ref n) (var_ref i)))
- (expression float sqrt (var_ref k)))
- (var_ref n))))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 i)
- (declare (in) vec2 n)
- (declare (in) float eta))
- ((declare () float k)
- (assign (x) (var_ref k)
- (expression float - (constant float (1.0))
- (expression float * (var_ref eta)
- (expression float * (var_ref eta)
- (expression float - (constant float (1.0))
- (expression float *
- (expression float dot (var_ref n) (var_ref i))
- (expression float dot (var_ref n) (var_ref i))))))))
- (if (expression bool < (var_ref k) (constant float (0.0)))
- ((return (constant vec2 (0.0 0.0))))
- ((return (expression vec2 -
- (expression vec2 * (var_ref eta) (var_ref i))
- (expression vec2 *
- (expression float +
- (expression float * (var_ref eta)
- (expression float dot (var_ref n) (var_ref i)))
- (expression float sqrt (var_ref k)))
- (var_ref n))))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 i)
- (declare (in) vec3 n)
- (declare (in) float eta))
- ((declare () float k)
- (assign (x) (var_ref k)
- (expression float - (constant float (1.0))
- (expression float * (var_ref eta)
- (expression float * (var_ref eta)
- (expression float - (constant float (1.0))
- (expression float *
- (expression float dot (var_ref n) (var_ref i))
- (expression float dot (var_ref n) (var_ref i))))))))
- (if (expression bool < (var_ref k) (constant float (0.0)))
- ((return (constant vec3 (0.0 0.0 0.0))))
- ((return (expression vec3 -
- (expression vec3 * (var_ref eta) (var_ref i))
- (expression vec3 *
- (expression float +
- (expression float * (var_ref eta)
- (expression float dot (var_ref n) (var_ref i)))
- (expression float sqrt (var_ref k)))
- (var_ref n))))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 i)
- (declare (in) vec4 n)
- (declare (in) float eta))
- ((declare () float k)
- (assign (x) (var_ref k)
- (expression float - (constant float (1.0))
- (expression float * (var_ref eta)
- (expression float * (var_ref eta)
- (expression float - (constant float (1.0))
- (expression float *
- (expression float dot (var_ref n) (var_ref i))
- (expression float dot (var_ref n) (var_ref i))))))))
- (if (expression bool < (var_ref k) (constant float (0.0)))
- ((return (constant vec4 (0.0 0.0 0.0 0.0))))
- ((return (expression vec4 -
- (expression vec4 * (var_ref eta) (var_ref i))
- (expression vec4 *
- (expression float +
- (expression float * (var_ref eta)
- (expression float dot (var_ref n) (var_ref i)))
- (expression float sqrt (var_ref k)))
- (var_ref n))))))))
-
-))
--- /dev/null
+((function refract
+ (signature float
+ (parameters
+ (declare (in) float i)
+ (declare (in) float n)
+ (declare (in) float eta))
+ ((declare () float k)
+ (assign (x) (var_ref k)
+ (expression float - (constant float (1.0))
+ (expression float * (var_ref eta)
+ (expression float * (var_ref eta)
+ (expression float - (constant float (1.0))
+ (expression float *
+ (expression float * (var_ref n) (var_ref i))
+ (expression float * (var_ref n) (var_ref i))))))))
+ (if (expression bool < (var_ref k) (constant float (0.0)))
+ ((return (constant float (0.0))))
+ ((return (expression float -
+ (expression float * (var_ref eta) (var_ref i))
+ (expression float *
+ (expression float +
+ (expression float * (var_ref eta)
+ (expression float * (var_ref n) (var_ref i)))
+ (expression float sqrt (var_ref k)))
+ (var_ref n))))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 i)
+ (declare (in) vec2 n)
+ (declare (in) float eta))
+ ((declare () float k)
+ (assign (x) (var_ref k)
+ (expression float - (constant float (1.0))
+ (expression float * (var_ref eta)
+ (expression float * (var_ref eta)
+ (expression float - (constant float (1.0))
+ (expression float *
+ (expression float dot (var_ref n) (var_ref i))
+ (expression float dot (var_ref n) (var_ref i))))))))
+ (if (expression bool < (var_ref k) (constant float (0.0)))
+ ((return (constant vec2 (0.0 0.0))))
+ ((return (expression vec2 -
+ (expression vec2 * (var_ref eta) (var_ref i))
+ (expression vec2 *
+ (expression float +
+ (expression float * (var_ref eta)
+ (expression float dot (var_ref n) (var_ref i)))
+ (expression float sqrt (var_ref k)))
+ (var_ref n))))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 i)
+ (declare (in) vec3 n)
+ (declare (in) float eta))
+ ((declare () float k)
+ (assign (x) (var_ref k)
+ (expression float - (constant float (1.0))
+ (expression float * (var_ref eta)
+ (expression float * (var_ref eta)
+ (expression float - (constant float (1.0))
+ (expression float *
+ (expression float dot (var_ref n) (var_ref i))
+ (expression float dot (var_ref n) (var_ref i))))))))
+ (if (expression bool < (var_ref k) (constant float (0.0)))
+ ((return (constant vec3 (0.0 0.0 0.0))))
+ ((return (expression vec3 -
+ (expression vec3 * (var_ref eta) (var_ref i))
+ (expression vec3 *
+ (expression float +
+ (expression float * (var_ref eta)
+ (expression float dot (var_ref n) (var_ref i)))
+ (expression float sqrt (var_ref k)))
+ (var_ref n))))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 i)
+ (declare (in) vec4 n)
+ (declare (in) float eta))
+ ((declare () float k)
+ (assign (x) (var_ref k)
+ (expression float - (constant float (1.0))
+ (expression float * (var_ref eta)
+ (expression float * (var_ref eta)
+ (expression float - (constant float (1.0))
+ (expression float *
+ (expression float dot (var_ref n) (var_ref i))
+ (expression float dot (var_ref n) (var_ref i))))))))
+ (if (expression bool < (var_ref k) (constant float (0.0)))
+ ((return (constant vec4 (0.0 0.0 0.0 0.0))))
+ ((return (expression vec4 -
+ (expression vec4 * (var_ref eta) (var_ref i))
+ (expression vec4 *
+ (expression float +
+ (expression float * (var_ref eta)
+ (expression float dot (var_ref n) (var_ref i)))
+ (expression float sqrt (var_ref k)))
+ (var_ref n))))))))
+
+))
+++ /dev/null
-((function round
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float round_even (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 round_even (var_ref arg0)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 round_even (var_ref arg0)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 round_even (var_ref arg0)))))
-))
--- /dev/null
+((function round
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float round_even (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 round_even (var_ref arg0)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 round_even (var_ref arg0)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 round_even (var_ref arg0)))))
+))
+++ /dev/null
-((function roundEven
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float round_even (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 round_even (var_ref arg0)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 round_even (var_ref arg0)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 round_even (var_ref arg0)))))
-))
--- /dev/null
+((function roundEven
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float round_even (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 round_even (var_ref arg0)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 round_even (var_ref arg0)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 round_even (var_ref arg0)))))
+))
+++ /dev/null
-((function sign
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float sign (var_ref x)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 sign (var_ref x)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 sign (var_ref x)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 sign (var_ref x)))))
-
- (signature int
- (parameters
- (declare (in) int x))
- ((return (expression int sign (var_ref x)))))
-
- (signature ivec2
- (parameters
- (declare (in) ivec2 x))
- ((return (expression ivec2 sign (var_ref x)))))
-
- (signature ivec3
- (parameters
- (declare (in) ivec3 x))
- ((return (expression ivec3 sign (var_ref x)))))
-
- (signature ivec4
- (parameters
- (declare (in) ivec4 x))
- ((return (expression ivec4 sign (var_ref x)))))
-))
-
--- /dev/null
+((function sign
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float sign (var_ref x)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression vec2 sign (var_ref x)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression vec3 sign (var_ref x)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression vec4 sign (var_ref x)))))
+
+ (signature int
+ (parameters
+ (declare (in) int x))
+ ((return (expression int sign (var_ref x)))))
+
+ (signature ivec2
+ (parameters
+ (declare (in) ivec2 x))
+ ((return (expression ivec2 sign (var_ref x)))))
+
+ (signature ivec3
+ (parameters
+ (declare (in) ivec3 x))
+ ((return (expression ivec3 sign (var_ref x)))))
+
+ (signature ivec4
+ (parameters
+ (declare (in) ivec4 x))
+ ((return (expression ivec4 sign (var_ref x)))))
+))
+
+++ /dev/null
-((function sin
- (signature float
- (parameters
- (declare (in) float angle))
- ((return (expression float sin (var_ref angle)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 angle))
- ((return (expression vec2 sin (var_ref angle)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 angle))
- ((return (expression vec3 sin (var_ref angle)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 angle))
- ((return (expression vec4 sin (var_ref angle)))))
-))
--- /dev/null
+((function sin
+ (signature float
+ (parameters
+ (declare (in) float angle))
+ ((return (expression float sin (var_ref angle)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 angle))
+ ((return (expression vec2 sin (var_ref angle)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 angle))
+ ((return (expression vec3 sin (var_ref angle)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 angle))
+ ((return (expression vec4 sin (var_ref angle)))))
+))
+++ /dev/null
-((function sinh
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float * (constant float (0.5))
- (expression float -
- (expression float exp (var_ref x))
- (expression float exp (expression float neg (var_ref x))))))))
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 * (constant float (0.5))
- (expression vec2 -
- (expression vec2 exp (var_ref x))
- (expression vec2 exp (expression vec2 neg (var_ref x))))))))
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 * (constant float (0.5))
- (expression vec3 -
- (expression vec3 exp (var_ref x))
- (expression vec3 exp (expression vec3 neg (var_ref x))))))))
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 * (constant float (0.5))
- (expression vec4 -
- (expression vec4 exp (var_ref x))
- (expression vec4 exp (expression vec4 neg (var_ref x))))))))
-))
--- /dev/null
+((function sinh
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float * (constant float (0.5))
+ (expression float -
+ (expression float exp (var_ref x))
+ (expression float exp (expression float neg (var_ref x))))))))
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression vec2 * (constant float (0.5))
+ (expression vec2 -
+ (expression vec2 exp (var_ref x))
+ (expression vec2 exp (expression vec2 neg (var_ref x))))))))
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression vec3 * (constant float (0.5))
+ (expression vec3 -
+ (expression vec3 exp (var_ref x))
+ (expression vec3 exp (expression vec3 neg (var_ref x))))))))
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression vec4 * (constant float (0.5))
+ (expression vec4 -
+ (expression vec4 exp (var_ref x))
+ (expression vec4 exp (expression vec4 neg (var_ref x))))))))
+))
+++ /dev/null
-((function smoothstep
- (signature float
- (parameters
- (declare (in) float edge0)
- (declare (in) float edge1)
- (declare (in) float x))
- ((declare () float t)
- (assign (x) (var_ref t)
- (expression float max
- (expression float min
- (expression float / (expression float - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (return (expression float * (var_ref t) (expression float * (var_ref t) (expression float - (constant float (3.0)) (expression float * (constant float (2.0)) (var_ref t))))))))
- (signature vec2
- (parameters
- (declare (in) float edge0)
- (declare (in) float edge1)
- (declare (in) vec2 x))
- ((declare () vec2 t)
- (assign (xy) (var_ref t)
- (expression vec2 max
- (expression vec2 min
- (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))
-
- (signature vec3
- (parameters
- (declare (in) float edge0)
- (declare (in) float edge1)
- (declare (in) vec3 x))
- ((declare () vec3 t)
- (assign (xyz) (var_ref t)
- (expression vec3 max
- (expression vec3 min
- (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))
-
-
- (signature vec4
- (parameters
- (declare (in) float edge0)
- (declare (in) float edge1)
- (declare (in) vec4 x))
- ((declare () vec4 t)
- (assign (xyzw) (var_ref t)
- (expression vec4 max
- (expression vec4 min
- (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 edge0)
- (declare (in) vec2 edge1)
- (declare (in) vec2 x))
- ((declare () vec2 t)
- (assign (xy) (var_ref t)
- (expression vec2 max
- (expression vec2 min
- (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression vec2 - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 edge0)
- (declare (in) vec3 edge1)
- (declare (in) vec3 x))
- ((declare () vec3 t)
- (assign (xyz) (var_ref t)
- (expression vec3 max
- (expression vec3 min
- (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression vec3 - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 edge0)
- (declare (in) vec4 edge1)
- (declare (in) vec4 x))
- ((declare () vec4 t)
- (assign (xyzw) (var_ref t)
- (expression vec4 max
- (expression vec4 min
- (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression vec4 - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))
-))
-
--- /dev/null
+((function smoothstep
+ (signature float
+ (parameters
+ (declare (in) float edge0)
+ (declare (in) float edge1)
+ (declare (in) float x))
+ ((declare () float t)
+ (assign (x) (var_ref t)
+ (expression float max
+ (expression float min
+ (expression float / (expression float - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
+ (constant float (1.0)))
+ (constant float (0.0))))
+ (return (expression float * (var_ref t) (expression float * (var_ref t) (expression float - (constant float (3.0)) (expression float * (constant float (2.0)) (var_ref t))))))))
+ (signature vec2
+ (parameters
+ (declare (in) float edge0)
+ (declare (in) float edge1)
+ (declare (in) vec2 x))
+ ((declare () vec2 t)
+ (assign (xy) (var_ref t)
+ (expression vec2 max
+ (expression vec2 min
+ (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
+ (constant float (1.0)))
+ (constant float (0.0))))
+ (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) float edge0)
+ (declare (in) float edge1)
+ (declare (in) vec3 x))
+ ((declare () vec3 t)
+ (assign (xyz) (var_ref t)
+ (expression vec3 max
+ (expression vec3 min
+ (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
+ (constant float (1.0)))
+ (constant float (0.0))))
+ (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))
+
+
+ (signature vec4
+ (parameters
+ (declare (in) float edge0)
+ (declare (in) float edge1)
+ (declare (in) vec4 x))
+ ((declare () vec4 t)
+ (assign (xyzw) (var_ref t)
+ (expression vec4 max
+ (expression vec4 min
+ (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
+ (constant float (1.0)))
+ (constant float (0.0))))
+ (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 edge0)
+ (declare (in) vec2 edge1)
+ (declare (in) vec2 x))
+ ((declare () vec2 t)
+ (assign (xy) (var_ref t)
+ (expression vec2 max
+ (expression vec2 min
+ (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression vec2 - (var_ref edge1) (var_ref edge0)))
+ (constant float (1.0)))
+ (constant float (0.0))))
+ (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 edge0)
+ (declare (in) vec3 edge1)
+ (declare (in) vec3 x))
+ ((declare () vec3 t)
+ (assign (xyz) (var_ref t)
+ (expression vec3 max
+ (expression vec3 min
+ (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression vec3 - (var_ref edge1) (var_ref edge0)))
+ (constant float (1.0)))
+ (constant float (0.0))))
+ (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 edge0)
+ (declare (in) vec4 edge1)
+ (declare (in) vec4 x))
+ ((declare () vec4 t)
+ (assign (xyzw) (var_ref t)
+ (expression vec4 max
+ (expression vec4 min
+ (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression vec4 - (var_ref edge1) (var_ref edge0)))
+ (constant float (1.0)))
+ (constant float (0.0))))
+ (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))
+))
+
+++ /dev/null
-((function sqrt
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float sqrt (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 sqrt (var_ref arg0)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 sqrt (var_ref arg0)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 sqrt (var_ref arg0)))))
-))
--- /dev/null
+((function sqrt
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float sqrt (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 sqrt (var_ref arg0)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 sqrt (var_ref arg0)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 sqrt (var_ref arg0)))))
+))
+++ /dev/null
-((function step
- (signature float
- (parameters
- (declare (in) float edge)
- (declare (in) float x))
- ((return (expression float b2f (expression bool >= (var_ref x) (var_ref edge))))))
-
- (signature vec2
- (parameters
- (declare (in) float edge)
- (declare (in) vec2 x))
- ((declare () vec2 t)
- (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
- (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
- (return (var_ref t))))
-
- (signature vec3
- (parameters
- (declare (in) float edge)
- (declare (in) vec3 x))
- ((declare () vec3 t)
- (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
- (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
- (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
- (return (var_ref t))))
-
- (signature vec4
- (parameters
- (declare (in) float edge)
- (declare (in) vec4 x))
- ((declare () vec4 t)
- (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
- (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
- (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
- (assign (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(var_ref edge))))
- (return (var_ref t))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 edge)
- (declare (in) vec2 x))
- ((declare () vec2 t)
- (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
- (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
- (return (var_ref t))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 edge)
- (declare (in) vec3 x))
- ((declare () vec3 t)
- (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
- (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
- (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
- (return (var_ref t))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 edge)
- (declare (in) vec4 x))
- ((declare () vec4 t)
- (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
- (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
- (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
- (assign (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(swiz w (var_ref edge)))))
- (return (var_ref t))))
-))
-
--- /dev/null
+((function step
+ (signature float
+ (parameters
+ (declare (in) float edge)
+ (declare (in) float x))
+ ((return (expression float b2f (expression bool >= (var_ref x) (var_ref edge))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) float edge)
+ (declare (in) vec2 x))
+ ((declare () vec2 t)
+ (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
+ (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
+ (return (var_ref t))))
+
+ (signature vec3
+ (parameters
+ (declare (in) float edge)
+ (declare (in) vec3 x))
+ ((declare () vec3 t)
+ (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
+ (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
+ (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
+ (return (var_ref t))))
+
+ (signature vec4
+ (parameters
+ (declare (in) float edge)
+ (declare (in) vec4 x))
+ ((declare () vec4 t)
+ (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
+ (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
+ (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
+ (assign (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(var_ref edge))))
+ (return (var_ref t))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 edge)
+ (declare (in) vec2 x))
+ ((declare () vec2 t)
+ (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
+ (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
+ (return (var_ref t))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 edge)
+ (declare (in) vec3 x))
+ ((declare () vec3 t)
+ (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
+ (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
+ (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
+ (return (var_ref t))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 edge)
+ (declare (in) vec4 x))
+ ((declare () vec4 t)
+ (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
+ (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
+ (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
+ (assign (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(swiz w (var_ref edge)))))
+ (return (var_ref t))))
+))
+
+++ /dev/null
-((function tan
- (signature float
- (parameters
- (declare (in) float angle))
- ((return (expression float / (expression float sin (var_ref angle)) (expression float cos (var_ref angle))))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 angle))
- ((return (expression vec2 / (expression vec2 sin (var_ref angle)) (expression vec2 cos (var_ref angle))))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 angle))
- ((return (expression vec3 / (expression vec3 sin (var_ref angle)) (expression vec3 cos (var_ref angle))))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 angle))
- ((return (expression vec4 / (expression vec4 sin (var_ref angle)) (expression vec4 cos (var_ref angle))))))
-))
--- /dev/null
+((function tan
+ (signature float
+ (parameters
+ (declare (in) float angle))
+ ((return (expression float / (expression float sin (var_ref angle)) (expression float cos (var_ref angle))))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 angle))
+ ((return (expression vec2 / (expression vec2 sin (var_ref angle)) (expression vec2 cos (var_ref angle))))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 angle))
+ ((return (expression vec3 / (expression vec3 sin (var_ref angle)) (expression vec3 cos (var_ref angle))))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 angle))
+ ((return (expression vec4 / (expression vec4 sin (var_ref angle)) (expression vec4 cos (var_ref angle))))))
+))
+++ /dev/null
-((function tanh
- (signature float
- (parameters
- (declare (in) float x))
- ((return (expression float /
- (expression float -
- (expression float exp (var_ref x))
- (expression float exp (expression float neg (var_ref x))))
- (expression float +
- (expression float exp (var_ref x))
- (expression float exp (expression float neg (var_ref x))))))))
- (signature vec2
- (parameters
- (declare (in) vec2 x))
- ((return (expression vec2 /
- (expression vec2 -
- (expression vec2 exp (var_ref x))
- (expression vec2 exp (expression vec2 neg (var_ref x))))
- (expression vec2 +
- (expression vec2 exp (var_ref x))
- (expression vec2 exp (expression vec2 neg (var_ref x))))))))
- (signature vec3
- (parameters
- (declare (in) vec3 x))
- ((return (expression vec3 /
- (expression vec3 -
- (expression vec3 exp (var_ref x))
- (expression vec3 exp (expression vec3 neg (var_ref x))))
- (expression vec3 +
- (expression vec3 exp (var_ref x))
- (expression vec3 exp (expression vec3 neg (var_ref x))))))))
- (signature vec4
- (parameters
- (declare (in) vec4 x))
- ((return (expression vec4 /
- (expression vec4 -
- (expression vec4 exp (var_ref x))
- (expression vec4 exp (expression vec4 neg (var_ref x))))
- (expression vec4 +
- (expression vec4 exp (var_ref x))
- (expression vec4 exp (expression vec4 neg (var_ref x))))))))
-))
--- /dev/null
+((function tanh
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (expression float /
+ (expression float -
+ (expression float exp (var_ref x))
+ (expression float exp (expression float neg (var_ref x))))
+ (expression float +
+ (expression float exp (var_ref x))
+ (expression float exp (expression float neg (var_ref x))))))))
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (expression vec2 /
+ (expression vec2 -
+ (expression vec2 exp (var_ref x))
+ (expression vec2 exp (expression vec2 neg (var_ref x))))
+ (expression vec2 +
+ (expression vec2 exp (var_ref x))
+ (expression vec2 exp (expression vec2 neg (var_ref x))))))))
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (expression vec3 /
+ (expression vec3 -
+ (expression vec3 exp (var_ref x))
+ (expression vec3 exp (expression vec3 neg (var_ref x))))
+ (expression vec3 +
+ (expression vec3 exp (var_ref x))
+ (expression vec3 exp (expression vec3 neg (var_ref x))))))))
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (expression vec4 /
+ (expression vec4 -
+ (expression vec4 exp (var_ref x))
+ (expression vec4 exp (expression vec4 neg (var_ref x))))
+ (expression vec4 +
+ (expression vec4 exp (var_ref x))
+ (expression vec4 exp (expression vec4 neg (var_ref x))))))))
+))
+++ /dev/null
-((function transpose
- (signature mat2
- (parameters
- (declare (in) mat2 m))
- ((declare () mat2 t)
- (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
-(return (var_ref t))))
-
- (signature mat3x2
- (parameters
- (declare (in) mat2x3 m))
- ((declare () mat3x2 t)
- (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
-(return (var_ref t))))
-
- (signature mat4x2
- (parameters
- (declare (in) mat2x4 m))
- ((declare () mat4x2 t)
- (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
-(return (var_ref t))))
-
- (signature mat2x3
- (parameters
- (declare (in) mat3x2 m))
- ((declare () mat2x3 t)
- (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
-(return (var_ref t))))
-
- (signature mat3
- (parameters
- (declare (in) mat3 m))
- ((declare () mat3 t)
- (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
-(return (var_ref t))))
-
- (signature mat4x3
- (parameters
- (declare (in) mat3x4 m))
- ((declare () mat4x3 t)
- (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
- (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))
-(return (var_ref t))))
-
- (signature mat2x4
- (parameters
- (declare (in) mat4x2 m))
- ((declare () mat2x4 t)
- (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
- (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
-(return (var_ref t))))
-
- (signature mat3x4
- (parameters
- (declare (in) mat4x3 m))
- ((declare () mat3x4 t)
- (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
- (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
- (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
- (assign (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))
-(return (var_ref t))))
-
- (signature mat4
- (parameters
- (declare (in) mat4 m))
- ((declare () mat4 t)
- (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
- (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
- (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
- (assign (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))
- (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
- (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
- (assign (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))
- (assign (w) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (3)))))
-(return (var_ref t))))
-)
-
-)
-
--- /dev/null
+((function transpose
+ (signature mat2
+ (parameters
+ (declare (in) mat2 m))
+ ((declare () mat2 t)
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+(return (var_ref t))))
+
+ (signature mat3x2
+ (parameters
+ (declare (in) mat2x3 m))
+ ((declare () mat3x2 t)
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
+(return (var_ref t))))
+
+ (signature mat4x2
+ (parameters
+ (declare (in) mat2x4 m))
+ ((declare () mat4x2 t)
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
+(return (var_ref t))))
+
+ (signature mat2x3
+ (parameters
+ (declare (in) mat3x2 m))
+ ((declare () mat2x3 t)
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
+(return (var_ref t))))
+
+ (signature mat3
+ (parameters
+ (declare (in) mat3 m))
+ ((declare () mat3 t)
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
+ (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
+(return (var_ref t))))
+
+ (signature mat4x3
+ (parameters
+ (declare (in) mat3x4 m))
+ ((declare () mat4x3 t)
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
+ (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))
+(return (var_ref t))))
+
+ (signature mat2x4
+ (parameters
+ (declare (in) mat4x2 m))
+ ((declare () mat2x4 t)
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
+ (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
+ (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
+(return (var_ref t))))
+
+ (signature mat3x4
+ (parameters
+ (declare (in) mat4x3 m))
+ ((declare () mat3x4 t)
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
+ (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
+ (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
+ (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
+ (assign (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))
+(return (var_ref t))))
+
+ (signature mat4
+ (parameters
+ (declare (in) mat4 m))
+ ((declare () mat4 t)
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
+ (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))
+ (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
+ (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
+ (assign (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))
+ (assign (w) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (3)))))
+(return (var_ref t))))
+)
+
+)
+
+++ /dev/null
-((function trunc
- (signature float
- (parameters
- (declare (in) float arg0))
- ((return (expression float trunc (var_ref arg0)))))
-
- (signature vec2
- (parameters
- (declare (in) vec2 arg0))
- ((return (expression vec2 trunc (var_ref arg0)))))
-
- (signature vec3
- (parameters
- (declare (in) vec3 arg0))
- ((return (expression vec3 trunc (var_ref arg0)))))
-
- (signature vec4
- (parameters
- (declare (in) vec4 arg0))
- ((return (expression vec4 trunc (var_ref arg0)))))
-))
--- /dev/null
+((function trunc
+ (signature float
+ (parameters
+ (declare (in) float arg0))
+ ((return (expression float trunc (var_ref arg0)))))
+
+ (signature vec2
+ (parameters
+ (declare (in) vec2 arg0))
+ ((return (expression vec2 trunc (var_ref arg0)))))
+
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0))
+ ((return (expression vec3 trunc (var_ref arg0)))))
+
+ (signature vec4
+ (parameters
+ (declare (in) vec4 arg0))
+ ((return (expression vec4 trunc (var_ref arg0)))))
+))
# Read the files in builtins/ir/*...add them to the supplied dictionary.
def read_ir_files(fs):
- for filename in glob(path.join(path.join(builtins_dir, 'ir'), '*')):
+ for filename in glob(path.join(path.join(builtins_dir, 'ir'), '*.ir')):
+ function_name = path.basename(filename).split('.')[0]
with open(filename) as f:
- fs[path.basename(filename)] = f.read()
+ fs[function_name] = f.read()
# Return a dictionary containing all builtin definitions (even generated)
def get_builtin_definitions():
write_profile(filename, profile)
def get_profile_list():
+ profile_files = []
+ for extension in ['frag', 'vert']:
+ path_glob = path.join(
+ path.join(builtins_dir, 'profiles'), '*.' + extension)
+ profile_files.extend(glob(path_glob))
profiles = []
- for pfile in sorted(glob(path.join(path.join(builtins_dir, 'profiles'), '*'))):
+ for pfile in sorted(profile_files):
profiles.append((pfile, path.basename(pfile).replace('.', '_')))
return profiles