Table Of Contents
OSL stands for Open Shading Language and allows to write your own shader descriptions, that can be shared between other renderers that also offer OSL support. OSL scripts can be loaded as files or written directly inside the shader dialog.
You can find out more about OSL on this website: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage and some Redshift compatible OSL shaders here: https://github.com/redshift3d/RedshiftOSLShaders
Here you can load an OSL definition or write your own OSL script into the Code field.
Choose the source of your OSL code:
Only available in File mode.
Load an OSL file here.
Only available in File mode.
Open a text editor to edit the content of the currently loaded file.
Only available in Text mode.
Enter OSL code directly into this field.
Only available in Text mode.
Open an OSL file and copy its content to the Code field.
This area gives you feedback about the OSL code, such as compiler messages.
You can define variables in your OSL code which are then displayed in this tab.
You can for example add additional input variables for a float and a vector value at the preset code like this:
shader OSLShader(
color inColor=color(1, 1, 1),
float myValue=0.0,
point myVector=vector(0),
output color outColor=0
)
{
outColor = inColor;
}