daily update on 20240315 by nitload youmu

This commit is contained in:
YoumuLiu
2024-03-16 03:09:00 +08:00
parent a770bbe685
commit 15bf989285
84 changed files with 1064 additions and 1981 deletions
@@ -36,20 +36,23 @@ namespace StgSharp.Graphics.GL.ShaderEdit
{
if (inputParams.Length != function.ParameterCount)
{
// Param list length not equal
throw new ArgumentException("Provided parameters does not match function's parameter list.");
}
if (!ShaderParameter.IsSameType(outPut, function.outPut))
{
// Type of returning value not qual
throw new Exception("Provided parameters does not match function's parameter list.");
}
for (int i = 0; i < inputParams.Length; i++)
{
if (!ShaderParameter.IsSameType(function.inputList[i], inputParams[i]))
{
// Input type not match
throw new Exception("Provided parameters does not match function's parameter list.");
}
}
string codeLine = "";
string codeLine = ""; // adding a line like " outvalue = Func(input1, input2,...); "
if (outPut != ShaderParameter.Void)
{
codeLine += $"{outPut.name} = ";