Closed dpw13 closed 4 months ago
else if (String_Equal(functionName, "pow"))
{
HLSLExpression* argument[2];
if (GetFunctionArguments(functionCall, argument, 2) != 2)
{
Error("%s expects 2 arguments", functionName);
return;
}
// See rsqrt above regarding abs().
m_writer.Write("pow(abs(");
OutputExpression(argument[0]);
m_writer.Write("),");
OutputExpression(argument[1], &functionCall->function->argument->type);
m_writer.Write(")");
handled = true;
}
Adding this after handling log10
in GLSLGenerator.cpp fixes "stormy sea", as pow()
is also affected by the NaN madness.
See https://github.com/projectM-visualizer/projectm/issues/724