I'm trying to create a way to calculate imaginary numbers in OSL using the struct
constructor. Here is the beginning of my code:
#include "stdosl.h"
struct complex {
color r;
color i;
};
complex test;
According to the documentation, that should create a complex
datatype, then initialize a variable named test
. Instead, I get these errors:
ERROR: <path-to-file>.osl:8: error: Unknown shader type: complex
ERROR: <path-to-file>.osl:8: error: Syntax error: syntax error
Error: OSL script compilation failed, see console for errors
This seems to indicate a syntax error on line 8, but I can't figure out what is wrong.