From f774f5c8005578a6d5f7e49af3bbe1adbab52244 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 17 Dec 2023 14:29:49 +0200 Subject: [PATCH] Remove incorrect definition of mix(float, float, float) from builtins --- builtin_data/_builtin.glsl | 1 - scripts/builtin_funcs.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin_data/_builtin.glsl b/builtin_data/_builtin.glsl index dcbb6d0a..041bead2 100644 --- a/builtin_data/_builtin.glsl +++ b/builtin_data/_builtin.glsl @@ -256,7 +256,6 @@ float mix(float x, float y, float a); vec2 mix(vec2 x, vec2 y, vec2 a); vec3 mix(vec3 x, vec3 y, vec3 a); vec4 mix(vec4 x, vec4 y, vec4 a); -float mix(float x, float y, float a) { return mix(x, y, float(a)); } vec2 mix(vec2 x, vec2 y, float a) { return mix(x, y, vec2(a)); } vec3 mix(vec3 x, vec3 y, float a) { return mix(x, y, vec3(a)); } vec4 mix(vec4 x, vec4 y, float a) { return mix(x, y, vec4(a)); } diff --git a/scripts/builtin_funcs.py b/scripts/builtin_funcs.py index 16c5721b..e8b4a470 100755 --- a/scripts/builtin_funcs.py +++ b/scripts/builtin_funcs.py @@ -115,7 +115,7 @@ shared_funcs = [ ("T clamp(T x, T minVal, T maxVal)", arithmetictypes), ("T clamp(T x, T::Base minVal, T::Base maxVal)", "clamp(x, T(minVal), T(maxVal))", arithmeticvectypes), ("T mix(T x, T y, T a)", floattypes), - ("T mix(T x, T y, T::Base a)", "mix(x, y, T(a))", floattypes), + ("T mix(T x, T y, T::Base a)", "mix(x, y, T(a))", floatvectypes), ("T mix(T x, T y, bool[T::Dim] a)", arithmetictypes), ("T step(T edge, T x)", floattypes), ("T step(T::Base edge, T x)", "step(T(edge), x)", floatvectypes), -- 2.45.2