From 34e3f9d66eb394d8ad69ee66db0cca35b0a15123 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 13 Apr 2021 13:10:56 +0300 Subject: [PATCH] Fix incorrect definition of the builtin cross function in GLSL --- builtin_data/_builtin.glsl | 2 +- scripts/builtin_funcs.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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), -- 2.45.2