Embed presentation
Download as PDF, PPTX





![Example Surface Shader
● A sample surface shader looks like below:
surface
test (string noisename = "gabor", float freq = 5, output color Cout =
0)
{
point p = P*freq * (1.0+10*v*v) * (1.0+10*u*u);
float n = noise(noisename, p[0], p[1]);
cout = n * 0.5 + 0.5;
}](https://image.slidesharecdn.com/osl-151222134400/75/Open-Shading-Language-OSL-6-2048.jpg)



This document provides an introduction to Open Shading Language (OSL), including: - OSL was developed at Sony Imageworks to describe shaders for use in rendering pipelines for movies. It uses the LLVM infrastructure. - OSL allows accurately replicating measured surface properties like BRDFs to flexibly represent surface properties in rendered scenes. - In OSL, shaders define functions that return surface, displacement, volume properties or new shaders, rather than directly calculating pixel colors. Reflectance and transmittance are modeled as functions called "closures". - OSL closures compute an explicit symbolic description of how surfaces or volumes scatter light, which can be evaluated, sampled





![Example Surface Shader
● A sample surface shader looks like below:
surface
test (string noisename = "gabor", float freq = 5, output color Cout =
0)
{
point p = P*freq * (1.0+10*v*v) * (1.0+10*u*u);
float n = noise(noisename, p[0], p[1]);
cout = n * 0.5 + 0.5;
}](https://image.slidesharecdn.com/osl-151222134400/75/Open-Shading-Language-OSL-6-2048.jpg)

