From: Mikko Rasa Date: Tue, 13 Apr 2021 10:10:56 +0000 (+0300) Subject: Fix incorrect definition of the builtin cross function in GLSL X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=34e3f9d66eb394d8ad69ee66db0cca35b0a15123;p=libs%2Fgl.git Fix incorrect definition of the builtin cross function in GLSL --- diff --git a/builtin_data/_builtin.glsl b/builtin_data/_builtin.glsl index 124a117b..3bf722cd 100644 --- a/builtin_data/_builtin.glsl +++ b/builtin_data/_builtin.glsl @@ -268,7 +268,7 @@ float dot(float x, float y); float dot(vec2 x, vec2 y); float dot(vec3 x, vec3 y); float dot(vec4 x, vec4 y); -vec3 cross(vec3 x); +vec3 cross(vec3 x, vec3 y); float normalize(float x); vec2 normalize(vec2 x); vec3 normalize(vec3 x); diff --git a/scripts/builtin_funcs.py b/scripts/builtin_funcs.py index 24cc3643..3825cb2b 100755 --- a/scripts/builtin_funcs.py +++ b/scripts/builtin_funcs.py @@ -114,7 +114,7 @@ shared_funcs = [ ("T::Base length(T x)", floattypes), ("T::Base distance(T p0, T p1)", floattypes), ("T::Base dot(T x, T y)", floattypes), - "vec3 cross(vec3 x)", + "vec3 cross(vec3 x, vec3 y)", ("T normalize(T x)", floattypes), ("T faceforward(T N, T I, T Nref)", floattypes), ("T reflect(T I, T N)", floattypes),