#include "rmannotes.sl" surface surface_shader() { color surface_color, layer_color; color surface_opac, layer_opac; float ss, tt; float fuzz = 0.05; float freq = 4; /* background layer */ surface_color = color (0.1,1,0); surface_opac = 1; /* layer 1 */ ss = repeat(s, freq); tt = repeat(t, freq); layer_color = color (.5,.5,.5); layer_opac = pulse (0.5, 0.55, fuzz, tt); layer_opac = .5; surface_color = blend(surface_color, layer_color, layer_opac); /* layer 2 */ ss = repeat(s,2); tt = repeat(t,2); layer_color = color (0.1,0,.1); layer_opac = pulse(0.2, 0.8, fuzz, tt); layer_opac *= 0.9; surface_color = blend(surface_color, layer_color, layer_opac); /* layer 3 */ ss = repeat(s,2); tt = repeat(t,2); layer_color = color (1,1,0); layer_opac = pulse(0.46, 0.47, fuzz, tt); layer_opac *= 1; surface_color = blend(surface_color, layer_color, layer_opac); /* layer 4 */ ss = repeat(s,2); tt = repeat(t,2); layer_color = color (1,1,0); layer_opac = pulse(0.53, 0.54, fuzz, tt); layer_opac *= 1; surface_color = blend(surface_color, layer_color, layer_opac); /* layer 5 */ ss = repeat(s,freq); tt = repeat(t,freq); layer_color = color (1,1,1); layer_opac = pulse(0.45, 0.5, fuzz, tt); layer_opac *= 1; surface_color = blend(surface_color, layer_color, layer_opac); /* output */ Oi = surface_opac; Ci = surface_color * surface_opac; }