From 2db589bbfcc4a3ef236e8ec43cbaa00fb635aaed Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 19 Aug 2019 16:27:24 +0200 Subject: [PATCH] Added more Math and MathF function mappings --- .../Mappings/HlslKnownMethods.cs | 42 ++++++++++++++++++- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/src/ComputeSharp.Shaders/Mappings/HlslKnownMethods.cs b/src/ComputeSharp.Shaders/Mappings/HlslKnownMethods.cs index f06116e5..70b07b48 100644 --- a/src/ComputeSharp.Shaders/Mappings/HlslKnownMethods.cs +++ b/src/ComputeSharp.Shaders/Mappings/HlslKnownMethods.cs @@ -16,17 +16,55 @@ namespace ComputeSharp.Shaders.Mappings private static readonly IReadOnlyDictionary KnownMethods = new Dictionary { // Math - ["System.Math.Cos"] = "cos", ["System.Math.Max"] = "max", + ["System.Math.Min"] = "min", ["System.Math.Pow"] = "pow", ["System.Math.Sin"] = "sin", + ["System.Math.Sinh"] = "sinh", + ["System.Math.Asin"] = "asin", + ["System.Math.Cos"] = "cos", + ["System.Math.Cosh"] = "cosh", + ["System.Math.Acos"] = "acos", + ["System.Math.Tan"] = "tan", + ["System.Math.Tanh"] = "tanh", + ["System.Math.Atan"] = "atan", + ["System.Math.Atan2"] = "atan2", + ["System.Math.Ceiling"] = "ceil", + ["System.Math.Floor"] = "floor", + ["System.Math.Clamp"] = "clamp", + ["System.Math.Exp"] = "exp", + ["System.Math.Log"] = "log", + ["System.Math.Log10"] = "log10", + ["System.Math.Round"] = "round", + ["System.Math.Sqrt"] = "sqrt", + ["System.Math.Sign"] = "sign", + ["System.Math.Truncate"] = "trunc", ["System.Math.PI"] = "3.1415926535897931", // MathF - ["System.MathF.Cos"] = "cos", ["System.MathF.Max"] = "max", + ["System.MathF.Min"] = "min", ["System.MathF.Pow"] = "pow", ["System.MathF.Sin"] = "sin", + ["System.MathF.Sinh"] = "sinh", + ["System.MathF.Asin"] = "asin", + ["System.MathF.Cos"] = "cos", + ["System.MathF.Cosh"] = "cosh", + ["System.MathF.Acos"] = "acos", + ["System.MathF.Tan"] = "tan", + ["System.MathF.Tanh"] = "tanh", + ["System.MathF.Atan"] = "atan", + ["System.MathF.Atan2"] = "atan2", + ["System.MathF.Ceiling"] = "ceil", + ["System.MathF.Floor"] = "floor", + ["System.MathF.Clamp"] = "clamp", + ["System.MathF.Exp"] = "exp", + ["System.MathF.Log"] = "log", + ["System.MathF.Log10"] = "log10", + ["System.MathF.Round"] = "round", + ["System.MathF.Sqrt"] = "sqrt", + ["System.MathF.Sign"] = "sign", + ["System.MathF.Truncate"] = "trunc", ["System.MathF.PI"] = "3.14159274f", // ThreadIds