arraylength() not implemented
Brought to you by:
ltatkinson,
pgregory
This SL function does not seem to be implemented in Aqsis:
float arraylength( v )
This function returns the length of an array, which is primarily useful when the array is of indeterminate length. A value of -1 is returned if the variable v is actually a scalar.
The function is very useful for handling variable-length array arguments to shaders and shader functions. Without it, an explicit length parameter is needed in addition to the array. Even for fixed length arrays, arraylength() can significantly improve the quality of SL code.
Logged In: YES
user_id=1357702
Originator: YES
Update: it seems like array parameters of indeterminate length are not implemented in Aqsis SL. That reduces the usefulness of arraylength(). It would still be nice to have, though. Even for fixed length arrays it gives cleaner SL code.
Indeterminate length array arguments to shaders and SL functions is not the most common programming construct in SL, but I have a few PRMan shaders using the feature, and it's certainly a nice thing to have. I fully understand if it's not a high priority task to implement it, though.