Global Variables

Shaders can access and sometimes modify global parameters to create their effects. The available global varaibles in Renderman surface/displacement shaders are as follows:

Type Name Surface Displ. Purpose
color Cs R -- Surface color (input)
color Os R -- Surface opacity (input)
point P R RW Surface position
point dPdu R R Change in position with u
point dPdv R R Change in position with v
point N R RW Surface shading normal
point Ng R R Surface geometric normal
float u,v R R Surface parameters
float du,dv R R Change in u,v across element
float s,t R R Surface texture coordinates
color L R -- Direction from surface to light source
color Cl R -- Light color
point I R -- Direction of ray intersecting on surface point
color Ci RW -- Color of light from surface (output)
color Oi RW -- Opacity of surface (output)
point E R -- Position of camera


Next Page