Hi,
I am relatively new to OSL coming from a GLSL background so forgive me if this is ignorant.
I am having trouble in Arnold with Arrays running out of range when connecting an OutColor.Red in maya from Node A to a Node B with an OSL Parameter of Datatype float.
Vice Versa if I define a variable in the OSL Node with Datatype 'color' and connect an OutAlpha from another Node into the Parameter of the OSL Node I get
[osl] Index [3] out of range in[0..2]: :-683395736 (group MyOSLNode, layer 1 arnold_link0_0, shader arnold_link0_0)
Do I need to define every attribute as a float[4] array and do all the processing for each [i] in order for the user to be able to freely mix and match float values (OutAlpha to In.red, Out.red to in.value etc.) the way they are used to in standard maya nodes ?
Thanks,
Jens
Out Color R to Cin.R works for me. It's Out Alpha to Cin.R that gives the index out of range error.
Could be a bug in the range checking code.
Thanks Stephen.
You are right OutColorR to Cin.R works, it is always OutAlpha that is acting up, for example OutAlpha to Cin.R as well. Guess I can't fix that but thanks for confirming that it might be a bug.