Home | History | Annotate | Download | only in ir
      1 ((function distance
      2    (signature float
      3      (parameters
      4        (declare (in) float p0)
      5        (declare (in) float p1))
      6      ((return (expression float abs (expression float - (var_ref p0) (var_ref p1))))))
      7 
      8    (signature float
      9      (parameters
     10        (declare (in) vec2 p0)
     11        (declare (in) vec2 p1))
     12      ((declare () vec2 p)
     13       (assign (constant bool (1)) (xy) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))
     14       (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
     15 
     16    (signature float
     17      (parameters
     18        (declare (in) vec3 p0)
     19        (declare (in) vec3 p1))
     20      ((declare () vec3 p)
     21       (assign (constant bool (1)) (xyz) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))
     22       (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
     23 
     24    (signature float
     25      (parameters
     26        (declare (in) vec4 p0)
     27        (declare (in) vec4 p1))
     28      ((declare () vec4 p)
     29       (assign (constant bool (1)) (xyzw) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))
     30       (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
     31 ))
     32