Commit 5bfb68cd authored by Kenneth Graunke's avatar Kenneth Graunke
Browse files

glsl/builtins: Remove unnecessary (constant bool (1)) from assignments.

This isn't strictly necessary, but is definitely nicer.
parent bbafd2b8
......@@ -55,19 +55,19 @@
(
(declare () float r)
(if (expression bool > (expression float abs (var_ref x)) (constant float (0.000100))) (
(assign (constant bool (1)) (x) (var_ref r) (call atan ((expression float / (var_ref y) (var_ref x)))))
(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 (constant bool (1)) (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593)))))
((assign (constant bool (1)) (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)))))
((assign (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593))))))
)
(
))
)
(
(declare () float sgn)
(assign (constant bool (1)) (x) (var_ref sgn) (expression float sign (var_ref y)))
(assign (constant bool (1)) (x) (var_ref r) (expression float * (var_ref sgn) (constant float (1.5707965))))
(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) )
......@@ -80,10 +80,10 @@
(declare (in) vec2 y)
(declare (in) vec2 x))
((declare () vec2 r)
(assign (constant bool (1)) (x) (var_ref r)
(assign (x) (var_ref r)
(call atan ((swiz x (var_ref y))
(swiz x (var_ref x)))))
(assign (constant bool (1)) (y) (var_ref r)
(assign (y) (var_ref r)
(call atan ((swiz y (var_ref y))
(swiz y (var_ref x)))))
(return (var_ref r))))
......@@ -93,13 +93,13 @@
(declare (in) vec3 y)
(declare (in) vec3 x))
((declare () vec3 r)
(assign (constant bool (1)) (x) (var_ref r)
(assign (x) (var_ref r)
(call atan ((swiz x (var_ref y))
(swiz x (var_ref x)))))
(assign (constant bool (1)) (y) (var_ref r)
(assign (y) (var_ref r)
(call atan ((swiz y (var_ref y))
(swiz y (var_ref x)))))
(assign (constant bool (1)) (z) (var_ref r)
(assign (z) (var_ref r)
(call atan ((swiz z (var_ref y))
(swiz z (var_ref x)))))
(return (var_ref r))))
......@@ -109,16 +109,16 @@
(declare (in) vec4 y)
(declare (in) vec4 x))
((declare () vec4 r)
(assign (constant bool (1)) (x) (var_ref r)
(assign (x) (var_ref r)
(call atan ((swiz x (var_ref y))
(swiz x (var_ref x)))))
(assign (constant bool (1)) (y) (var_ref r)
(assign (y) (var_ref r)
(call atan ((swiz y (var_ref y))
(swiz y (var_ref x)))))
(assign (constant bool (1)) (z) (var_ref r)
(assign (z) (var_ref r)
(call atan ((swiz z (var_ref y))
(swiz z (var_ref x)))))
(assign (constant bool (1)) (w) (var_ref r)
(assign (w) (var_ref r)
(call atan ((swiz w (var_ref y))
(swiz w (var_ref x)))))
(return (var_ref r)))))
......
......@@ -10,7 +10,7 @@
(declare (in) vec2 p0)
(declare (in) vec2 p1))
((declare () vec2 p)
(assign (constant bool (1)) (xy) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))
(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
......@@ -18,7 +18,7 @@
(declare (in) vec3 p0)
(declare (in) vec3 p1))
((declare () vec3 p)
(assign (constant bool (1)) (xyz) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))
(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
......@@ -26,6 +26,6 @@
(declare (in) vec4 p0)
(declare (in) vec4 p1))
((declare () vec4 p)
(assign (constant bool (1)) (xyzw) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))
(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))))))
))
......@@ -4,8 +4,8 @@
(declare (in) mat2 x)
(declare (in) mat2 y))
((declare () mat2 z)
(assign (constant bool (1)) (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 (constant bool (1)) (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 (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
......@@ -13,9 +13,9 @@
(declare (in) mat3 x)
(declare (in) mat3 y))
((declare () mat3 z)
(assign (constant bool (1)) (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 (constant bool (1)) (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 (constant bool (1)) (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 (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
......@@ -23,10 +23,10 @@
(declare (in) mat4 x)
(declare (in) mat4 y))
((declare () mat4 z)
(assign (constant bool (1)) (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 (constant bool (1)) (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 (constant bool (1)) (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 (constant bool (1)) (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)))))
(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
......@@ -34,8 +34,8 @@
(declare (in) mat2x3 x)
(declare (in) mat2x3 y))
((declare () mat2x3 z)
(assign (constant bool (1)) (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 (constant bool (1)) (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 (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
......@@ -43,9 +43,9 @@
(declare (in) mat3x2 x)
(declare (in) mat3x2 y))
((declare () mat3x2 z)
(assign (constant bool (1)) (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 (constant bool (1)) (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 (constant bool (1)) (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 (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
......@@ -53,8 +53,8 @@
(declare (in) mat2x4 x)
(declare (in) mat2x4 y))
((declare () mat2x4 z)
(assign (constant bool (1)) (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 (constant bool (1)) (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 (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
......@@ -62,10 +62,10 @@
(declare (in) mat4x2 x)
(declare (in) mat4x2 y))
((declare () mat4x2 z)
(assign (constant bool (1)) (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 (constant bool (1)) (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 (constant bool (1)) (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 (constant bool (1)) (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)))))
(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
......@@ -73,9 +73,9 @@
(declare (in) mat3x4 x)
(declare (in) mat3x4 y))
((declare () mat3x4 z)
(assign (constant bool (1)) (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 (constant bool (1)) (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 (constant bool (1)) (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 (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
......@@ -83,9 +83,9 @@
(declare (in) mat4x3 x)
(declare (in) mat4x3 y))
((declare () mat4x3 z)
(assign (constant bool (1)) (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 (constant bool (1)) (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 (constant bool (1)) (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 (constant bool (1)) (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)))))
(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))))
))
......@@ -4,9 +4,8 @@
(declare (in) float x)
(declare (out) float i))
((declare () float t)
(assign (constant bool (1)) (x) (var_ref t)
(expression float trunc (var_ref x)))
(assign (constant bool (1)) (x) (var_ref i) (var_ref 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
......@@ -14,9 +13,8 @@
(declare (in) vec2 x)
(declare (out) vec2 i))
((declare () vec2 t)
(assign (constant bool (1)) (xy) (var_ref t)
(expression vec2 trunc (var_ref x)))
(assign (constant bool (1)) (xy) (var_ref i) (var_ref 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
......@@ -24,9 +22,8 @@
(declare (in) vec3 x)
(declare (out) vec3 i))
((declare () vec3 t)
(assign (constant bool (1)) (xyz) (var_ref t)
(expression vec3 trunc (var_ref x)))
(assign (constant bool (1)) (xyz) (var_ref i) (var_ref 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
......@@ -34,8 +31,7 @@
(declare (in) vec4 x)
(declare (out) vec4 i))
((declare () vec4 t)
(assign (constant bool (1)) (xyzw) (var_ref t)
(expression vec4 trunc (var_ref x)))
(assign (constant bool (1)) (xyzw) (var_ref i) (var_ref 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)))))
))
......@@ -6,10 +6,10 @@
(declare () float b)
(declare () vec2 t)
(assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
(assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
(assign (constant bool (1)) (x) (var_ref t) (var_ref a))
(assign (constant bool (1)) (y) (var_ref t) (var_ref b))
(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))
))
......@@ -20,10 +20,10 @@
(declare () float b)
(declare () vec2 t)
(assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
(assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
(assign (constant bool (1)) (x) (var_ref t) (var_ref a))
(assign (constant bool (1)) (y) (var_ref t) (var_ref b))
(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))
))
......@@ -36,10 +36,10 @@
(declare () float b)
(declare () vec2 t)
(assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
(assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
(assign (constant bool (1)) (x) (var_ref t) (var_ref a))
(assign (constant bool (1)) (y) (var_ref t) (var_ref b))
(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))
))
......@@ -52,10 +52,10 @@
(declare () float b)
(declare () vec2 t)
(assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
(assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
(assign (constant bool (1)) (x) (var_ref t) (var_ref a))
(assign (constant bool (1)) (y) (var_ref t) (var_ref b))
(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))
))
))
......@@ -7,13 +7,13 @@
(declare () float c)
(declare () vec3 t)
(assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
(assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
(assign (constant bool (1)) (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 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 (constant bool (1)) (x) (var_ref t) (var_ref a))
(assign (constant bool (1)) (y) (var_ref t) (var_ref b))
(assign (constant bool (1)) (z) (var_ref t) (var_ref c))
(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))
))
......@@ -25,13 +25,13 @@
(declare () float c)
(declare () vec3 t)
(assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
(assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
(assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))
(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 (constant bool (1)) (x) (var_ref t) (var_ref a))
(assign (constant bool (1)) (y) (var_ref t) (var_ref b))
(assign (constant bool (1)) (z) (var_ref t) (var_ref c))
(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))
))
......@@ -43,13 +43,13 @@
(declare () float c)
(declare () vec3 t)
(assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
(assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
(assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))
(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 (constant bool (1)) (x) (var_ref t) (var_ref a))
(assign (constant bool (1)) (y) (var_ref t) (var_ref b))
(assign (constant bool (1)) (z) (var_ref t) (var_ref c))
(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))
))
......@@ -61,13 +61,13 @@
(declare () float c)
(declare () vec3 t)
(assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
(assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
(assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))
(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 (constant bool (1)) (x) (var_ref t) (var_ref a))
(assign (constant bool (1)) (y) (var_ref t) (var_ref b))
(assign (constant bool (1)) (z) (var_ref t) (var_ref c))
(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))
))
))
......@@ -9,17 +9,17 @@
(declare () vec4 _r)
(declare () vec4 _p)
(assign (constant bool (1)) (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )
(assign (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )
(assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))
(assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
(assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))
(assign (constant bool (1)) (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 _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 (constant bool (1)) (x) (var_ref _r) (var_ref _x))
(assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))
(assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))
(assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))
(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))
))
......@@ -33,17 +33,17 @@
(declare () vec4 _r)
(declare () vec3 _p)
(assign (constant bool (1)) (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )
(assign (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )
(assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))
(assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
(assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))
(assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.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 (constant bool (1)) (x) (var_ref _r) (var_ref _x))
(assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))
(assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))
(assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))
(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))
))
......@@ -57,17 +57,17 @@
(declare () vec4 _r)
(declare () vec2 _p)
(assign (constant bool (1)) (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )
(assign (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )
(assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))
(assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
(assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))
(assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.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 (constant bool (1)) (x) (var_ref _r) (var_ref _x))
(assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))
(assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))
(assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))
(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))
))
......@@ -81,17 +81,17 @@
(declare () vec4 _r)
(declare () float _p)
(assign (constant bool (1)) (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )
(assign (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )
(assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))
(assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0 313.0 29.0 277.0)))))
(assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))
(assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0 313.0 29.0 277.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 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 float + (var_ref _p) (constant float (601.0 313.0 29.0 277.0)))))
(assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))
(assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))
(assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))
(assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))
(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))
))
))
......@@ -4,8 +4,8 @@
(declare (in) vec2 u)
(declare (in) vec2 v))
((declare () mat2 m)
(assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
(assign (constant bool (1)) (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 (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
......@@ -13,8 +13,8 @@
(declare (in) vec3 u)
(declare (in) vec2 v))
((declare () mat2x3 m)
(assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
(assign (constant bool (1)) (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 (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
......@@ -22,8 +22,8 @@
(declare (in) vec4 u)
(declare (in) vec2 v))
((declare () mat2x4 m)
(assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
(assign (constant bool (1)) (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 (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
......@@ -31,9 +31,9 @@
(declare (in) vec2 u)
(declare (in) vec3 v))
((declare () mat3x2 m)
(assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
(assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
(assign (constant bool (1)) (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 (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))
))
......@@ -42,9 +42,9 @@
(declare (in) vec3 u)
(declare (in) vec3 v))
((declare () mat3 m)
(assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
(assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
(assign (constant bool (1)) (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 (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
......@@ -52,9 +52,9 @@
(declare (in) vec4 u)
(declare (in) vec3 v))
((declare () mat3x4 m)
(assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
(assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
(assign (constant bool (1)) (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 (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
......@@ -62,10 +62,10 @@
(declare (in) vec2 u)
(declare (in) vec4 v))
((declare () mat4x2 m)
(assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
(assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
(assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))
(assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (3))) (expression vec2 * (var_ref u) (swiz w (var_ref v))))
(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
......@@ -73,10 +73,10 @@
(declare (in) vec3 u)
(declare (in) vec4 v))
((declare () mat4x3 m)
(assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
(assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
(assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))
(assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (3))) (expression vec3 * (var_ref u) (swiz w (var_ref v))))
(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
......@@ -84,9 +84,9 @@
(declare (in) vec4 u)
(declare (in) vec4 v))
((declare () mat4 m)
(assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
(assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
(assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))
(assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (3))) (expression vec4 * (var_ref u) (swiz w (var_ref v))))
(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))))
))
......@@ -5,7 +5,7 @@
(declare (in) float n)
(declare (in) float eta))
((declare () float k)
(assign (constant bool (1)) (x) (var_ref k)
(assign (x) (var_ref k)
(expression float - (constant float (1.0))
(expression float * (var_ref eta)
(expression float * (var_ref eta)
......@@ -30,7 +30,7 @@
(declare (in) vec2 n)
(declare (in) float eta))
((declare () float k)
(assign (constant bool (1)) (x) (var_ref k)
(assign (x) (var_ref k)
(expression float - (constant float (1.0))
(expression float * (var_ref eta)
(expression float * (var_ref eta)
......@@ -55,7 +55,7 @@
(declare (in) vec3 n)
(declare (in) float eta))
((declare () float k)
(assign (constant bool (1)) (x) (var_ref k)
(assign (x) (var_ref k)
(expression float - (constant float (1.0))
(expression float * (var_ref eta)
(expression float * (var_ref eta)
......@@ -80,7 +80,7 @@
(declare (in) vec4 n)
(declare (in) float eta))
((declare () float k)
(assign (constant bool (1)) (x) (var_ref k)
(assign (x) (var_ref k)
(expression float - (constant float (1.0))
(expression float * (var_ref eta)
(expression float * (var_ref eta)
......
......@@ -5,7 +5,7 @@
(declare (in) float edge1)
(declare (in) float x))
<