Defining Variables
In OSL when you define a variable it will always be global scoped. This means the variable can be accessed from anywhere in your program including inside of defined functions.
Variables cannot be defined anywhere other than directly at the start of a line and using an equals sign.
If you attempt to access a variable that has not been defined yet, it will return the variable name as an untyped value.
Last updated