daily update on 20240315 by nitload youmu
This commit is contained in:
@@ -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} = ";
|
||||
|
||||
Reference in New Issue
Block a user