Example 1: Render Passes

Text    hb_plastic.sl    prepare.rib    interact.sl    interact.rib    Makefile

prepare.rib

Option "searchpath" "shader" ["&:.:../../lib/prman:../../shaders/plain"]

 

Format 640 480 1

 

Hider "hidden" "jitter" [0]

 

FrameBegin 0

 

Display "prepare.tif" "tiff" "rgba"

 

Declare "Cambient" "varying color"

Declare "Cdiffuse" "varying color"

Declare "Cspecular" "varying color"

 

Display "+ambient.tif" "tiff" "Cambient" "quantize" [0 255 0 255]

Display "+diffuse.tif" "tiff" "Cdiffuse" "quantize" [0 255 0 255]

Display "+specular.tif" "tiff" "Cspecular" "quantize" [0 255 0 255]

 

ReadArchive "../lib/view.rib"

 

WorldBegin

 

ReadArchive "../lib/lights.rib"

 

Attribute "visibility" "string transmission" ["opaque"]

Attribute "visibility" "int trace" [1]

Attribute "trace" "displacements" 1

 

ReadArchive "../lib/scene.rib"

 

WorldEnd

 

FrameEnd