k3d/share/shaders/k3d_altitude_fog.sl:2:	float max_height = 1; 
k3d/share/shaders/k3d_altitude_fog.sl:3:	float min_height = 0;
k3d/share/shaders/k3d_altitude_fog.sl:8:	float fog = 1 - smoothstep(min_height, max_height, ycomp(PP));
k3d/share/shaders/k3d_ambientlight.sl:1:/* ambientlight.sl - Standard ambient light source for RenderMan Interface.
k3d/share/shaders/k3d_ambientlight.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_ambientlight.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_ambientlight.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_ambientlight.sl:9:light k3d_ambientlight(
k3d/share/shaders/k3d_ambientlight.sl:11:color lightcolor = 1;
k3d/share/shaders/k3d_ambientlight.sl:14:  Cl = intensity * lightcolor;
k3d/share/shaders/k3d_antialiasedchecks.sl:2: * checks_aa.sl -- RenderMan compatible shader for checks.
k3d/share/shaders/k3d_antialiasedchecks.sl:5: *   Makes a checkered surface, fully antialiased!  This sucker should
k3d/share/shaders/k3d_antialiasedchecks.sl:9: *   Ka, Kd	    	work just like the matte shader
k3d/share/shaders/k3d_antialiasedchecks.sl:10: *   color1, color2     these are the colors which make the pattern
k3d/share/shaders/k3d_antialiasedchecks.sl:11: *   frequency		determines the frequency (in s-t space) of the checks
k3d/share/shaders/k3d_antialiasedchecks.sl:25:k3d_antialiasedchecks (
k3d/share/shaders/k3d_antialiasedchecks.sl:31:  float smod, tmod;     /* Texture position within the pattern */
k3d/share/shaders/k3d_antialiasedchecks.sl:32:  color checkcolor;     /* Color of the checks */
k3d/share/shaders/k3d_antialiasedchecks.sl:34:  float swidth, twidth, sfuzz, tfuzz;  /* Antialiasing */
k3d/share/shaders/k3d_antialiasedchecks.sl:40:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_antialiasedchecks.sl:41:  swidth = abs(Du(s)*du) + abs(Dv(s)*dv);
k3d/share/shaders/k3d_antialiasedchecks.sl:42:  twidth = abs(Du(t)*du) + abs(Dv(t)*dv);
k3d/share/shaders/k3d_antialiasedchecks.sl:45:  Nfactor = abs (Nf . I) / (length(Nf) * length(I));
k3d/share/shaders/k3d_antialiasedchecks.sl:46:  sfuzz = .5 * swidth * frequency / Nfactor;
k3d/share/shaders/k3d_antialiasedchecks.sl:47:  tfuzz = .5 * twidth * frequency / Nfactor;
k3d/share/shaders/k3d_antialiasedchecks.sl:50:  /* Get the place in the pattern where we're sampling */
k3d/share/shaders/k3d_antialiasedchecks.sl:54:  /* If the filter width is small enough, compute the pattern color */
k3d/share/shaders/k3d_antialiasedchecks.sl:56:      x = ((smoothstep (.5,.5+sfuzz,smod)) + (1 - smoothstep (0,sfuzz,smod)));
k3d/share/shaders/k3d_antialiasedchecks.sl:57:      y = ((smoothstep (.5,.5+tfuzz,tmod)) + (1 - smoothstep (0,tfuzz,tmod)));
k3d/share/shaders/k3d_antialiasedchecks.sl:58:      checkcolor = mix (color1, color2, x*y + (1-x)*(1-y));
k3d/share/shaders/k3d_antialiasedchecks.sl:59:      /* Gradually fade in the average color when we get close to the limit */
k3d/share/shaders/k3d_antialiasedchecks.sl:60:      Ci = mix (checkcolor, (color1+color2)/2, smoothstep (.125, .5, fuzzmax));
k3d/share/shaders/k3d_antialiasedchecks.sl:62:  else { /* otherwise, only use the average color */
k3d/share/shaders/k3d_antialiasedchecks.sl:66:  /* Use the matte reflectance formula */
k3d/share/shaders/k3d_arealight.sl:2: * arealight.sl - light source shader appropriate for an area light source.
k3d/share/shaders/k3d_arealight.sl:5: *   Makes light with cosine falloff from the normal of the light source
k3d/share/shaders/k3d_arealight.sl:6: *   surface.  This is perfect for using with area light sources.
k3d/share/shaders/k3d_arealight.sl:9: *   intensity, lightcolor - same meanings as pointlight
k3d/share/shaders/k3d_arealight.sl:13:light k3d_arealight(
k3d/share/shaders/k3d_arealight.sl:15:color lightcolor = 1;
k3d/share/shaders/k3d_arealight.sl:21:    Cl = (intensity / (L.L)) * lightcolor;
k3d/share/shaders/k3d_arealight.sl:24:  /* This is so if we use one of these lights in PRMan, it will
k3d/share/shaders/k3d_arealight.sl:25:   * approximately work for a flat light source whose normal points
k3d/share/shaders/k3d_arealight.sl:28:  vector Nl = normalize(vector "shader"(0, 0, 1));
k3d/share/shaders/k3d_arealight.sl:29:  illuminate(point "shader"(0, 0, 0), Nl, PI / 2)
k3d/share/shaders/k3d_arealight.sl:31:    Cl = (intensity * (Nl.normalize(L) / (L.L)) * lightcolor);
k3d/share/shaders/k3d_background.sl:2:// Copyright (c) 1995-2004, Timothy M. Shead
k3d/share/shaders/k3d_background.sl:4:// Contact: tshead@k-3d.com
k3d/share/shaders/k3d_background.sl:6:// This program is free software; you can redistribute it and/or
k3d/share/shaders/k3d_background.sl:7:// modify it under the terms of the GNU General Public
k3d/share/shaders/k3d_background.sl:8:// License as published by the Free Software Foundation; either
k3d/share/shaders/k3d_background.sl:9:// version 2 of the License, or (at your option) any later version.
k3d/share/shaders/k3d_background.sl:11:// This program is distributed in the hope that it will be useful,
k3d/share/shaders/k3d_background.sl:12:// but WITHOUT ANY WARRANTY; without even the implied warranty of
k3d/share/shaders/k3d_background.sl:13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
k3d/share/shaders/k3d_background.sl:16:// You should have received a copy of the GNU General Public
k3d/share/shaders/k3d_background.sl:17:// License along with this program; if not, write to the Free Software
k3d/share/shaders/k3d_background.sl:21:		\author Tim Shead (tshead@k-3d.com)
k3d/share/shaders/k3d_background.sl:24:/// Simplified from the original by Larry Gritz
k3d/share/shaders/k3d_background.sl:30:  Ci += (1 - alpha) * bgcolor;
k3d/share/shaders/k3d_background.sl:32:  alpha = 1;
k3d/share/shaders/k3d_bluemarble.sl:1:/* I took wave's lead and renamed bluemarb to DPBlueMarble.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_bluemarble.sl:6: * AUTHOR: Darwyn Peachy
k3d/share/shaders/k3d_bluemarble.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_bluemarble.sl:10: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_bluemarble.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_bluemarble.sl:41:    uniform float roughness = 0.1;
k3d/share/shaders/k3d_bluemarble.sl:50:    PP = transform("shader", P) * texturescale;
k3d/share/shaders/k3d_bluemarble.sl:60:        + Ks * specular(NN, normalize(-I), roughness));
k3d/share/shaders/k3d_bluescreen.sl:3: *   puts a background color behind an image.
k3d/share/shaders/k3d_bluescreen.sl:6: *   background - the color of the background
k3d/share/shaders/k3d_bluescreen.sl:26:	Ci+=(1-alpha)*  tex;
k3d/share/shaders/k3d_bluescreen.sl:29:       Ci+=(1-alpha)*background;
k3d/share/shaders/k3d_brick.sl:2: * brick.sl -- Surface shader for a bricks.
k3d/share/shaders/k3d_brick.sl:6: *   looking staggered brick masonry.  It is especially convincing when
k3d/share/shaders/k3d_brick.sl:7: *   used in conjunction with the "brickbump" displacement shader (and
k3d/share/shaders/k3d_brick.sl:8: *   identical parameters).  Every other row of bricks is staggered.
k3d/share/shaders/k3d_brick.sl:9: *   The staggering isn't exact, however, and this variance is controlled
k3d/share/shaders/k3d_brick.sl:10: *   by the "rowvary" parameter.
k3d/share/shaders/k3d_brick.sl:13: *    Ka, Kd			The usual
k3d/share/shaders/k3d_brick.sl:15: *    brickvary                 How much does the brick color vary from
k3d/share/shaders/k3d_brick.sl:17: *    brickwidth                Width of a brick (in st space)
k3d/share/shaders/k3d_brick.sl:18: *    brickheight               Height of a brick (in st space)
k3d/share/shaders/k3d_brick.sl:19: *    mortarthickness           Thickness of the mortar (in st space)
k3d/share/shaders/k3d_brick.sl:20: *    rowvary                   How much does each row shift?
k3d/share/shaders/k3d_brick.sl:21: *    jagged                    How much do bricks deviate from squares?
k3d/share/shaders/k3d_brick.sl:26:#include "k3d_noises.h"
k3d/share/shaders/k3d_brick.sl:27:#include "k3d_patterns.h"
k3d/share/shaders/k3d_brick.sl:35:		  float brickwidth = .28, brickheight = .07;
k3d/share/shaders/k3d_brick.sl:36:		  float mortarthickness = .014;
k3d/share/shaders/k3d_brick.sl:39:		  float pockfrequency = 10, groovedepth = 0.01;
k3d/share/shaders/k3d_brick.sl:45:  float sbrick, tbrick, w, h;
k3d/share/shaders/k3d_brick.sl:47:  float swidth, twidth;
k3d/share/shaders/k3d_brick.sl:48:  uniform float BMWIDTH = (brickwidth + mortarthickness);
k3d/share/shaders/k3d_brick.sl:49:  uniform float BMHEIGHT = (brickheight + mortarthickness);
k3d/share/shaders/k3d_brick.sl:50:  uniform float MWF = (mortarthickness * 0.5 / BMWIDTH);
k3d/share/shaders/k3d_brick.sl:51:  uniform float MHF = (mortarthickness * 0.5 / BMHEIGHT);
k3d/share/shaders/k3d_brick.sl:52:  float whichbrick;
k3d/share/shaders/k3d_brick.sl:55:  /* Determine how wide in s-t space one pixel projects to, relative
k3d/share/shaders/k3d_brick.sl:56:   * the the width and height of a brick.  Overestimate the filter
k3d/share/shaders/k3d_brick.sl:57:   * size by a bit -- it makes the transitions between brick and mortar
k3d/share/shaders/k3d_brick.sl:58:   * a bit smoother.
k3d/share/shaders/k3d_brick.sl:60:  swidth = 1.5 * max(filterwidth(s), MINFILTWIDTH) / BMWIDTH;
k3d/share/shaders/k3d_brick.sl:61:  twidth = 1.5 * max(filterwidth(t), MINFILTWIDTH) / BMHEIGHT;
k3d/share/shaders/k3d_brick.sl:66:  /* Make the edges ragged, but different for each brick */
k3d/share/shaders/k3d_brick.sl:67:  whichbrick = 103 * sbrick + tbrick;
k3d/share/shaders/k3d_brick.sl:81:  /* Choose a color for the surface */
k3d/share/shaders/k3d_brick.sl:82:  if(swidth >= 1)
k3d/share/shaders/k3d_brick.sl:86:      clamp(filteredpulse(MWF, 1 - MWF, ss, swidth), max(1 - MWF / swidth, 0),
k3d/share/shaders/k3d_brick.sl:88:  if(twidth >= 1)
k3d/share/shaders/k3d_brick.sl:89:    h = 1 - 2 * MHF;
k3d/share/shaders/k3d_brick.sl:91:    h =
k3d/share/shaders/k3d_brick.sl:92:      clamp(filteredpulse(MHF, 1 - MHF, tt, twidth), max(1 - MHF / twidth, 0),
k3d/share/shaders/k3d_brick.sl:99:      /* We're in the top horizontal groove */
k3d/share/shaders/k3d_brick.sl:100:      disp = groovedepth * (sqr((tt) / MHF) - 1);
k3d/share/shaders/k3d_brick.sl:104:      /* Bottom horizontal groove */
k3d/share/shaders/k3d_brick.sl:105:      disp = groovedepth * (sqr((1 - tt) / MHF) - 1);
k3d/share/shaders/k3d_brick.sl:109:      disp = min(disp, 0.85 * groovedepth * (sqr(ss / MWF) - 1));
k3d/share/shaders/k3d_brick.sl:113:      disp = min(disp, 0.85 * groovedepth * (sqr((1 - ss) / MWF) - 1));
k3d/share/shaders/k3d_brick.sl:116:  fact = smoothstep(0, 1.3 * MHF, tt) - smoothstep(1.0 - 1.3 * MHF, 1, tt);
k3d/share/shaders/k3d_brick.sl:117:  fact *= (smoothstep(0, 1.3 * MWF, ss) - smoothstep(1.0 - 1.3 * MWF, 1, ss));
k3d/share/shaders/k3d_brick.sl:130:  /* Choose a brick color that varies from brick to brick */
k3d/share/shaders/k3d_brick.sl:131:  bcolor = brickcolor * (1 + (brickvary * snoise(whichbrick + 0.5)));
k3d/share/shaders/k3d_brick.sl:133:  Ct = mix(mortarcolor, bcolor, w * h);
k3d/share/shaders/k3d_brick2.sl:1:/* I took wave's lead and renamed brick to DPBrick.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_brick2.sl:6: * AUTHOR: Darwyn Peachy
k3d/share/shaders/k3d_brick2.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_brick2.sl:10: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_brick2.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brick2.sl:35:    float ss, tt, sbrick, tbrick, w, h;
k3d/share/shaders/k3d_brick2.sl:45:        ss += 0.5;  /* shift alternate rows */
k3d/share/shaders/k3d_brick2.sl:46:    sbrick = floor(ss); /* which brick? */
k3d/share/shaders/k3d_brick2.sl:47:    tbrick = floor(tt); /* which brick? */
k3d/share/shaders/k3d_brick2.sl:51:    h = step(MHF,tt) - step(1-MHF,tt);
k3d/share/shaders/k3d_brick2.sl:53:    Ct = mix(Cmortar, Cbrick, w*h);
k3d/share/shaders/k3d_brick3.sl:2: * brick.sl -- Surface shader for a bricks.
k3d/share/shaders/k3d_brick3.sl:6: *   looking staggered brick masonry.  It is especially convincing when
k3d/share/shaders/k3d_brick3.sl:7: *   used in conjunction with the "brickbump" displacement shader (and
k3d/share/shaders/k3d_brick3.sl:8: *   identical parameters).  Every other row of bricks is staggered.
k3d/share/shaders/k3d_brick3.sl:9: *   The staggering isn't exact, however, and this variance is controlled
k3d/share/shaders/k3d_brick3.sl:10: *   by the "rowvary" parameter.
k3d/share/shaders/k3d_brick3.sl:13: *    Ka, Kd			The usual
k3d/share/shaders/k3d_brick3.sl:15: *    brickvary                 How much does the brick color vary from
k3d/share/shaders/k3d_brick3.sl:17: *    brickwidth                Width of a brick (in st space)
k3d/share/shaders/k3d_brick3.sl:18: *    brickheight               Height of a brick (in st space)
k3d/share/shaders/k3d_brick3.sl:19: *    mortarthickness           Thickness of the mortar (in st space)
k3d/share/shaders/k3d_brick3.sl:20: *    rowvary                   How much does each row shift?
k3d/share/shaders/k3d_brick3.sl:21: *    jagged                    How much do bricks deviate from squares?
k3d/share/shaders/k3d_brick3.sl:24: * 	This shader is very similar to (and based upon) brick shaders
k3d/share/shaders/k3d_brick3.sl:25: *	by Darwyn Peachey.
k3d/share/shaders/k3d_brick3.sl:29: *      28 May 1992 -- written by lg for the "Timbre Trees" video (saucer)
k3d/share/shaders/k3d_brick3.sl:30: *      12 Jan 1994 -- recoded by lg in correct shading language.
k3d/share/shaders/k3d_brick3.sl:43:        float brickwidth = .25, brickheight = .08;
k3d/share/shaders/k3d_brick3.sl:44:        float mortarthickness = .01;
k3d/share/shaders/k3d_brick3.sl:48:#define BMWIDTH (brickwidth+mortarthickness)
k3d/share/shaders/k3d_brick3.sl:49:#define BMHEIGHT (brickheight+mortarthickness)
k3d/share/shaders/k3d_brick3.sl:50:#define MWF (mortarthickness*0.5/BMWIDTH)
k3d/share/shaders/k3d_brick3.sl:51:#define MHF (mortarthickness*0.5/BMHEIGHT)
k3d/share/shaders/k3d_brick3.sl:57:  float sbrick, tbrick, w, h;
k3d/share/shaders/k3d_brick3.sl:59:  float swidth, twidth;
k3d/share/shaders/k3d_brick3.sl:62:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_brick3.sl:63:  swidth = max (abs(Du(s)*du) + abs(Dv(s)*dv), MINFILTERWIDTH);
k3d/share/shaders/k3d_brick3.sl:64:  twidth = max (abs(Du(t)*du) + abs(Dv(t)*dv), MINFILTERWIDTH);
k3d/share/shaders/k3d_brick3.sl:68:  /* Make the shapes of the bricks vary just a bit */
k3d/share/shaders/k3d_brick3.sl:73:  ss = scoord / BMWIDTH;   /* Determine which brick the point is in */
k3d/share/shaders/k3d_brick3.sl:75:  swidth /= BMWIDTH;
k3d/share/shaders/k3d_brick3.sl:76:  twidth /= BMHEIGHT;
k3d/share/shaders/k3d_brick3.sl:78:  /* shift alternate rows */
k3d/share/shaders/k3d_brick3.sl:82:  tbrick = floor (tt);   /* which brick row? */
k3d/share/shaders/k3d_brick3.sl:83:  /* Shift the columns randomly by row */
k3d/share/shaders/k3d_brick3.sl:86:  sbrick = floor (ss);   /* which brick column? */
k3d/share/shaders/k3d_brick3.sl:87:  ss -= sbrick;          /* Now ss and tt are coords within the brick */
k3d/share/shaders/k3d_brick3.sl:90:  /* Choose a color for the surface */
k3d/share/shaders/k3d_brick3.sl:91:  if (swidth >= 1)
k3d/share/shaders/k3d_brick3.sl:93:  else w = clamp (boxstep(MWF-swidth,MWF,ss), max(1-MWF/swidth,0), 1)
k3d/share/shaders/k3d_brick3.sl:94:	 - clamp (boxstep(1-MWF-swidth,1-MWF,ss), 0, 2*MWF/swidth);
k3d/share/shaders/k3d_brick3.sl:96:  if (twidth >= 1)
k3d/share/shaders/k3d_brick3.sl:97:      h = 1 - 2*MHF;
k3d/share/shaders/k3d_brick3.sl:98:  else h = clamp (boxstep(MHF-twidth,MHF,tt), max(1-MHF/twidth,0),1)
k3d/share/shaders/k3d_brick3.sl:99:	 - clamp (boxstep(1-MHF-twidth,1-MHF,tt), 0, 2*MHF/twidth);
k3d/share/shaders/k3d_brick3.sl:101:  /* Choose a brick color that varies from brick to brick */
k3d/share/shaders/k3d_brick3.sl:104:  Ct = mix (mortarcolor, bcolor, w*h);
k3d/share/shaders/k3d_brickanti.sl:1:/* I took wave's lead and renamed brickant to DPBrickAnti.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_brickanti.sl:6: * AUTHOR: Darwyn Peachy
k3d/share/shaders/k3d_brickanti.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_brickanti.sl:10: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_brickanti.sl:15:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brickanti.sl:36:    float ss, tt, sbrick, tbrick, w, h;
k3d/share/shaders/k3d_brickanti.sl:39:    float swidth, twidth;
k3d/share/shaders/k3d_brickanti.sl:47:        ss += 0.5;  /* shift alternate rows */
k3d/share/shaders/k3d_brickanti.sl:49:    swidth = abs(Du(ss)*du) + abs(Dv(ss)*dv);
k3d/share/shaders/k3d_brickanti.sl:50:    twidth = abs(Du(tt)*du) + abs(Dv(tt)*dv);
k3d/share/shaders/k3d_brickanti.sl:51:    tbrick = floor(tt); /* which brick? */
k3d/share/shaders/k3d_brickanti.sl:52:    sbrick = floor(ss); /* which brick? */
k3d/share/shaders/k3d_brickanti.sl:55:    /* This is the simple antialiasing with "boxstep" */
k3d/share/shaders/k3d_brickanti.sl:59:    w = boxstep(MWF-swidth,MWF,ss)
k3d/share/shaders/k3d_brickanti.sl:60:      - boxstep(1-MWF-swidth,1-MWF,ss);
k3d/share/shaders/k3d_brickanti.sl:61:    h = boxstep(MHF-twidth,MHF,tt)
k3d/share/shaders/k3d_brickanti.sl:62:      - boxstep(1-MHF-twidth,1-MHF,tt);
k3d/share/shaders/k3d_brickanti.sl:65:    /* This is the preferred antialiasing using integrals. */
k3d/share/shaders/k3d_brickanti.sl:72:    w = (sintegral(ss+swidth) - sintegral(ss))/swidth;
k3d/share/shaders/k3d_brickanti.sl:73:    h = (tintegral(tt+twidth) - tintegral(tt))/twidth;
k3d/share/shaders/k3d_brickanti.sl:76:    Ct = mix(Cmortar, Cbrick, w*h);
k3d/share/shaders/k3d_brickbump.sl:2: * brickbump.sl -- displacement shader for bricks.
k3d/share/shaders/k3d_brickbump.sl:5: *   Makes displacements for a wall of bricks.  This is the companion
k3d/share/shaders/k3d_brickbump.sl:6: *   shader to the surface "brick" shader.  The parameters work exactly
k3d/share/shaders/k3d_brickbump.sl:7: *   the same.  Of course, you can use it with any surface shader, and
k3d/share/shaders/k3d_brickbump.sl:8: *   in fact matte or plastic gives those nice white cinder block walls.
k3d/share/shaders/k3d_brickbump.sl:9: *   However, if you do use it with "brick", the parameters MUST match,
k3d/share/shaders/k3d_brickbump.sl:13: *    brickwidth                Width of a brick (in st space)
k3d/share/shaders/k3d_brickbump.sl:14: *    brickheight               Height of a brick (in st space)
k3d/share/shaders/k3d_brickbump.sl:15: *    mortarthickness           Thickness of the mortar (in st space)
k3d/share/shaders/k3d_brickbump.sl:16: *    rowvary                   How much does each row shift?
k3d/share/shaders/k3d_brickbump.sl:17: *    jagged                    How much do bricks deviate from squares?
k3d/share/shaders/k3d_brickbump.sl:18: *    pitting                   The amplitude of the "pits" on the face of
k3d/share/shaders/k3d_brickbump.sl:19: *                                 the bricks.
k3d/share/shaders/k3d_brickbump.sl:20: *    pockfrequency             The st frequency of the pits.
k3d/share/shaders/k3d_brickbump.sl:21: *    groovedepth               The depth of the grooves between bricks.
k3d/share/shaders/k3d_brickbump.sl:26:#include "k3d_noises.h"
k3d/share/shaders/k3d_brickbump.sl:27:#include "k3d_patterns.h"
k3d/share/shaders/k3d_brickbump.sl:31:			   float brickwidth = .25, brickheight = .08;
k3d/share/shaders/k3d_brickbump.sl:32:			   float mortarthickness = .01;
k3d/share/shaders/k3d_brickbump.sl:34:			   float pockfrequency = 10, groovedepth = 0.01;
k3d/share/shaders/k3d_brickbump.sl:41:  uniform float BMWIDTH = (brickwidth + mortarthickness);
k3d/share/shaders/k3d_brickbump.sl:42:  uniform float BMHEIGHT = (brickheight + mortarthickness);
k3d/share/shaders/k3d_brickbump.sl:43:  uniform float MWF = (mortarthickness * 0.5 / BMWIDTH);
k3d/share/shaders/k3d_brickbump.sl:44:  uniform float MHF = (mortarthickness * 0.5 / BMHEIGHT);
k3d/share/shaders/k3d_brickbump.sl:53:      /* We're in the top horizontal groove */
k3d/share/shaders/k3d_brickbump.sl:54:      disp = groovedepth * (sqr((tt) / MHF) - 1);
k3d/share/shaders/k3d_brickbump.sl:58:      /* Bottom horizontal groove */
k3d/share/shaders/k3d_brickbump.sl:59:      disp = groovedepth * (sqr((1 - tt) / MHF) - 1);
k3d/share/shaders/k3d_brickbump.sl:63:      disp = min(disp, 0.85 * groovedepth * (sqr(ss / MWF) - 1));
k3d/share/shaders/k3d_brickbump.sl:67:      disp = min(disp, 0.85 * groovedepth * (sqr((1 - ss) / MWF) - 1));
k3d/share/shaders/k3d_brickbump.sl:70:  fact = smoothstep(0, 1.3 * MHF, tt) - smoothstep(1.0 - 1.3 * MHF, 1, tt);
k3d/share/shaders/k3d_brickbump.sl:71:  fact *= (smoothstep(0, 1.3 * MWF, ss) - smoothstep(1.0 - 1.3 * MWF, 1, ss));
k3d/share/shaders/k3d_brickbump2.sl:1:/* I took wave's lead and renamed brickbum to DPBrickbump.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_brickbump2.sl:6: * AUTHOR: Darwyn Peachy
k3d/share/shaders/k3d_brickbump2.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_brickbump2.sl:10: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_brickbump2.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brickbump2.sl:35:    float ss, tt, sbrick, tbrick, w, h;
k3d/share/shaders/k3d_brickbump2.sl:46:        ss += 0.5;  /* shift alternate rows */
k3d/share/shaders/k3d_brickbump2.sl:47:    sbrick = floor(ss); /* which brick? */
k3d/share/shaders/k3d_brickbump2.sl:48:    tbrick = floor(tt); /* which brick? */
k3d/share/shaders/k3d_brickbump2.sl:52:    h = step(MHF,tt) - step(1-MHF,tt);
k3d/share/shaders/k3d_brickbump2.sl:54:    Ct = mix(Cmortar, Cbrick, w*h);
k3d/share/shaders/k3d_brickbump2.sl:57:    sbump = smoothstep(0,MWF,ss) - smoothstep(1-MWF,1,ss);
k3d/share/shaders/k3d_brickbump2.sl:58:    tbump = smoothstep(0,MHF,tt) - smoothstep(1-MHF,1,tt);
k3d/share/shaders/k3d_brickbump2.sl:61:    /* compute shading normal */
k3d/share/shaders/k3d_brickbump3.sl:2: * brickbump.sl -- displacement shader for bricks.
k3d/share/shaders/k3d_brickbump3.sl:5: *   Makes displacements for a wall of bricks.  This is the companion
k3d/share/shaders/k3d_brickbump3.sl:6: *   shader to the surface "brick" shader.  The parameters work exactly
k3d/share/shaders/k3d_brickbump3.sl:7: *   the same.  Of course, you can use it with any surface shader, and
k3d/share/shaders/k3d_brickbump3.sl:8: *   in fact matte or plastic gives those nice white cinder block walls.
k3d/share/shaders/k3d_brickbump3.sl:9: *   However, if you do use it with "brick", the parameters MUST match,
k3d/share/shaders/k3d_brickbump3.sl:13: *    brickwidth                Width of a brick (in st space)
k3d/share/shaders/k3d_brickbump3.sl:14: *    brickheight               Height of a brick (in st space)
k3d/share/shaders/k3d_brickbump3.sl:15: *    mortarthickness           Thickness of the mortar (in st space)
k3d/share/shaders/k3d_brickbump3.sl:16: *    rowvary                   How much does each row shift?
k3d/share/shaders/k3d_brickbump3.sl:17: *    jagged                    How much do bricks deviate from squares?
k3d/share/shaders/k3d_brickbump3.sl:18: *    pitting                   The amplitude of the "pits" on the face of
k3d/share/shaders/k3d_brickbump3.sl:19: *                                 the bricks.
k3d/share/shaders/k3d_brickbump3.sl:20: *    pockfrequency             The st frequency of the pits.
k3d/share/shaders/k3d_brickbump3.sl:21: *    groovedepth               The depth of the grooves between bricks.
k3d/share/shaders/k3d_brickbump3.sl:26: *      28 May 1992 -- written by lg for the "Timbre Trees" video (saucer)
k3d/share/shaders/k3d_brickbump3.sl:27: *      12 Jan 1994 -- recoded by lg in correct shading language.
k3d/share/shaders/k3d_brickbump3.sl:34:  You may note the companion shaders "brick" and "brickbump".
k3d/share/shaders/k3d_brickbump3.sl:36:  They're meant to go together, but I like to use the brickbump
k3d/share/shaders/k3d_brickbump3.sl:37:  displacement shader with the matte surface shader.  With appropriate
k3d/share/shaders/k3d_brickbump3.sl:38:  parameters, it looks *exactly* like those painted cinderblock walls
k3d/share/shaders/k3d_brickbump3.sl:39:  (we have a wall in our lab like this).  
k3d/share/shaders/k3d_brickbump3.sl:42:  I think good parameters for this look are:
k3d/share/shaders/k3d_brickbump3.sl:44:  Displacement "brickbump" "brickwidth" 0.5 "brickheight" 0.25 
k3d/share/shaders/k3d_brickbump3.sl:45:	       "mortarthickness" 0.02 "pitting" 0.015 "pockfrequency" 12
k3d/share/shaders/k3d_brickbump3.sl:46:   	       "groovedepth" 0.015
k3d/share/shaders/k3d_brickbump3.sl:52:            float brickwidth = .25, brickheight = .08;
k3d/share/shaders/k3d_brickbump3.sl:53:	    float mortarthickness = .01;
k3d/share/shaders/k3d_brickbump3.sl:55:	    float pockfrequency = 10, groovedepth = 0.01; 
k3d/share/shaders/k3d_brickbump3.sl:58:#define BMWIDTH (brickwidth+mortarthickness)
k3d/share/shaders/k3d_brickbump3.sl:59:#define BMHEIGHT (brickheight+mortarthickness)
k3d/share/shaders/k3d_brickbump3.sl:60:#define MWF (mortarthickness*0.5/BMWIDTH)
k3d/share/shaders/k3d_brickbump3.sl:61:#define MHF (mortarthickness*0.5/BMHEIGHT)
k3d/share/shaders/k3d_brickbump3.sl:66:  float sbrick, tbrick, w, h;
k3d/share/shaders/k3d_brickbump3.sl:72:  /* Make the shapes of the bricks vary just a bit */
k3d/share/shaders/k3d_brickbump3.sl:80:  /* shift alternate rows */
k3d/share/shaders/k3d_brickbump3.sl:84:  tbrick = floor (tt);   /* which brick row? */
k3d/share/shaders/k3d_brickbump3.sl:85:  /* Shift the columns randomly by row */
k3d/share/shaders/k3d_brickbump3.sl:88:  sbrick = floor (ss);   /* which brick column? */
k3d/share/shaders/k3d_brickbump3.sl:89:  ss -= sbrick;          /* Now ss and tt are coords within the brick */
k3d/share/shaders/k3d_brickbump3.sl:95:      /* We're in the top horizontal groove */
k3d/share/shaders/k3d_brickbump3.sl:96:      disp = groovedepth * (sqr((tt)/MHF) - 1);
k3d/share/shaders/k3d_brickbump3.sl:99:      /* Bottom horizontal groove */
k3d/share/shaders/k3d_brickbump3.sl:100:      disp = groovedepth * (sqr((1-tt)/MHF) - 1);
k3d/share/shaders/k3d_brickbump3.sl:103:      disp = 0.75 * groovedepth * (sqr(ss/MWF) - 1);
k3d/share/shaders/k3d_brickbump3.sl:106:      disp = 0.75 * groovedepth * (sqr((1-ss)/MWF) - 1);
k3d/share/shaders/k3d_brickbump3.sl:109:  fact = smoothstep (0, 1.3*MHF, tt) - smoothstep (1.0-1.3*MHF, 1, tt);
k3d/share/shaders/k3d_brickbump3.sl:110:  fact *= (smoothstep (0, 1.3*MWF, ss) - smoothstep (1.0-1.3*MWF, 1, ss));
k3d/share/shaders/k3d_brickperturb.sl:1:/* I took wave's lead and renamed brickper to DPBrickperturb.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_brickperturb.sl:6: * AUTHOR: Darwyn Peachy
k3d/share/shaders/k3d_brickperturb.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_brickperturb.sl:10: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_brickperturb.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brickperturb.sl:35:    float ss, tt, sbrick, tbrick, w, h;
k3d/share/shaders/k3d_brickperturb.sl:45:        ss += 0.5;  /* shift alternate rows */
k3d/share/shaders/k3d_brickperturb.sl:46:    tbrick = floor(tt); /* which brick? */
k3d/share/shaders/k3d_brickperturb.sl:48:    sbrick = floor(ss); /* which brick? */
k3d/share/shaders/k3d_brickperturb.sl:52:    h = step(MHF,tt) - step(1-MHF,tt);
k3d/share/shaders/k3d_brickperturb.sl:54:    Ct = mix(Cmortar, Cbrick, w*h);
k3d/share/shaders/k3d_brushedmetal.sl:2: * brushedmetal.sl
k3d/share/shaders/k3d_brushedmetal.sl:5: *   Simple anisotropic metal shader.
k3d/share/shaders/k3d_brushedmetal.sl:8: *   Ka, Kd, Ks - the usual meaning
k3d/share/shaders/k3d_brushedmetal.sl:9: *   uroughness, vroughness - separate roughnesses for u and v directions
k3d/share/shaders/k3d_brushedmetal.sl:11: * Author: Larry Gritz (gritzl@acm.org)
k3d/share/shaders/k3d_brushedmetal.sl:15: *   by Anthony A. Apodaca and Larry Gritz, Morgan Kaufmann, 1999.
k3d/share/shaders/k3d_brushedmetal.sl:18:#include "k3d_material.h"
k3d/share/shaders/k3d_brushedmetal.sl:20:surface k3d_brushedmetal(
k3d/share/shaders/k3d_brushedmetal.sl:22:			 float uroughness = 0.15, vroughness = 0.5;
k3d/share/shaders/k3d_brushedmetal.sl:27:    MaterialBrushedMetal(Nf, Cs, Ka, Kd, Ks, normalize(dPdu), uroughness,
k3d/share/shaders/k3d_brushedmetal.sl:28:			 vroughness);
k3d/share/shaders/k3d_brushedmetal2.sl:1:/*  IDbrushedmetal.sl written 9/99 by Ivan DeWolf
k3d/share/shaders/k3d_brushedmetal2.sl:3: *  feel free to copy, distribute, hack and/or abuse this code 
k3d/share/shaders/k3d_brushedmetal2.sl:4: *  in any way you see fit, but please leave my name near the top
k3d/share/shaders/k3d_brushedmetal2.sl:6: *  yet another brushedmetal. This one computes a specular 
k3d/share/shaders/k3d_brushedmetal2.sl:7: *  highlight, and also can use a reflection map.
k3d/share/shaders/k3d_brushedmetal2.sl:8: *  stochasticly spreads the map, so it looks a little grainy.
k3d/share/shaders/k3d_brushedmetal2.sl:9: *  based somewhat on LGbrushedmetal.sl
k3d/share/shaders/k3d_brushedmetal2.sl:11: *  if you set Kr = 0 and specwidth = 10
k3d/share/shaders/k3d_brushedmetal2.sl:12: *  then assume specspread is roughness, then you have something 
k3d/share/shaders/k3d_brushedmetal2.sl:20: *  specwidth		- the width of the specular stripe
k3d/share/shaders/k3d_brushedmetal2.sl:22: *  specspread		- the spread of the specular stripe
k3d/share/shaders/k3d_brushedmetal2.sl:24: *  mapspread		- the spread of the image streaking
k3d/share/shaders/k3d_brushedmetal2.sl:26: *  twist		- allows you to twist the direction of anisotropy
k3d/share/shaders/k3d_brushedmetal2.sl:28: *  mapname		- name of the environment map
k3d/share/shaders/k3d_brushedmetal2.sl:29: *  specularcolor	- color of the specular hilight
k3d/share/shaders/k3d_brushedmetal2.sl:33:anisospecular (vector VA; float specspread; float specwidth)
k3d/share/shaders/k3d_brushedmetal2.sl:52:        lightsource ("__nonspecular", nonspec);
k3d/share/shaders/k3d_brushedmetal2.sl:58:            C += Cl * pixbrdf * pow( 1-abs(VA.H), 1/specwidth );
k3d/share/shaders/k3d_brushedmetal2.sl:65:k3d_brushedmetal2(
k3d/share/shaders/k3d_brushedmetal2.sl:70:		specwidth	= .5,
k3d/share/shaders/k3d_brushedmetal2.sl:105:	specularcolor * Ks * anisospecular(VA, specspread*2, specwidth*.1)) +
k3d/share/shaders/k3d_brushedmetal3.sl:1:/* Renamed to LGbrushedmetal for RMR -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_brushedmetal3.sl:5: * The derivation and formulae can be found in:  Ward, Gregory J.
k3d/share/shaders/k3d_brushedmetal3.sl:7: * Graphics 26(2) (Proceedings of Siggraph '92), pp. 265-272, July, 1992.
k3d/share/shaders/k3d_brushedmetal3.sl:10: *   V - unit viewing direction (from P toward the camera)
k3d/share/shaders/k3d_brushedmetal3.sl:11: *   xdir - a unit tangent of the surface which defines the reference
k3d/share/shaders/k3d_brushedmetal3.sl:12: *          direction for the anisotropy.
k3d/share/shaders/k3d_brushedmetal3.sl:13: *   xroughness - the apparent roughness of the surface in xdir.
k3d/share/shaders/k3d_brushedmetal3.sl:14: *   yroughness - the roughness for the direction of the surface
k3d/share/shaders/k3d_brushedmetal3.sl:15: *          tangent which is perpendicular to xdir.
k3d/share/shaders/k3d_brushedmetal3.sl:19:                         vector xdir;  float xroughness, yroughness;)
k3d/share/shaders/k3d_brushedmetal3.sl:23:    float cos_theta_r = clamp (N.V, 0.0001, 1);
k3d/share/shaders/k3d_brushedmetal3.sl:24:    vector X = xdir / xroughness;
k3d/share/shaders/k3d_brushedmetal3.sl:25:    vector Y = (N ^ xdir) / yroughness;
k3d/share/shaders/k3d_brushedmetal3.sl:33:        lightsource ("__nonspecular", nonspec);
k3d/share/shaders/k3d_brushedmetal3.sl:36:            float cos_theta_i = LN . N;
k3d/share/shaders/k3d_brushedmetal3.sl:37:            if (cos_theta_i > 0.0) {
k3d/share/shaders/k3d_brushedmetal3.sl:39:                float rho = exp (-2 * (sqr(X.H) + sqr(Y.H)) / (1 + H.N))
k3d/share/shaders/k3d_brushedmetal3.sl:40:                    / sqrt (cos_theta_i * cos_theta_r);
k3d/share/shaders/k3d_brushedmetal3.sl:41:                C += Cl * ((1-nonspec) * cos_theta_i * rho);
k3d/share/shaders/k3d_brushedmetal3.sl:45:    return C / (4 * xroughness * yroughness);
k3d/share/shaders/k3d_brushedmetal3.sl:51:k3d_brushedmetal3 ( 
k3d/share/shaders/k3d_brushedmetal3.sl:53:		float uroughness = 0.35, vroughness = 0.2; 
k3d/share/shaders/k3d_brushedmetal3.sl:61:                                          xdir, uroughness, vroughness);
k3d/share/shaders/k3d_bubbles.sl:4: * A simple semi-sphere carpet displacment
k3d/share/shaders/k3d_bubbles.sl:5: * Felipe Esquivel  felipeer@hotmail.com
k3d/share/shaders/k3d_bubbly.sl:1:/*  bubbly.sl written a while ago by Ivan DeWolf
k3d/share/shaders/k3d_bubbly.sl:3: *  feel free to copy, distribute, hack and/or abuse this code 
k3d/share/shaders/k3d_bubbly.sl:4: *  in any way you see fit, but please leave my name near the top
k3d/share/shaders/k3d_bubbly.sl:7: *  "a cellular texture basis function" by Steven Worley in the 
k3d/share/shaders/k3d_bubbly.sl:8: *  siggraph proceedings from 1996, except this uses a noised grid of cells
k3d/share/shaders/k3d_bubbly.sl:9: *  instead of the sparse convolution in the paper.
k3d/share/shaders/k3d_bubbly.sl:10: *  not as elegant, but hey, it works.
k3d/share/shaders/k3d_bubbly.sl:12: *  the "bubbles" are paraboloids diplaced along the normal. 
k3d/share/shaders/k3d_bubbly.sl:15: *  try anything you feel like.
k3d/share/shaders/k3d_bubbly.sl:19: *  Nzscale - scale of the noise that randomizes the location of 
k3d/share/shaders/k3d_bubbly.sl:20: *            the bubbles. set this to zero for a perfect grid of bubbles.
k3d/share/shaders/k3d_bubbly.sl:21: *	      dont go higher than two with this.
k3d/share/shaders/k3d_bubbly.sl:23: *	      Displacement bounds and this value should be equal.
k3d/share/shaders/k3d_bubbly.sl:24: *  bubsize - basicly the radius of the bubbles. distance in rVu's.
k3d/share/shaders/k3d_bubbly.sl:36:  float dist, shortest=10000;
k3d/share/shaders/k3d_bubbly.sl:47:  /*what is the shortest distance to a noised cell center?*/
k3d/share/shaders/k3d_bubbly.sl:55:	if(dist<shortest) shortest = dist;
k3d/share/shaders/k3d_bubbly.sl:59:  bub = clamp(shortest,0,bubsize)/bubsize; 
k3d/share/shaders/k3d_castucco.sl:2: * castucco.sl -- dispacement shader for stucco.
k3d/share/shaders/k3d_castucco.sl:5: *   I call this "castucco" because it's the stuff on the walls *everywhere*
k3d/share/shaders/k3d_castucco.sl:6: *   in Northern California.  I never really saw it on the East Coast,
k3d/share/shaders/k3d_castucco.sl:10: *   freq - basic frequency of the texture
k3d/share/shaders/k3d_castucco.sl:11: *   Km - amplitude of the mesas.
k3d/share/shaders/k3d_castucco.sl:12: *   octaves - how many octaves of fBm to sum
k3d/share/shaders/k3d_castucco.sl:13: *   trough, peak - define the shape of the valleys and mesas of the stucco.
k3d/share/shaders/k3d_castucco.sl:19:#include "k3d_noises.h"
k3d/share/shaders/k3d_castucco.sl:20:#include "k3d_displace.h"
k3d/share/shaders/k3d_castucco.sl:26:			  float trough = -0.15, peak = 0.35
k3d/share/shaders/k3d_castucco.sl:29:  point Pshad;			/* Point to be shaded, in shader space */
k3d/share/shaders/k3d_castucco.sl:30:  float fwidth;			/* Estimated change in P between image samples */
k3d/share/shaders/k3d_castucco.sl:33:  /* Do texture calcs in "shader" space, get approximate filter size */
k3d/share/shaders/k3d_castucco.sl:34:  Pshad = freq * transform("shader", P);
k3d/share/shaders/k3d_castucco.sl:35:  fwidth = filterwidthp(Pshad);
k3d/share/shaders/k3d_castucco.sl:38:  disp = fBm(Pshad, fwidth, 3, 2, 0.6);
k3d/share/shaders/k3d_castucco.sl:40:  /* Threshold the fBm and scale it */
k3d/share/shaders/k3d_castucco.sl:41:  disp = Km * smoothstep(trough, peak, disp);
k3d/share/shaders/k3d_castucco.sl:43:  /* displace in shader space units */
k3d/share/shaders/k3d_castucco.sl:44:  N = Displace(normalize(N), "shader", disp, 1);
k3d/share/shaders/k3d_causticlight.sl:1:light
k3d/share/shaders/k3d_causticlight.sl:2:k3d_causticlight ( float intensity = 1;
k3d/share/shaders/k3d_causticlight.sl:3:	       color lightcolor = 1;
k3d/share/shaders/k3d_causticlight.sl:4:	       point from = point "shader" (0,0,0);
k3d/share/shaders/k3d_causticlight.sl:5:	       point to = point "shader" (0,0,1);
k3d/share/shaders/k3d_causticlight.sl:9:	       string shadowname = "";
k3d/share/shaders/k3d_causticlight.sl:13:               float  threshold = 0.5;
k3d/share/shaders/k3d_causticlight.sl:20:	float cosangle = (L . axis) / length(L);
k3d/share/shaders/k3d_causticlight.sl:22:	atten *= smoothstep (cos(coneangle), cos(coneangle-conedeltaangle),
k3d/share/shaders/k3d_causticlight.sl:24:	Cl = atten * intensity * lightcolor;
k3d/share/shaders/k3d_causticlight.sl:25:        if (shadowname != "") {
k3d/share/shaders/k3d_causticlight.sl:26:            float caustic = shadow (shadowname, Ps, "samples", samples,
k3d/share/shaders/k3d_causticlight.sl:28:	    caustic = smoothstep (threshold, 1, caustic);
k3d/share/shaders/k3d_causticlight.sl:30:		point PL = transform ("shader", Ps);
k3d/share/shaders/k3d_celld.sl:4: * Simple displacement shader using Voronoi cell noise
k3d/share/shaders/k3d_celld.sl:5: * Uses noises.h from ARMAN
k3d/share/shaders/k3d_celld.sl:14:#include "k3d_noises.h"
k3d/share/shaders/k3d_celld.sl:19:	float voro_step = 0.05; /* desc {Step value size.  If the difference
k3d/share/shaders/k3d_celld.sl:20:				   between f2 and f1 is less then this value
k3d/share/shaders/k3d_celld.sl:21:				   then the result is 0. } */
k3d/share/shaders/k3d_celld.sl:22:	float voro_jitter = 0;  /* desc { Amount to perturb the voroni 
k3d/share/shaders/k3d_celld.sl:24:	string PSpace = "shader";  /* desc {Space to transform P for shading calculations } */
k3d/share/shaders/k3d_celld.sl:25:	float usePref = 0;   /* type switch */
k3d/share/shaders/k3d_celld.sl:26:	varying point __Pref = point (1000, 0, -1000); /* vis hidden */
k3d/share/shaders/k3d_celld.sl:27:   	output varying float VoroVal = 0; /* vis hidden */
k3d/share/shaders/k3d_ceramic.sl:1:/* Author & copyright unknown */
k3d/share/shaders/k3d_ceramic.sl:3:#include "k3d_material.h"
k3d/share/shaders/k3d_ceramic.sl:5:surface k3d_ceramic(float Ka = 1, Kd = 0.5, Ks = .5, roughness = 0.1;
k3d/share/shaders/k3d_ceramic.sl:7:		    float specsharpness = 0.5;
k3d/share/shaders/k3d_ceramic.sl:11:  Ci = MaterialCeramic(Nf, Cs, Ka, Kd, Ks, roughness, specsharpness);
k3d/share/shaders/k3d_ceramictiles.sl:4: * Description: Ceramic tiles (like you'd find in a bathroom)
k3d/share/shaders/k3d_ceramictiles.sl:7: *   projection, textureprojspace, mx -  define the projection used to
k3d/share/shaders/k3d_ceramictiles.sl:8: *     establish a basic 2-D coordinate system for the pattern.
k3d/share/shaders/k3d_ceramictiles.sl:11: *   groovewidth, grooveheight - width of the spacing between tiles,
k3d/share/shaders/k3d_ceramictiles.sl:12: *     expressed as a fraction of the tile-to-tile spacing.
k3d/share/shaders/k3d_ceramictiles.sl:13: *   groovedepth - displacement amount for the grooves (expressed in
k3d/share/shaders/k3d_ceramictiles.sl:14: *     shader space units)
k3d/share/shaders/k3d_ceramictiles.sl:18: *   Cbase, Cmottle - base color and mottle color of the tile
k3d/share/shaders/k3d_ceramictiles.sl:19: *   mottlefreq - frequency of the mottling between Cbase & Cmottle
k3d/share/shaders/k3d_ceramictiles.sl:20: *   Cedge - separate edge color for the tiles
k3d/share/shaders/k3d_ceramictiles.sl:21: *   Cspeck - color of the occasional specks in the tiles
k3d/share/shaders/k3d_ceramictiles.sl:24: *      turn that feature off.
k3d/share/shaders/k3d_ceramictiles.sl:25: *   varyhue, varysat, varylum - individual controls for the per-tile
k3d/share/shaders/k3d_ceramictiles.sl:26: *      color variation (0 means don't vary in that way, larger values
k3d/share/shaders/k3d_ceramictiles.sl:30: *   Ka - the usual meaning
k3d/share/shaders/k3d_ceramictiles.sl:31: *   Kdmortar - Kd for the mortar between tiles
k3d/share/shaders/k3d_ceramictiles.sl:32: *   mortarcolor - base color of the mortar
k3d/share/shaders/k3d_ceramictiles.sl:33: *   Kdtile - diffuse component weighting of the tile
k3d/share/shaders/k3d_ceramictiles.sl:34: *   Ks, roughness, specsharpness - glossy specular controls of the tile
k3d/share/shaders/k3d_ceramictiles.sl:35: *   Kr, blur, eta - reflection parameters for the tile
k3d/share/shaders/k3d_ceramictiles.sl:41: * Author: Larry Gritz, 1999
k3d/share/shaders/k3d_ceramictiles.sl:49:/* Comment out the following line if you do *not* wish to use BMRT and
k3d/share/shaders/k3d_ceramictiles.sl:50: * PRMan together.
k3d/share/shaders/k3d_ceramictiles.sl:52:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_ceramictiles.sl:54:#include "k3d_project.h"
k3d/share/shaders/k3d_ceramictiles.sl:55:#include "k3d_material.h"
k3d/share/shaders/k3d_ceramictiles.sl:56:#include "k3d_noises.h"
k3d/share/shaders/k3d_ceramictiles.sl:57:#include "k3d_displace.h"
k3d/share/shaders/k3d_ceramictiles.sl:58:#include "k3d_patterns.h"
k3d/share/shaders/k3d_ceramictiles.sl:60:/* Given 2-D texture coordinates ss,tt and their filter widths ds, dt,
k3d/share/shaders/k3d_ceramictiles.sl:61: * and the width and height of the grooves between tiles (assuming that
k3d/share/shaders/k3d_ceramictiles.sl:62: * tile spacing is 1.0), figure out which (integer indexed) tile we are
k3d/share/shaders/k3d_ceramictiles.sl:63: * on and what coordinates (on [0,1]) within our individual tile we are
k3d/share/shaders/k3d_ceramictiles.sl:64: * shading.
k3d/share/shaders/k3d_ceramictiles.sl:67:		  float groovewidth, grooveheight;
k3d/share/shaders/k3d_ceramictiles.sl:68:		  output float swhichtile, twhichtile;
k3d/share/shaders/k3d_ceramictiles.sl:71:  swhichtile = floor(ss);
k3d/share/shaders/k3d_ceramictiles.sl:72:  twhichtile = floor(tt);
k3d/share/shaders/k3d_ceramictiles.sl:73:  stile = ss - swhichtile;
k3d/share/shaders/k3d_ceramictiles.sl:74:  ttile = tt - twhichtile;
k3d/share/shaders/k3d_ceramictiles.sl:76:  return filteredpulsetrain(groovewidth, 1, ss + groovewidth / 2,
k3d/share/shaders/k3d_ceramictiles.sl:77:			    ds) * filteredpulsetrain(grooveheight, 1,
k3d/share/shaders/k3d_ceramictiles.sl:78:						     tt + grooveheight / 2,
k3d/share/shaders/k3d_ceramictiles.sl:84:/* Given coordinates (stile,ttile) and derivatives (ds,dt) *within* a
k3d/share/shaders/k3d_ceramictiles.sl:85: * single tile, calculate the color of the tile at that point.  Major
k3d/share/shaders/k3d_ceramictiles.sl:86: * features include: (1) mottling of the color; (2) darkening or shifting
k3d/share/shaders/k3d_ceramictiles.sl:87: * to a different color near the border of the tile (with a ragged edge
k3d/share/shaders/k3d_ceramictiles.sl:88: * to the color transition); (3) occasional dark specks.
k3d/share/shaders/k3d_ceramictiles.sl:114:	(smoothpulse(.05, .15, .85, .95, stile + sedgeoffset) *
k3d/share/shaders/k3d_ceramictiles.sl:115:	 smoothpulse(.05, .15, .85, .95, ttile + tedgeoffset));
k3d/share/shaders/k3d_ceramictiles.sl:124:      specky = smoothstep(0.55, 0.7, specky);
k3d/share/shaders/k3d_ceramictiles.sl:133:/* Compute the color of a ceramic object.  Like plastic, but use a
k3d/share/shaders/k3d_ceramictiles.sl:135: * diffuse model for the mortar, and a ceramic model for the tiles,
k3d/share/shaders/k3d_ceramictiles.sl:136: * depending on the variable intile.  When in the mortar area, we turn
k3d/share/shaders/k3d_ceramictiles.sl:137: * off highlights and reflections.
k3d/share/shaders/k3d_ceramictiles.sl:143:			   float roughness, specsharpness, Kr, blur, eta;
k3d/share/shaders/k3d_ceramictiles.sl:158:    ks * LocIllumGlossy(Nf, V, roughness / 10,
k3d/share/shaders/k3d_ceramictiles.sl:159:			specsharpness) + SampleEnvironment(P, R, kr, blur,
k3d/share/shaders/k3d_ceramictiles.sl:165:surface k3d_ceramictiles(float Ka = 1, Ks = .75, roughness =
k3d/share/shaders/k3d_ceramictiles.sl:166:			 0.1, specsharpness = 0.5;
k3d/share/shaders/k3d_ceramictiles.sl:173:			 float groovewidth = 0.06, grooveheight = 0.06;
k3d/share/shaders/k3d_ceramictiles.sl:174:			 float groovedepth = 0.2, truedisp = 0;
k3d/share/shaders/k3d_ceramictiles.sl:176:			 string textureprojspace = "shader";
k3d/share/shaders/k3d_ceramictiles.sl:186:			 float varyhue = 0.025, varysat = 0.4, varylum = 0.5;)
k3d/share/shaders/k3d_ceramictiles.sl:189:   * Get a 2-D texture coordinates for the texturing, then
k3d/share/shaders/k3d_ceramictiles.sl:190:   * Normalize everything so that the tiles are 1x1 units
k3d/share/shaders/k3d_ceramictiles.sl:200:   * Find out where in the pattern we are: which tile we're on, and
k3d/share/shaders/k3d_ceramictiles.sl:201:   * the (stile,ttile) coordinates (both on [0,1]) within our tile.
k3d/share/shaders/k3d_ceramictiles.sl:203:  float swhichtile, twhichtile, stile, ttile;
k3d/share/shaders/k3d_ceramictiles.sl:205:			     groovewidth, grooveheight,
k3d/share/shaders/k3d_ceramictiles.sl:206:			     swhichtile, twhichtile, stile, ttile);
k3d/share/shaders/k3d_ceramictiles.sl:207:  float tileindex = swhichtile + 13 * twhichtile;
k3d/share/shaders/k3d_ceramictiles.sl:210:   * Displacement: the edges of the tile displace down a bit, as do
k3d/share/shaders/k3d_ceramictiles.sl:211:   * the grooves between tiles.  Also, add just a little bit of
k3d/share/shaders/k3d_ceramictiles.sl:214:  float tiledisp = smoothpulse(0, .075, 0.925, 1, stile);
k3d/share/shaders/k3d_ceramictiles.sl:215:  tiledisp *= smoothpulse(0, .075, 0.925, 1, ttile);
k3d/share/shaders/k3d_ceramictiles.sl:218:    Displace(Nf, "shader", groovedepth * (tiledisp - 1), truedisp);
k3d/share/shaders/k3d_ceramictiles.sl:224:   * Here's the exciting part -- calculate the color of the spot we're
k3d/share/shaders/k3d_ceramictiles.sl:225:   * in within the tile.  Then use the tile index to vary its color
k3d/share/shaders/k3d_ceramictiles.sl:232:  Ctile = varyEach(Ctile, tileindex, varyhue, varysat, varylum);
k3d/share/shaders/k3d_ceramictiles.sl:235:   * Set the color of the mortar between tiles, make it look good by
k3d/share/shaders/k3d_ceramictiles.sl:236:   * scaling it by some high frequency fBm.
k3d/share/shaders/k3d_ceramictiles.sl:240:  float dQ = filterwidthp(Q);
k3d/share/shaders/k3d_ceramictiles.sl:242:    Cmortar *= smoothstep(0, 1, (.5 + .4 * fBm(Q, dQ, 3, 2, .6)));
k3d/share/shaders/k3d_ceramictiles.sl:249:			 roughness, specsharpness, Kr, blur, eta, ENVPARAMS);
k3d/share/shaders/k3d_checkerboard.sl:1:#include "k3d_patterns.h"
k3d/share/shaders/k3d_checkerboard.sl:3:surface k3d_checkerboard(float Ka = 1.0;
k3d/share/shaders/k3d_checkerboard.sl:6:			 float roughness = 0.1; color specularcolor = 1.0;
k3d/share/shaders/k3d_checkerboard.sl:13:  float filterwidths, filterwidtht;
k3d/share/shaders/k3d_checkerboard.sl:15:  color checkcolor;
k3d/share/shaders/k3d_checkerboard.sl:18:	// Calculate our "filter zone" around the edges of each tile ...
k3d/share/shaders/k3d_checkerboard.sl:22:	filterwidths = SFILTERWIDTH * TileS;
k3d/share/shaders/k3d_checkerboard.sl:23:	filterwidtht = TFILTERWIDTH * TileT;
k3d/share/shaders/k3d_checkerboard.sl:25:	filters = filteredpulse(1.0 - filterwidths, 1.0 + filterwidths, filters, filterwidths);
k3d/share/shaders/k3d_checkerboard.sl:26:	filtert = filteredpulse(1.0 - filterwidtht, 1.0 + filterwidtht, filtert, filterwidtht);
k3d/share/shaders/k3d_checkerboard.sl:31:  // Calculate which tile we're in ...
k3d/share/shaders/k3d_checkerboard.sl:44:  checkcolor = mix(EvenColor, Cs, mixamount);
k3d/share/shaders/k3d_checkerboard.sl:50:    Os * (checkcolor * (Ka * ambient() + Kd * diffuse(Nf)) +
k3d/share/shaders/k3d_checkerboard.sl:51:	  specularcolor * Ks * specular(Nf, -normalize(I), roughness));
k3d/share/shaders/k3d_checkerboard_solid.sl:2:surface k3d_checkerboard_solid(
k3d/share/shaders/k3d_checkerboard_solid.sl:6:	float roughness = 0.1;
k3d/share/shaders/k3d_checkerboard_solid.sl:12:	string shadingspace = "shader";
k3d/share/shaders/k3d_checkerboard_solid.sl:19:	point Pshad = transform(shadingspace, P);
k3d/share/shaders/k3d_checkerboard_solid.sl:21:	x = mod(floor(xcomp(Pshad) / TileX), 2.0);
k3d/share/shaders/k3d_checkerboard_solid.sl:22:	y = mod(floor(ycomp(Pshad) / TileY), 2.0);
k3d/share/shaders/k3d_checkerboard_solid.sl:23:	z = mod(floor(zcomp(Pshad) / TileZ), 2.0);
k3d/share/shaders/k3d_checkerboard_solid.sl:38:	Ci = Os * (Ct * (Ka * ambient() + Kd * diffuse(Nf)) + specularcolor * Ks * specular(Nf, -normalize(I), roughness));
k3d/share/shaders/k3d_clamptoalpha.sl:2: * clamptoalpha.sl -- imager shader that forces Ci to be non-negative
k3d/share/shaders/k3d_clamptoalpha.sl:3: *    and with each component to greater than the alpha value of the
k3d/share/shaders/k3d_clamptoalpha.sl:8:k3d_clamptoalpha()
k3d/share/shaders/k3d_clamptoalpha.sl:10:  Ci = clamp(Ci, color(0, 0, 0), color(alpha, alpha, alpha));
k3d/share/shaders/k3d_clay.sl:4: * Author: Larry Gritz (gritzl@acm.org)
k3d/share/shaders/k3d_clay.sl:8: *   by Anthony A. Apodaca and Larry Gritz, Morgan Kaufmann, 1999.
k3d/share/shaders/k3d_clay.sl:11:#include "k3d_material.h"
k3d/share/shaders/k3d_clay.sl:13:surface k3d_clay(float Ka = 1, Kd = 0.7, roughness = 0.1;)
k3d/share/shaders/k3d_clay.sl:16:  Ci = MaterialClay(Nf, Cs, Ka, Kd, roughness);
k3d/share/shaders/k3d_cloudplane.sl:1:/* I took wave's lead and renamed cloudplane to DPCloudplane.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_cloudplane.sl:6: * AUTHOR: Darwyn Peachy
k3d/share/shaders/k3d_cloudplane.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_cloudplane.sl:10: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_cloudplane.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_cloudplane.sl:24:    point Psh;
k3d/share/shaders/k3d_cloudplane.sl:26:    float x, fx, xfreq, xphase;
k3d/share/shaders/k3d_cloudplane.sl:27:    float y, fy, yfreq, yphase;
k3d/share/shaders/k3d_cloudplane.sl:32:    Psh = transform("shader", P);
k3d/share/shaders/k3d_cloudplane.sl:33:    x = xcomp(Psh) + xoffset;
k3d/share/shaders/k3d_cloudplane.sl:34:    y = ycomp(Psh) + yoffset;
k3d/share/shaders/k3d_cloudplane.sl:36:    xphase = 0.9; /* arbitrary */
k3d/share/shaders/k3d_cloudplane.sl:37:    yphase = 0.7; /* arbitrary */
k3d/share/shaders/k3d_cloudplane.sl:44:            (offset + cos(xfreq * (x + xphase)));
k3d/share/shaders/k3d_cloudplane.sl:46:            (offset + cos(yfreq * (y + yphase)));
k3d/share/shaders/k3d_cloudplane.sl:48:        xphase = PI/2 * 0.9 * cos(yfreq * y);
k3d/share/shaders/k3d_cloudplane.sl:49:        yphase = PI/2 * 1.1 * cos(xfreq * x);
k3d/share/shaders/k3d_constant.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_constant.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_constant.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_contacshadow.sl:1:/* renamed shader to SIG2k_srf_contact to be consistent with RMR 
k3d/share/shaders/k3d_contacshadow.sl:7:** Render a contact shadow based on depth data derived from a light  
k3d/share/shaders/k3d_contacshadow.sl:8:** placed onto the surface which catches the contact shadow  
k3d/share/shaders/k3d_contacshadow.sl:14:k3d_contactshadow (  
k3d/share/shaders/k3d_contacshadow.sl:15:    string shadowname = "";     /* the name of the texture file */  
k3d/share/shaders/k3d_contacshadow.sl:16:    float samples = 10;         /* how many samples to take per Z lookup */  
k3d/share/shaders/k3d_contacshadow.sl:17:    float influence = 1.0;      /* world space distance in which effect is visible */  
k3d/share/shaders/k3d_contacshadow.sl:19:    float maxdist = 10000;      /* how far is considered infinity */  
k3d/share/shaders/k3d_contacshadow.sl:22:    /* get a matrix which transforms from current space to the  
k3d/share/shaders/k3d_contacshadow.sl:23:       camera space used when rendering the shadow map */  
k3d/share/shaders/k3d_contacshadow.sl:25:    textureinfo(shadowname, "viewingmatrix", matNl);  
k3d/share/shaders/k3d_contacshadow.sl:27:    /* get a matrix which transforms from current space to the  
k3d/share/shaders/k3d_contacshadow.sl:28:       screen space (-1..1) used when rendering the shadow map */  
k3d/share/shaders/k3d_contacshadow.sl:30:    textureinfo(shadowname, "projectionmatrix", matNP);  
k3d/share/shaders/k3d_contacshadow.sl:32:    /* transform the ground plane point into texture coordinates  
k3d/share/shaders/k3d_contacshadow.sl:33:       needed to look up the point in the shadow map */  
k3d/share/shaders/k3d_contacshadow.sl:39:	/* point being shaded is outside the region of the depth map */  
k3d/share/shaders/k3d_contacshadow.sl:43:	/* get the distance from the shadow camera to the closest
k3d/share/shaders/k3d_contacshadow.sl:44:	   object as recorded in the shadow map */
k3d/share/shaders/k3d_contacshadow.sl:45:	float mapdist = float texture(shadowname, ss, tt, "samples", samples);
k3d/share/shaders/k3d_contacshadow.sl:47:	/* transform the point on the ground plane into the shadow
k3d/share/shaders/k3d_contacshadow.sl:48:	   camera space in order to get the distance from the shadow
k3d/share/shaders/k3d_contacshadow.sl:49:	   camera to the ground plane */
k3d/share/shaders/k3d_contacshadow.sl:52:	/* the difference between the two distances is used to calculate the  
k3d/share/shaders/k3d_contacshadow.sl:53:	   contact shadow effect */  
k3d/share/shaders/k3d_contacshadow.sl:56:	distance = smoothstep(0, 1, distance/influence);  
k3d/share/shaders/k3d_contacshadow.sl:59:	/* convert into a color (white=shadow) */  
k3d/share/shaders/k3d_corktile.sl:3:/* corktile.sl - a surface shader imitating cork tiling
k3d/share/shaders/k3d_corktile.sl:5: * Author: Peter Quint
k3d/share/shaders/k3d_corktile.sl:10: * Ka, Kd, Ks, roughness, specularcolor - take their usual meanings
k3d/share/shaders/k3d_corktile.sl:11: * Ksgap - the specular component for tile gaps : by default 0.3 * Ks
k3d/share/shaders/k3d_corktile.sl:12: * txtscale - the amount of detail / magnification of the image, this also determines
k3d/share/shaders/k3d_corktile.sl:13: *   (if tiles=1) the number of tiles fitted into the texture as s and t vary from 0 to 1
k3d/share/shaders/k3d_corktile.sl:14: * tiles - the number of tiles in a unit square of texture before txtscale is applied
k3d/share/shaders/k3d_corktile.sl:15: *	 (this means the number of tiles actually seen is the square of txtscale * tiles)
k3d/share/shaders/k3d_corktile.sl:16: * gap - the size of the gap or groove between tiles, measured as a proportion of the tile,
k3d/share/shaders/k3d_corktile.sl:17: *	 thus a gap of .05 will mean that 2.5% of the tile around each edge will be taken up with
k3d/share/shaders/k3d_corktile.sl:18: *   the groove (2.5% either side = 5% in total = 0.05)
k3d/share/shaders/k3d_corktile.sl:19: * bumpheight - the total height for bump mapped bumps - irregularities on the surface plus
k3d/share/shaders/k3d_corktile.sl:20: *   the displacement of the tile itself out of the gap
k3d/share/shaders/k3d_corktile.sl:21: * tileheight - the proportion of the bumpheight that is taken up with the rise of the tile from
k3d/share/shaders/k3d_corktile.sl:22: * 	 the gap between the tiles, the remainder of bumpheight is taken up with the bumps on the 
k3d/share/shaders/k3d_corktile.sl:23: *   surface of the tile. So if tileheight = 1 there are no bumps on the tile surface, if
k3d/share/shaders/k3d_corktile.sl:24: *   tileheight = 0 there are bumps on the tile surface of height tileheight, but no difference
k3d/share/shaders/k3d_corktile.sl:25: *   in height between the gap and the tile itself
k3d/share/shaders/k3d_corktile.sl:27: * The shader makes an attempt at being self antaliasing
k3d/share/shaders/k3d_corktile.sl:31:#include "k3d_noises.h" /* the standard BMRT include file */
k3d/share/shaders/k3d_corktile.sl:32:#include "k3d_tile.h"
k3d/share/shaders/k3d_corktile.sl:33:#define fnoise(p,width) (noise(p) * (1-smoothstep (0.2,0.75,width)))
k3d/share/shaders/k3d_corktile.sl:44:							float txtscale, filtwidth)
k3d/share/shaders/k3d_corktile.sl:46:		/* 	the pattern is built up of the sum of two offset noise functions, perturbed slightly
k3d/share/shaders/k3d_corktile.sl:47:		and used to select a color from a spline, combined with an overlay of the dark 
k3d/share/shaders/k3d_corktile.sl:48:		markings that characterise cork
k3d/share/shaders/k3d_corktile.sl:51:		point P2 = transform("shader",PP);
k3d/share/shaders/k3d_corktile.sl:53:		float fw = filtwidth * txtscale;
k3d/share/shaders/k3d_corktile.sl:69:		/* Overlay the dark markings */
k3d/share/shaders/k3d_corktile.sl:83:         		float	roughness = .05;
k3d/share/shaders/k3d_corktile.sl:88:						float bumpheight = 0.3;
k3d/share/shaders/k3d_corktile.sl:89:						float tileheight = .8;
k3d/share/shaders/k3d_corktile.sl:94:	uniform float tilewidth = 1 / (tiles * txtscale); 
k3d/share/shaders/k3d_corktile.sl:96:	point PP = transform("shader",P);
k3d/share/shaders/k3d_corktile.sl:97:	float filtwidth = filterwidthp(PP),
k3d/share/shaders/k3d_corktile.sl:98:			swidth = abs(Du(s)*du) + abs(Dv(s)*dv),
k3d/share/shaders/k3d_corktile.sl:99:			twidth = abs(Du(t)*du) + abs(Dv(t)*dv),
k3d/share/shaders/k3d_corktile.sl:100:			stfiltwidth = max(swidth, twidth) / tilewidth,
k3d/share/shaders/k3d_corktile.sl:104:	float ingap = tile(s, t, tilewidth, tilewidth, swidth, twidth, gap, gap, sw, tw, so, to);
k3d/share/shaders/k3d_corktile.sl:106:	Ct = cork( P, txtscale, filtwidth);	
k3d/share/shaders/k3d_corktile.sl:108:	Cg = color( .20, 0, 0) + filteredsnoise(PP * txtscale, filtwidth * txtscale) * .2;
k3d/share/shaders/k3d_corktile.sl:111:	adjust = (1 - min(smoothstep(gap * .3, gap * .7, so), smoothstep(gap * .3, gap * .7, to))) * 
k3d/share/shaders/k3d_corktile.sl:112:		(1  - smoothstep(.2 * gap, gap * .8, stfiltwidth));  
k3d/share/shaders/k3d_corktile.sl:113:	disp = (tileheight + fnoise(PP * txtscale * bumpfreq + 3, filtwidth * txtscale) * (1 - tileheight)) 
k3d/share/shaders/k3d_corktile.sl:114:		* bumpheight * (1 - adjust);
k3d/share/shaders/k3d_corktile.sl:120:		specularcolor * Ks*specular(Nf,-normalize(I),roughness)); 
k3d/share/shaders/k3d_craters.sl:5: * Similar tricks can be used to make cork, swiss-cheese, bread, etc.
k3d/share/shaders/k3d_craters.sl:9:#include "k3d_material.h"
k3d/share/shaders/k3d_craters.sl:10:#include "k3d_noises.h"
k3d/share/shaders/k3d_craters.sl:11:#include "k3d_patterns.h"
k3d/share/shaders/k3d_craters.sl:15:k3d_craters ( float Ka = 1, Kd = 0.7, roughness = 0.1;
k3d/share/shaders/k3d_craters.sl:16:   float Km = 0.03;	/* Depth of crater displacement */
k3d/share/shaders/k3d_craters.sl:17:   float swidth=.6;      /* Size of largest crater relative to s/t mapping */
k3d/share/shaders/k3d_craters.sl:18:   float pitfactor = .7; /* chance of crater occuring in a cell */
k3d/share/shaders/k3d_craters.sl:24:   /* you'll get artifacts if you go too much higher than 1 */
k3d/share/shaders/k3d_craters.sl:25:   /* but this can be avoided by looping i,j from -2 to 2 instead of -1 to 1 */
k3d/share/shaders/k3d_craters.sl:26:   float distortamp = 0.0005; /* Crater distortion.  You'll get artifacts if it goes too high. */
k3d/share/shaders/k3d_craters.sl:35:    float rmax = swidth/2; /* was /2 */
k3d/share/shaders/k3d_craters.sl:46:	scellctr = floor(s*sc/swidth);
k3d/share/shaders/k3d_craters.sl:47:	tcellctr = floor(t*sc/swidth);
k3d/share/shaders/k3d_craters.sl:48:	cellsizescale = swidth/sc;
k3d/share/shaders/k3d_craters.sl:59:		  /* if ( fBm_default(xp) < pitfactor)  *//* I like this distribution better - pitf = -1 -> 1 */
k3d/share/shaders/k3d_craters.sl:90:	    rrad1 += fBm_default(P*sc)*asc*distortamp; /* add crater roughness */
k3d/share/shaders/k3d_craters.sl:94:	/* Seem crater perturbations for each scale */
k3d/share/shaders/k3d_craters.sl:97:	    r = smoothstep(0,rrad1,rmax1);
k3d/share/shaders/k3d_craters.sl:103:	    r = smoothstep(0,rrad2,rmax2);
k3d/share/shaders/k3d_craters.sl:114:    Ci = MaterialClay (Nf, Ct, Ka, Kd, roughness);
k3d/share/shaders/k3d_crayon.sl:1:/* Renamed shader to PQCrayon for RMR -- talrmr@SpamSucks_pacbell.net */
k3d/share/shaders/k3d_crayon.sl:3:/* crayon.sl - a surface shader making crayon like marks
k3d/share/shaders/k3d_crayon.sl:7:	This shader makes the surface look as if it had been shaded with a pastel crayon.
k3d/share/shaders/k3d_crayon.sl:12:	Ka, Kd, Ks, roughness, specularcolor - work as in the plastic shader
k3d/share/shaders/k3d_crayon.sl:14:	width - the width of the crayon strokes - this is scaled by txtscale
k3d/share/shaders/k3d_crayon.sl:15:	micro - the size of the dots that make up a crayon stroke, relative to the size of
k3d/share/shaders/k3d_crayon.sl:16:		the stroke. By default they are about 15 times smaller
k3d/share/shaders/k3d_crayon.sl:17:	stretch - the length of the stroke relative to its width;
k3d/share/shaders/k3d_crayon.sl:18:	density0 - controls the amount of topcolor seen - measured as a proportion - 
k3d/share/shaders/k3d_crayon.sl:19:		this should vary between 0 (no topcolor) to 1, .3 would give 30% topcolor;
k3d/share/shaders/k3d_crayon.sl:20:	density1 - if different density0 this is the density when t = 1, with a smooth
k3d/share/shaders/k3d_crayon.sl:21:		interpolation of values for density0 when t = 0, thus allowing a 
k3d/share/shaders/k3d_crayon.sl:22:		graduation of shading from top to bottom of the object
k3d/share/shaders/k3d_crayon.sl:23:	color topcolor, basecolor - the color of the crayon strokes and the color of the ground
k3d/share/shaders/k3d_crayon.sl:35:aanoise(float sp, tp, width)
k3d/share/shaders/k3d_crayon.sl:37:	/* an antaliased noise function, which returns noise of a wavelenth always greater than
k3d/share/shaders/k3d_crayon.sl:38:	   twice the micropolygon width */
k3d/share/shaders/k3d_crayon.sl:40:	/* calculate smallest integer f for which width / f < .5 */
k3d/share/shaders/k3d_crayon.sl:41:	f = ceil(width /.5);
k3d/share/shaders/k3d_crayon.sl:44:	ns  = mag * snoise(sp / f, tp / f) * (1 - smoothstep(0, .5, width / f))
k3d/share/shaders/k3d_crayon.sl:45:		+ snoise(sp / (f * 1.33), tp / (f * 1.33)) * mag * .25 * smoothstep(0, .5, width / f);
k3d/share/shaders/k3d_crayon.sl:51:#define filterwidth(x)  max (abs(Du(x)*du) + abs(Dv(x)*dv), MINFILTWIDTH)
k3d/share/shaders/k3d_crayon.sl:58:         	float roughness = .1;
k3d/share/shaders/k3d_crayon.sl:61:			float width = .05;
k3d/share/shaders/k3d_crayon.sl:63:			float stretch = 10;
k3d/share/shaders/k3d_crayon.sl:72:	/* work out the density for the current t */
k3d/share/shaders/k3d_crayon.sl:75:	/*  use a spline to read across to the appropriate noise value - this equalisation
k3d/share/shaders/k3d_crayon.sl:76:		process is described by Steven Worley in Ch 3 of "Texturing and Modelling a
k3d/share/shaders/k3d_crayon.sl:77:		procedural approach */ 
k3d/share/shaders/k3d_crayon.sl:80:	float fw = max(filterwidth(s), filterwidth(t)); /* the size of the micropolygon */
k3d/share/shaders/k3d_crayon.sl:81:	float smks = aanoise(txtscale * s * micro / width, txtscale * t * micro / width,
k3d/share/shaders/k3d_crayon.sl:82:	 		txtscale * fw * micro / width);
k3d/share/shaders/k3d_crayon.sl:83:	float lmks = (aanoise(txtscale * s / width, txtscale * t / (width * stretch), 
k3d/share/shaders/k3d_crayon.sl:84:		txtscale * fw / width) + 1) / 2;
k3d/share/shaders/k3d_crayon.sl:87:	m = smoothstep(trs - .1, trs + .3, lmks);	
k3d/share/shaders/k3d_crayon.sl:92:		specularcolor * Ks*specular(Nf,-normalize(I),roughness));
k3d/share/shaders/k3d_crayontoon.sl:2: * Abril 2002    <felipe@siggraph.org.mx>

k3d/share/shaders/k3d_crayontoon.sl:4: * Este shader es un constant con un poco de difusion,

k3d/share/shaders/k3d_crayontoon.sl:5: * hay que escoger con cuidado ambos colores para obtener

k3d/share/shaders/k3d_crayontoon.sl:6: * el estilo deseado. Mi intencion fue hacer un color dependiente

k3d/share/shaders/k3d_crayontoon.sl:9: * This shader is a constant with little diffusion, 

k3d/share/shaders/k3d_crayontoon.sl:10: * choose wisely both colors to obtain the crayon look. My

k3d/share/shaders/k3d_crayontoon.sl:11: * idea was to make one color dependable of the other but is

k3d/share/shaders/k3d_crayontoon.sl:12: * better to let the user change this.

k3d/share/shaders/k3d_cyclone.sl:15:  float radius, dist, angle, sine, cosine, eye_weight, value;
k3d/share/shaders/k3d_cyclone.sl:22:  Pt = transform("shader", P);
k3d/share/shaders/k3d_cyclone.sl:24:  /* Rotate hit point to "cyclone space" */
k3d/share/shaders/k3d_cyclone.sl:41:	  eye_weight = (.1 * max_radius - radius) * 10;	/* normalize */
k3d/share/shaders/k3d_cyclone.sl:43:	  eye_weight = pow(1 - eye_weight, 4);
k3d/share/shaders/k3d_cyclone.sl:46:	eye_weight = 1;
k3d/share/shaders/k3d_cyclone.sl:51:  if(eye_weight > 0)
k3d/share/shaders/k3d_cyclone.sl:63:      value = abs(eye_weight * (offset + scale * a));
k3d/share/shaders/k3d_cyclone.sl:68:  /* Thin the density of the clouds */
k3d/share/shaders/k3d_cyclone.sl:71:  /* Shade like matte, but with color scaled by cloud opacity */
k3d/share/shaders/k3d_decalplastic.sl:2:// Copyright (c) 1995-2004, Timothy M. Shead
k3d/share/shaders/k3d_decalplastic.sl:4:// Contact: tshead@k-3d.com
k3d/share/shaders/k3d_decalplastic.sl:6:// This program is free software; you can redistribute it and/or
k3d/share/shaders/k3d_decalplastic.sl:7:// modify it under the terms of the GNU General Public
k3d/share/shaders/k3d_decalplastic.sl:8:// License as published by the Free Software Foundation; either
k3d/share/shaders/k3d_decalplastic.sl:9:// version 2 of the License, or (at your option) any later version.
k3d/share/shaders/k3d_decalplastic.sl:11:// This program is distributed in the hope that it will be useful,
k3d/share/shaders/k3d_decalplastic.sl:12:// but WITHOUT ANY WARRANTY; without even the implied warranty of
k3d/share/shaders/k3d_decalplastic.sl:13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
k3d/share/shaders/k3d_decalplastic.sl:16:// You should have received a copy of the GNU General Public
k3d/share/shaders/k3d_decalplastic.sl:17:// License along with this program; if not, write to the Free Software
k3d/share/shaders/k3d_decalplastic.sl:21:		\author Tim Shead (tshead@k-3d.com)
k3d/share/shaders/k3d_decalplastic.sl:28:	float roughness = 0.1;
k3d/share/shaders/k3d_decalplastic.sl:42:			float alpha = float texture(texturename[3], ss, tt);
k3d/share/shaders/k3d_decalplastic.sl:43:			Ct = (1.0 - alpha) * Cs + (alpha * color texture(texturename, ss, tt));
k3d/share/shaders/k3d_decalplastic.sl:49:	Ci = Oi * Ct * (Ka * ambient() + Kd * diffuse(Nf)) + specularcolor * Ks * specular(Nf, V, roughness);
k3d/share/shaders/k3d_defaultsurface.sl:1:/* defaultsurface.sl - just color the surface, don't even look at lights
k3d/share/shaders/k3d_defaultsurface.sl:3: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_defaultsurface.sl:4: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_dented.sl:2: * dented.sl -- displacement shader for dents
k3d/share/shaders/k3d_dented.sl:8: *   Km 	   	the amplitude of the dents
k3d/share/shaders/k3d_dented.sl:9: *   power	   	controls the fractal dimension of the dents (1 looks
k3d/share/shaders/k3d_dented.sl:10: *                         like previously crumpled paper or cloth, 3 looks
k3d/share/shaders/k3d_dented.sl:12: *   frequency  	the frequency of the dents
k3d/share/shaders/k3d_dented.sl:15: * AUTHOR: written by Larry Gritz, based on the "dented" shader in
k3d/share/shaders/k3d_dented.sl:16: *         RenderMan Companion, but with more control parameters.
k3d/share/shaders/k3d_dented.sl:23: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_dented.sl:24: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_dented.sl:37:	PP = transform ("shader", P);
k3d/share/shaders/k3d_depthcue.sl:1:/* depthcue.sl - Standard depthcue volume shader for RenderMan Interface.
k3d/share/shaders/k3d_depthcue.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_depthcue.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_depthcue.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_depthcue.sl:9:volume k3d_depthcue(float mindistance = 0, maxdistance = 1;
k3d/share/shaders/k3d_depthcue.sl:14:  d = clamp((depth(P) - mindistance) / (maxdistance - mindistance), 0, 1);
k3d/share/shaders/k3d_depthcue_surf.sl:1:/* k3d_depthcue_surf inspired by depthcue_surf.sl by Pixar
k3d/share/shaders/k3d_depthcue_surf.sl:2: * - Standard depthcue surface shader for RenderMan Interface.
k3d/share/shaders/k3d_depthcue_surf.sl:3: *  Author: Daniel S. Matthews dan@3-e.net
k3d/share/shaders/k3d_depthcue_surf.sl:6:surface k3d_depthcue_surf(
k3d/share/shaders/k3d_depthcue_surf.sl:13:  d = clamp((depth(P) - mindistance) / (maxdistance - mindistance), 0, 1);
k3d/share/shaders/k3d_depthcue_surf.sl:18:			printf("<debug shadername='k3d_depthcue_surf' shadertype='surface'>%p\t%f\t%f\t%c</debug>\n", P, depth(P), d, Ci);
k3d/share/shaders/k3d_distant_shadow.sl:1:light k3d_distant_shadow(
k3d/share/shaders/k3d_distant_shadow.sl:3:	color  lightcolor=1 ;
k3d/share/shaders/k3d_distant_shadow.sl:4:	point from = point "shader" (0,0,0) ;
k3d/share/shaders/k3d_distant_shadow.sl:5:	point to   = point "shader" (0,0,1) ;
k3d/share/shaders/k3d_distant_shadow.sl:6:	string shadowname="";
k3d/share/shaders/k3d_distant_shadow.sl:13:			Cl = intensity * lightcolor;
k3d/share/shaders/k3d_distant_shadow.sl:15:			if (shadowname != "") {
k3d/share/shaders/k3d_distant_shadow.sl:16:				Cl *= 1 - shadow(shadowname, Ps, "samples", samples,
k3d/share/shaders/k3d_distantlight.sl:1:/* distantlight.sl - Standard distant light source for RenderMan Interface.
k3d/share/shaders/k3d_distantlight.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_distantlight.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_distantlight.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_distantlight.sl:9:light k3d_distantlight(float intensity = 1;
k3d/share/shaders/k3d_distantlight.sl:10:		       color lightcolor = 1;
k3d/share/shaders/k3d_distantlight.sl:11:		       point from = point "shader"(0, 0, 0);
k3d/share/shaders/k3d_distantlight.sl:12:		       point to = point "shader"(0, 0, 1);)
k3d/share/shaders/k3d_distantlight.sl:14:  solar(to - from, 0) Cl = intensity * lightcolor;
k3d/share/shaders/k3d_droop.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_droop.sl:2:/* From the RenderMan Companion p.370 */
k3d/share/shaders/k3d_droop.sl:3:/* Listing 16.27  Displacement shader with catenary droop in y*/
k3d/share/shaders/k3d_droop.sl:6: * droop(): a displacement shader for making a surface "sag" along t.
k3d/share/shaders/k3d_dturb.sl:6:#include "k3d_rmannotes.h"
k3d/share/shaders/k3d_dturb.sl:12:  float width, cutoff, fade, f, turb, maxfreq = 16;
k3d/share/shaders/k3d_dturb.sl:16:  PP = transform("shader", P) * freq;
k3d/share/shaders/k3d_dturb.sl:18:  width = filterwidth_point(PP);
k3d/share/shaders/k3d_dturb.sl:19:  cutoff = clamp(0.5 / width, 0, maxfreq);
k3d/share/shaders/k3d_easysurface.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_easysurface.sl:2:/* From the RenderMan Companion p.363 */
k3d/share/shaders/k3d_easysurface.sl:3:/* Listing 16.22  Surface shader for use without a light source*/
k3d/share/shaders/k3d_easysurface.sl:6: * easysurface(): orientation-sensitive surface shading without a light source
k3d/share/shaders/k3d_ember.sl:1:/* Glowing ember shader 2002 Graeme Nattress & NOITAMINANIMATION Inc.
k3d/share/shaders/k3d_ember.sl:5: * It is designed for use with particle systems where the particle is scaled
k3d/share/shaders/k3d_ember.sl:6: * to represent it's life. The desired effect is that of glowing particles that
k3d/share/shaders/k3d_ember.sl:7: * dim and fade as they die.
k3d/share/shaders/k3d_ember.sl:9: * baseSize = the basic diameter of the particle sphere before scaling
k3d/share/shaders/k3d_ember.sl:17:		float roughness = 0.99;
k3d/share/shaders/k3d_ember.sl:25:	//size now represents the size of the sphere particle normalised into 0,1.
k3d/share/shaders/k3d_ember.sl:39:	float spcol = pow (max (0, Nf.NI * -1), 1/roughness);
k3d/share/shaders/k3d_ember.sl:40:	// basically, the standard specular function, but so that the highlight is
k3d/share/shaders/k3d_ember.sl:41:	// always in the centre of the particle sphere.
k3d/share/shaders/k3d_ember.sl:61:	// the colours for the fire effect from F. Kenton Musgrave's KMFlame.sl
k3d/share/shaders/k3d_ember.sl:63:	//only back face shade...
k3d/share/shaders/k3d_emboss.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_emboss.sl:2:/* From the RenderMan Companion p.383 */
k3d/share/shaders/k3d_emboss.sl:3:/* Listing 16.36  Displacement shader embossing a surface using a texture */
k3d/share/shaders/k3d_emboss.sl:6: * emboss(): emboss a pencil with lettering.  It uses the same texture
k3d/share/shaders/k3d_emboss.sl:7: * 	map as sdixon() to define the lettering.
k3d/share/shaders/k3d_eroded.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_eroded.sl:2:/* From the RenderMan Companion p.353 */
k3d/share/shaders/k3d_eroded.sl:3:/* Listing 16.17  Surface shader eroding the surface of an object */
k3d/share/shaders/k3d_eroded.sl:6: * eroded(): Simulate a metallic surface eaten away with acid
k3d/share/shaders/k3d_eroded.sl:13:		  roughness = 0.25)
k3d/share/shaders/k3d_eroded.sl:29:	/* sharpen peaks */
k3d/share/shaders/k3d_eroded.sl:35:	Oi = smoothstep (0.0001, 0.003, magnitude);
k3d/share/shaders/k3d_eroded.sl:36:	Ci = Oi * Cs * (Ka * ambient() + Ks * specular (Nf, V, roughness) );
k3d/share/shaders/k3d_eyeball.sl:2: * eyeball.sl -- RenderMan compatible shader for an eyeball.
k3d/share/shaders/k3d_eyeball.sl:5: *   Makes a plastic-like surface which looks like an eyeball.  It's meant
k3d/share/shaders/k3d_eyeball.sl:6: *   for use on a sphere.  The center of the pupil is at the "north pole",
k3d/share/shaders/k3d_eyeball.sl:7: *   i.e. where the t parameter is 1.  The colors of the pupil, iris, white
k3d/share/shaders/k3d_eyeball.sl:9: *   functions are used for the veining and the iris mottling.
k3d/share/shaders/k3d_eyeball.sl:12: *   Ka, Kd, Ks, roughness, specularcolor - work just like the plastic shader
k3d/share/shaders/k3d_eyeball.sl:13: *   iriscolor - color of the iris
k3d/share/shaders/k3d_eyeball.sl:14: *   eyeballcolor - color of the white part of the eyeball
k3d/share/shaders/k3d_eyeball.sl:15: *   bloodcolor - color of the blood vessels
k3d/share/shaders/k3d_eyeball.sl:16: *   pupilcolor - color of the pupil (opening)
k3d/share/shaders/k3d_eyeball.sl:18: *   irissize - size of iris (in "t" space), must be larger than pupilsize
k3d/share/shaders/k3d_eyeball.sl:19: *   bloodshot - controls how bloodshot the eye is (0=no blood, 1=very ugly)
k3d/share/shaders/k3d_eyeball.sl:20: *   veinfreq, veinlevel - control the formation of the blood vessels
k3d/share/shaders/k3d_eyeball.sl:21: *   index - set between 0 and 1, lets you use this shader to generate
k3d/share/shaders/k3d_eyeball.sl:24: * ANTIALIASING: basic antialiasing of the boundaries between tissue types
k3d/share/shaders/k3d_eyeball.sl:31: *                 "Graphic Violence".  Original version hard coded in C.
k3d/share/shaders/k3d_eyeball.sl:33: *      10 Jan 1994 - recoded by lg in correct shading language.
k3d/share/shaders/k3d_eyeball.sl:36: *       7 Jan 95 (wave) - changed name to LGEyeBall for namespace reasons...
k3d/share/shaders/k3d_eyeball.sl:37: *       8 Jan 95 (wave) - changed Ciris line to fix bug Larry figured out and changed defaults
k3d/share/shaders/k3d_eyeball.sl:38: *       27 Feb 95 (wave) - changed PO line to fix bug Larry figured out to actually *use* index
k3d/share/shaders/k3d_eyeball.sl:40: * last modified  8 Jan 95 by Michael B. Johnson (wave)
k3d/share/shaders/k3d_eyeball.sl:46:k3d_eyeball (float Ka = .75, Kd = 0.75, Ks = 0.4, roughness = 0.1;
k3d/share/shaders/k3d_eyeball.sl:55:	 float bloodshot = 1.0;
k3d/share/shaders/k3d_eyeball.sl:70:  float ks, rough;
k3d/share/shaders/k3d_eyeball.sl:71:  float twidth, cutoff;
k3d/share/shaders/k3d_eyeball.sl:73:  /* Calculate an appropriate filter width for antialiasing */
k3d/share/shaders/k3d_eyeball.sl:74:  twidth = max (abs(Du(t)*du) + abs(Dv(t)*dv), MINFILTERWIDTH);
k3d/share/shaders/k3d_eyeball.sl:77:  /* Figure out where we are in the eyeball.  Use the following variables:
k3d/share/shaders/k3d_eyeball.sl:78:   * irisstat: 0 inside the iris/white boundary, 1 outside
k3d/share/shaders/k3d_eyeball.sl:79:   * pupilstat: 0 inside the pupil/iris boundary, 1 outside
k3d/share/shaders/k3d_eyeball.sl:80:   * bloody: how potentially bloody it is (fade as we get away from iris)
k3d/share/shaders/k3d_eyeball.sl:83:  irisstat = smoothstep (irissize, irissize+twidth, tt);
k3d/share/shaders/k3d_eyeball.sl:84:  pupilstat = smoothstep (pupilsize, pupilsize+twidth, tt);
k3d/share/shaders/k3d_eyeball.sl:85:  bloody = bloodshot * (smoothstep (-irissize, 2.5*irissize, tt));
k3d/share/shaders/k3d_eyeball.sl:87:  /* If we're somewhere in the white part and it's potentially bloody,
k3d/share/shaders/k3d_eyeball.sl:88:   * then calculate the veining pattern.  Otherwise, just use the color
k3d/share/shaders/k3d_eyeball.sl:89:   * of the whites.  The veining pattern is essentially summed zero sets
k3d/share/shaders/k3d_eyeball.sl:90:   * of turbulence functions.  Some stretching is done to get it to look
k3d/share/shaders/k3d_eyeball.sl:91:   * just right.
k3d/share/shaders/k3d_eyeball.sl:98:	  newdisp = pow (smoothstep (.85, 1, newturb), 10);
k3d/share/shaders/k3d_eyeball.sl:99:	  displayed += (1-displayed) * newdisp * smoothstep (.1, .85, turb * turb);
k3d/share/shaders/k3d_eyeball.sl:103:      Cball = mix (eyeballcolor, bloodcolor, smoothstep(0,.75,displayed));
k3d/share/shaders/k3d_eyeball.sl:107:  Ciris = mix (iriscolor, irisoutercolor, smoothstep (irissize*.8, irissize, tt));
k3d/share/shaders/k3d_eyeball.sl:108:  /* If we're somewhere in the iris, calculate the iris pattern, which is
k3d/share/shaders/k3d_eyeball.sl:109:   * just a stretched turbulence function.
k3d/share/shaders/k3d_eyeball.sl:120:  /* OK, now calculate a surface texture color (Ct) based on where we are
k3d/share/shaders/k3d_eyeball.sl:121:   * and what patterns we calculated.
k3d/share/shaders/k3d_eyeball.sl:126:  /* Make the eye a little glossier on the iris and pupil */
k3d/share/shaders/k3d_eyeball.sl:128:  rough = roughness * (1-.75*(1-irisstat));
k3d/share/shaders/k3d_eyeball.sl:130:  /* Now shade like plastic, but using our calculated surface color and
k3d/share/shaders/k3d_eyeball.sl:131:   * our modified values for roughness and Ks.
k3d/share/shaders/k3d_eyeball.sl:136:	      specularcolor * ks*specular(Nf,-normalize(I),rough));
k3d/share/shaders/k3d_fakesky.sl:4: * Shader a la const that slaps a fixed blue color up on the top half of a

k3d/share/shaders/k3d_fakesky.sl:5: * sphere, with color varying a bit by altitude, in an attempt to mimic the

k3d/share/shaders/k3d_filament.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_filament.sl:2:/* From the RenderMan Companion p.368 */
k3d/share/shaders/k3d_filament.sl:3:/* Listing 16.25  Surface shader to make a cylinder look like a filament */
k3d/share/shaders/k3d_filament.sl:6: * filament(): map a filament-like spiral onto the surface of a cylinder.
k3d/share/shaders/k3d_filament.sl:11:		phase 		= 0.0, 
k3d/share/shaders/k3d_filament.sl:12:		width		= 0.3 )
k3d/share/shaders/k3d_filament.sl:14:	/* Calculate the distance of (s,t) from a spiral as a fraction [0,1] */
k3d/share/shaders/k3d_filament.sl:15:	float offset = mod((t*frequency + s + phase), 1.0);
k3d/share/shaders/k3d_filament.sl:17:	/* Threshold the fraction against the fractional filament width */
k3d/share/shaders/k3d_filament.sl:18:	if (offset < width) {
k3d/share/shaders/k3d_fill.sl:2: *simple toon fill shader with shadows
k3d/share/shaders/k3d_fill.sl:3: *compare this to plastic.sl
k3d/share/shaders/k3d_fill.sl:13:	Ci = Cs * (Ka*ambient() + Kd*(smoothstep(min,max,comp(diffuse(Nf),0))));
k3d/share/shaders/k3d_fire.sl:3: * animated fire -- adpated from shader by Flip Phillips
k3d/share/shaders/k3d_fire.sl:7:#include "k3d_rmannotes.h"
k3d/share/shaders/k3d_fire.sl:13:  float width, cutoff, fade, f, turb, maxfreq = 16;
k3d/share/shaders/k3d_fire.sl:19:  color hot = color (1, 1, .8);
k3d/share/shaders/k3d_fire.sl:24:  /* compress ss & offset both by factor of current frame */
k3d/share/shaders/k3d_fire.sl:31:  width = max(filterwidth(ss), filterwidth(tt));
k3d/share/shaders/k3d_fire.sl:32:  cutoff = clamp(0.5 / width, 0, maxfreq);
k3d/share/shaders/k3d_fire.sl:45:  layer_color = spline(flame, red, red, red, red, orange, yellow, hot, hot);
k3d/share/shaders/k3d_flame.sl:2: * flame.sl -- RenderMan compatible surface shader for a flame-like texture.
k3d/share/shaders/k3d_flame.sl:5: *    Makes something that looks like fire.
k3d/share/shaders/k3d_flame.sl:9: *    chaosscale, chaosoffset, octaves - control the fBm
k3d/share/shaders/k3d_flame.sl:10: *    flameheight, flameamplitude - scaling factors
k3d/share/shaders/k3d_flame.sl:13: *    None, but should be easy to add antialiasing simply by adaptively
k3d/share/shaders/k3d_flame.sl:14: *    setting the "octaves" parameter based on distance from eye point.
k3d/share/shaders/k3d_flame.sl:18: *    Translation to RenderMan Shading Language by Larry Gritz.
k3d/share/shaders/k3d_flame.sl:21: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_flame.sl:22: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_flame.sl:27: *    Apr 94 - translation to Shading Language by L. Gritz
k3d/share/shaders/k3d_flame.sl:29: * this file last updated 18 Apr 1994
k3d/share/shaders/k3d_flame.sl:37:		  float chaosscale = 1; float chaosoffset = 0;
k3d/share/shaders/k3d_flame.sl:39:		  float flameamplitude = 2.0; float phase = 0.0)
k3d/share/shaders/k3d_flame.sl:43:  float chaos, i, cmap;
k3d/share/shaders/k3d_flame.sl:45:  PP = point(s, t, phase);
k3d/share/shaders/k3d_flame.sl:49:  chaos = 0;
k3d/share/shaders/k3d_flame.sl:52:      chaos += VLNoise(freq * PQ, distortion) / freq;
k3d/share/shaders/k3d_flame.sl:56:  chaos = abs(chaosscale * chaos + chaosoffset);
k3d/share/shaders/k3d_flame.sl:57:  cmap = 0.85 * chaos + flameoffset + (flameamplitude * ycomp(PP));
k3d/share/shaders/k3d_fog.sl:1:/* fog.sl - Standard fog volume shader for RenderMan Interface.
k3d/share/shaders/k3d_fog.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_fog.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_fog.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_fog.sl:11:  float d = 1 - exp(-length(I) / distance);
k3d/share/shaders/k3d_fractal.sl:3: *    Conversion to Shading Language and minor modifications by Fredrik Brnnbacka.

k3d/share/shaders/k3d_fractal.sl:7: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,

k3d/share/shaders/k3d_fractal.sl:8: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.

k3d/share/shaders/k3d_fractal.sl:15:k3d_fractal(float H = 0.8, lacunarity = 2.5, octaves = 7, offset = 0.9, sharpness = 4, threshold = 12, Kt = 0.1)

k3d/share/shaders/k3d_fractal.sl:17:	float result, signal, weight, i, exponent;

k3d/share/shaders/k3d_fractal.sl:18:	point PP =transform("shader",P);

k3d/share/shaders/k3d_fractal.sl:27:          		signal = pow( signal, sharpness );

k3d/share/shaders/k3d_fractal.sl:28:                             /*This should give you a power function to control

k3d/share/shaders/k3d_fractal.sl:29:                             sharpness of the ridges. Or you can just use the

k3d/share/shaders/k3d_fractal.sl:32:          		weight = 1.0;

k3d/share/shaders/k3d_fractal.sl:42:          		/* weigh successive contributions by previous signal */

k3d/share/shaders/k3d_fractal.sl:43:          		weight = signal * threshold;

k3d/share/shaders/k3d_fractal.sl:44:          		weight = clamp(weight,0,1)    ;    		

k3d/share/shaders/k3d_fractal.sl:53:          		/* sharpen the ridge*/

k3d/share/shaders/k3d_fractal.sl:54:          		signal = pow( signal, sharpness ); /* Or signal *= signal;*/

k3d/share/shaders/k3d_fractal.sl:56:          		/* weight the contribution*/

k3d/share/shaders/k3d_fractal.sl:57:          		signal *= weight;

k3d/share/shaders/k3d_fresnelplastic.sl:2: * TLFresnelPlastic.sl -- simple shader illustrating fresnel().
k3d/share/shaders/k3d_fresnelplastic.sl:5: *    Simple Fresnel shader using plastic illuminance.
k3d/share/shaders/k3d_fresnelplastic.sl:16:#include "k3d_reflections.h"
k3d/share/shaders/k3d_fresnelplastic.sl:39:   float roughness= 0.1;  /* desc {Specular roughness} */
k3d/share/shaders/k3d_fresnelplastic.sl:41:   float Kr = 0;  /* cat Reflection desc {Strength of reflection } */
k3d/share/shaders/k3d_fresnelplastic.sl:47:   desc {Space the reflection calculations are performed in. } */
k3d/share/shaders/k3d_fresnelplastic.sl:49:   /* cat Reflection desc {The size of the room to base the reflection
k3d/share/shaders/k3d_fresnelplastic.sl:52:   float flipS = 0; /* cat ST type switch desc {Flip S on texture lookups.} */
k3d/share/shaders/k3d_fresnelplastic.sl:53:   float flipT = 0; /* cat ST type switch desc {Flip S on texture lookups.} */
k3d/share/shaders/k3d_fresnelplastic.sl:54:   float MtorFlip = 0; /* cat ST type switch def 1
k3d/share/shaders/k3d_fresnelplastic.sl:85:      /* hack */
k3d/share/shaders/k3d_fresnelplastic.sl:107:    /* lighting */
k3d/share/shaders/k3d_fresnelplastic.sl:110:                fKr * Cspec * Ks * specular(Nf,V,roughness) +
k3d/share/shaders/k3d_funkyglass.sl:2: * (c) Copyright 1994, Larry Gritz
k3d/share/shaders/k3d_funkyglass.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_funkyglass.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_funkyglass.sl:10:		       float Kd = .2; float Ks = 1; float roughness = .08;
k3d/share/shaders/k3d_funkyglass.sl:20:  PP = transform("shader", P);
k3d/share/shaders/k3d_funkyglass.sl:27:     specularcolor * Ks * specular(Nf, -V, roughness));
k3d/share/shaders/k3d_fur1.sl:3: *   - Simple algorithm: checkerboard

k3d/share/shaders/k3d_fur1.sl:5: *     by Lawrence D. Chin, cs184-bo

k3d/share/shaders/k3d_fur1.sl:11:k3d_fur1 ( float height = 1.0,

k3d/share/shaders/k3d_fur1.sl:23:      P += 0.5 + N * height;

k3d/share/shaders/k3d_fur1.sl:26:      P += 0.5 + N * height;

k3d/share/shaders/k3d_fur2.sl:1:/* Renamed to SIG2k_srf_fur to be consistent with the RMR 
k3d/share/shaders/k3d_fur2.sl:5:/* fur surface shader
k3d/share/shaders/k3d_fur2.sl:7:   with clumping and specular model
k3d/share/shaders/k3d_fur2.sl:13:fnc_diffuselgt (color Cin;       /* Light Colour */
k3d/share/shaders/k3d_fur2.sl:14:                point Lin;       /* Light Position */
k3d/share/shaders/k3d_fur2.sl:22:    /* normalize the stuff */
k3d/share/shaders/k3d_fur2.sl:39:k3d_fur2( /* Hair Shading... */
k3d/share/shaders/k3d_fur2.sl:43:	 float roughness1  = 0.008;
k3d/share/shaders/k3d_fur2.sl:45:	 float roughness2  = 0.016;
k3d/share/shaders/k3d_fur2.sl:50:	 float illum_width  = 180;
k3d/share/shaders/k3d_fur2.sl:53:	 float clump_dark_strength = 0.0;
k3d/share/shaders/k3d_fur2.sl:61:	 /* Variables Passed from the rib... */
k3d/share/shaders/k3d_fur2.sl:62:	 uniform float hair_col_var  = 0.0;
k3d/share/shaders/k3d_fur2.sl:63:	 uniform float hair_length = 0.0;
k3d/share/shaders/k3d_fur2.sl:66:	 uniform float hair_id   = 0.0; /* Watch Out... Across Patches */
k3d/share/shaders/k3d_fur2.sl:70:    vector T = normalize (dPdv); /* tangent along length of hair */
k3d/share/shaders/k3d_fur2.sl:71:    vector V = -normalize(I);    /* V is the view vector */
k3d/share/shaders/k3d_fur2.sl:72:    color Cspec = 0, Cdiff = 0;  /* collect specular & diffuse light */
k3d/share/shaders/k3d_fur2.sl:76:    vector S = nSN^T;     /* Cross product of the tangent along the hair and surface normal */
k3d/share/shaders/k3d_fur2.sl:77:    vector N_hair = (T^S); /* N_hair is a normal for the hair oriented "away" from the surface */
k3d/share/shaders/k3d_fur2.sl:78:    vector norm_hair;
k3d/share/shaders/k3d_fur2.sl:83:    float Alpha = 0;
k3d/share/shaders/k3d_fur2.sl:89:    /* values from light */
k3d/share/shaders/k3d_fur2.sl:93:    /* When the hair is exactly perpendicular to the surface, use the
k3d/share/shaders/k3d_fur2.sl:94:       surface normal, when the hair is exactly tangent to the
k3d/share/shaders/k3d_fur2.sl:95:       surface, use the hair normal Otherwise, blend between the two
k3d/share/shaders/k3d_fur2.sl:96:       normals in a linear fashion 
k3d/share/shaders/k3d_fur2.sl:98:    norm_hair = (l * nSN) + ( (1-l) * N_hair);
k3d/share/shaders/k3d_fur2.sl:99:    norm_hair = normalize(norm_hair);
k3d/share/shaders/k3d_fur2.sl:101:    /* Make the specular only hit in certain parts of the hair--v is
k3d/share/shaders/k3d_fur2.sl:102:       along the length of the hair 
k3d/share/shaders/k3d_fur2.sl:104:    Kspec *= min( smoothstep( start_spec, start_spec + spec_size_fade, v),  
k3d/share/shaders/k3d_fur2.sl:105:		  1 - smoothstep( end_spec, end_spec - spec_size_fade, v ) );
k3d/share/shaders/k3d_fur2.sl:108:    /* Loop over lights, catch highlights as if this was a thin cylinder,
k3d/share/shaders/k3d_fur2.sl:111:       James T. Kajiya and Timothy L.  Kay (1989) "Rendering Fur with Three 
k3d/share/shaders/k3d_fur2.sl:112:       Dimensional Textures", Computer Graphics 23,3, 271-280  
k3d/share/shaders/k3d_fur2.sl:115:    illuminance (P, norm_hair, radians(illum_width)) {
k3d/share/shaders/k3d_fur2.sl:120:	Alpha = acos(T_Dot_nL);
k3d/share/shaders/k3d_fur2.sl:123:	Kajiya = T_Dot_nL * T_Dot_e + sin(Alpha) * sin(Beta);
k3d/share/shaders/k3d_fur2.sl:126:	if ( clump_dark_strength > 0.0 ) {
k3d/share/shaders/k3d_fur2.sl:127:	    clump_darkening = 1 - ( clump_dark_strength * 
k3d/share/shaders/k3d_fur2.sl:133:	/* get light source parameters */
k3d/share/shaders/k3d_fur2.sl:134:	if ( lightsource("__nonspecular",nonspecular) == 0)
k3d/share/shaders/k3d_fur2.sl:136:	if ( lightsource("__SpecularColor",SpecularColor) == 0)
k3d/share/shaders/k3d_fur2.sl:140:	    ((SPEC1*Cl*pow(Kajiya, 1/roughness1)) + 
k3d/share/shaders/k3d_fur2.sl:141:	     (SPEC2*Cl*pow(Kajiya, 1/roughness2)));
k3d/share/shaders/k3d_fur2.sl:143:	Cdiff += clump_darkening * fnc_diffuselgt(Cl, L, norm_hair);
k3d/share/shaders/k3d_fur2.sl:146:    darkening = clamp(hair_col_var, 0, 1);
k3d/share/shaders/k3d_fur2.sl:148:    darkening = (1 - (smoothstep( var_fade_end, var_fade_start, 
k3d/share/shaders/k3d_glass.sl:2: * glass.sl -- Shiny reflective & refractive glass, using ray tracing.
k3d/share/shaders/k3d_glass.sl:6: *   reflections and refractions of the environment.
k3d/share/shaders/k3d_glass.sl:9: *    Ka, Kd, Ks, roughness, specularcolor - The usual meaning
k3d/share/shaders/k3d_glass.sl:11: *    blur - how blurry are the reflections? (0 = perfectly sharp)
k3d/share/shaders/k3d_glass.sl:15: *    transmitcolor - color of the glass
k3d/share/shaders/k3d_glass.sl:16: *    refrblur - how blurry are the refractions? (0 = perfectly sharp)
k3d/share/shaders/k3d_glass.sl:17: *    eta - the coefficient of refraction of the glass
k3d/share/shaders/k3d_glass.sl:22: * Author: Larry Gritz, 1999  (lg@bmrt.org)
k3d/share/shaders/k3d_glass.sl:26: *   by Anthony A. Apodaca and Larry Gritz, Morgan Kaufmann, 1999.
k3d/share/shaders/k3d_glass.sl:32:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_glass.sl:33:#include "k3d_material.h"
k3d/share/shaders/k3d_glass.sl:35:surface k3d_glass(float Ka = 0.2, Kd = 0, Ks = 0.5, roughness = 0.05;
k3d/share/shaders/k3d_glass.sl:45:    MaterialGlass(Nf, Cs, Ka, Kd, Ks, roughness, Kr, reflblur, Kt, refrblur,
k3d/share/shaders/k3d_gloop.sl:2: *  courtesy of Rhythm & Hues  (thanks!)
k3d/share/shaders/k3d_gloop.sl:6: * generated from the gradient of a noise function.
k3d/share/shaders/k3d_gloop.sl:7: * Written as an explanation to the talk I gave at
k3d/share/shaders/k3d_gloop.sl:8: * the "stupid renderman tricks" section of the 1998
k3d/share/shaders/k3d_gloop.sl:9: * Renderman Users Group meeting at siggraph.
k3d/share/shaders/k3d_gloop.sl:11: * freq - the frequency of the noise. Lower values
k3d/share/shaders/k3d_gloop.sl:13: *        have to change your displacement bounds to fit
k3d/share/shaders/k3d_gloop.sl:14: *        rhymes with freak.
k3d/share/shaders/k3d_gloop.sl:16: * magnitude - how far to displace. probably fine set where it is.
k3d/share/shaders/k3d_gloop.sl:18: * displacement bounds can be computed with the following 
k3d/share/shaders/k3d_gloop.sl:31:  point  Psh = transform("object",P)*freq;
k3d/share/shaders/k3d_gloop.sl:37:  point  Pou = Psh + (dPduN*overdist);/*P Over a distance in U*/
k3d/share/shaders/k3d_gloop.sl:38:  point  Pov = Psh + (dPdvN*overdist);
k3d/share/shaders/k3d_gloop.sl:40:  /*noise function at the point, over in u, and over in v*/
k3d/share/shaders/k3d_gloop.sl:41:  float  nz = noise(Psh)-.5;
k3d/share/shaders/k3d_gloop.sl:45:  float  chu = (nz - nzou);/*change in noise value in u*/
k3d/share/shaders/k3d_gloop.sl:46:  float  chv = (nz - nzov); 
k3d/share/shaders/k3d_gloop.sl:54:  /*where it all happens*/
k3d/share/shaders/k3d_gloop.sl:57:    DdPdu = normalize(DdPdu+(step*chu));
k3d/share/shaders/k3d_gloop.sl:58:    DdPdv = normalize(DdPdv+(step*chv));
k3d/share/shaders/k3d_gloop.sl:62:  /* wash your hands after displacing P*/
k3d/share/shaders/k3d_glow.sl:5:  float incidence, strength;
k3d/share/shaders/k3d_glow.sl:9:  if(incidence < 0)		// If this point is on the front face of the sphere
k3d/share/shaders/k3d_glow.sl:14:      // Calculate a "strength" function based on incidence
k3d/share/shaders/k3d_glow.sl:15:      strength = pow(incidence, attenuation);
k3d/share/shaders/k3d_glow.sl:17:      C = mix(edgecolor, centercolor, strength);
k3d/share/shaders/k3d_glow.sl:21:      Ci = C * strength * Os;
k3d/share/shaders/k3d_gmarbtile_polish.sl:2: * gmarbtile_polish.sl -- polished green marble tiles
k3d/share/shaders/k3d_gmarbtile_polish.sl:5: *   Makes the same marble texture as greenmarble, but polished (with ray
k3d/share/shaders/k3d_gmarbtile_polish.sl:9: *   Ka, Kd, Ks, roughness, specularcolor - work just like the plastic
k3d/share/shaders/k3d_gmarbtile_polish.sl:10: *   Kr - reflectivity (shininess) of the surface
k3d/share/shaders/k3d_gmarbtile_polish.sl:11: *   txtscale - overall scaling for the texture
k3d/share/shaders/k3d_gmarbtile_polish.sl:12: *   darkcolor, lightcolor - colors of the underlying substrate
k3d/share/shaders/k3d_gmarbtile_polish.sl:13: *   veincolor - color of the bright veins
k3d/share/shaders/k3d_gmarbtile_polish.sl:14: *   veinfreq - controls the frequency of the veining effects
k3d/share/shaders/k3d_gmarbtile_polish.sl:15: *   sharpness - how sharp the veins appear
k3d/share/shaders/k3d_gmarbtile_polish.sl:16: *   groovecolor - the color of the grooves between the tiles.
k3d/share/shaders/k3d_gmarbtile_polish.sl:17: *   groovewidth - the width of the grooves
k3d/share/shaders/k3d_gmarbtile_polish.sl:18: *   tilesize - how big each tile is
k3d/share/shaders/k3d_gmarbtile_polish.sl:23:#include "k3d_noises.h"
k3d/share/shaders/k3d_gmarbtile_polish.sl:24:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_gmarbtile_polish.sl:25:#include "k3d_reflections.h"
k3d/share/shaders/k3d_gmarbtile_polish.sl:28:surface k3d_gmarbtile_polish(float Ka = 0.5, Kd = 0.4, Ks = 0.2;
k3d/share/shaders/k3d_gmarbtile_polish.sl:29:			     float Kr = 0.2, roughness = 0.05;
k3d/share/shaders/k3d_gmarbtile_polish.sl:33:			     color lightcolor = color(0.06, 0.18, 0.02);
k3d/share/shaders/k3d_gmarbtile_polish.sl:37:			     float sharpness = 25;
k3d/share/shaders/k3d_gmarbtile_polish.sl:39:			     float groovewidth = 0.015;
k3d/share/shaders/k3d_gmarbtile_polish.sl:51:  float whichs, whicht;
k3d/share/shaders/k3d_gmarbtile_polish.sl:53:  point PP = txtscale * transform("shader", P);
k3d/share/shaders/k3d_gmarbtile_polish.sl:54:  float dPP = filterwidthp(PP);
k3d/share/shaders/k3d_gmarbtile_polish.sl:57:  float dss = filterwidth(ss);
k3d/share/shaders/k3d_gmarbtile_polish.sl:59:  float dtt = filterwidth(tt);
k3d/share/shaders/k3d_gmarbtile_polish.sl:61:  float groovy = tilepattern(ss, tt, dss, dtt, groovewidth, groovewidth,
k3d/share/shaders/k3d_gmarbtile_polish.sl:62:			     whichs, whicht, ss, tt);
k3d/share/shaders/k3d_gmarbtile_polish.sl:64:  offset = vector(7 * whichs, 15 * whicht, 0 /*-23*floor(zcomp(PQ))*/ );
k3d/share/shaders/k3d_gmarbtile_polish.sl:68:   * First calculate the underlying color of the substrate
k3d/share/shaders/k3d_gmarbtile_polish.sl:71:  Ct = mix(darkcolor, lightcolor, smoothstep(0.1, .35, turb));
k3d/share/shaders/k3d_gmarbtile_polish.sl:74:   * Now we layer on the veins
k3d/share/shaders/k3d_gmarbtile_polish.sl:77:  /* perturb the lookup */
k3d/share/shaders/k3d_gmarbtile_polish.sl:80:  /* Now calculate the veining function for the lookup area */
k3d/share/shaders/k3d_gmarbtile_polish.sl:88:      turb = pow(smoothstep(0.8, 1, 1 - turb), sharpness) / freq;
k3d/share/shaders/k3d_gmarbtile_polish.sl:93:    smoothstep(-0.1, 0.05,
k3d/share/shaders/k3d_gmarbtile_polish.sl:103:  env = Ks * specular(Nf, -V, roughness);
k3d/share/shaders/k3d_gooch.sl:1:/* Renamed to MKgooch.sl for RMR -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_gooch.sl:3:/* s_gooch.sl - a simple implementation of the Gooch
k3d/share/shaders/k3d_gooch.sl:4: *              non-photorealistic lighting model
k3d/share/shaders/k3d_gooch.sl:6: * DESCRIPTION   : This model is described in "A Non-Photorealistc
k3d/share/shaders/k3d_gooch.sl:7: *                 Lighting Model For Automatic Technical 
k3d/share/shaders/k3d_gooch.sl:8: *                 Illustration" in the Siggraph 1998 Proceedings.
k3d/share/shaders/k3d_gooch.sl:9: *                 http://www.cs.utah.edu/~gooch/SIG98/abstract.html
k3d/share/shaders/k3d_gooch.sl:15: *  alpha        : Gooch cool color factor
k3d/share/shaders/k3d_gooch.sl:16: *  beta         : Gooch warm color factor
k3d/share/shaders/k3d_gooch.sl:17: *  b            : used to construct the cool color
k3d/share/shaders/k3d_gooch.sl:18: *  y            : used to construct the warm color
k3d/share/shaders/k3d_gooch.sl:19: *  roughness    : specular roughness
k3d/share/shaders/k3d_gooch.sl:20: *  specularcolor: specular hilight color
k3d/share/shaders/k3d_gooch.sl:27:k3d_gooch (float Ka = 0;
k3d/share/shaders/k3d_gooch.sl:30:         float alpha = .25;
k3d/share/shaders/k3d_gooch.sl:34:         float roughness = .1;
k3d/share/shaders/k3d_gooch.sl:41:    color Cgooch = color(0,0,0); 
k3d/share/shaders/k3d_gooch.sl:45:    kcool = blue + ( Cs * alpha);
k3d/share/shaders/k3d_gooch.sl:50:        Cgooch += mix(kcool,kwarm,blendval); 
k3d/share/shaders/k3d_gooch.sl:55:                Kd*Cgooch +
k3d/share/shaders/k3d_gooch.sl:56:                specularcolor*Ks*specular(Nf,-normalize(I),roughness)));
k3d/share/shaders/k3d_gouge.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_gouge.sl:2:/* From the RenderMan Companion p.379 */
k3d/share/shaders/k3d_gouge.sl:3:/* Listing 16.32  Displacement shader for beating up a surface with a texture  */
k3d/share/shaders/k3d_gouge.sl:11:		spin	= 0.0;		/* each pin gets its texture spun */
k3d/share/shaders/k3d_gouge.sl:16:   /* Use the same texture map that the surface shader uses. Spin it a different
k3d/share/shaders/k3d_gouge.sl:17:    *  amount for each pin so that similarity is not detected.  The texture 
k3d/share/shaders/k3d_gouge.sl:18:    *  determines the size of the gouge. Multiply by the Km factor, then 
k3d/share/shaders/k3d_gouge.sl:19:    *  displace the surface point inwards by that amount. 
k3d/share/shaders/k3d_granite.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_granite.sl:2:/* From the RenderMan Companion p.352 */
k3d/share/shaders/k3d_granite.sl:3:/* Listing 16.18  Surface shader for granite-like surface*/
k3d/share/shaders/k3d_granite.sl:14:	float i, freq = 1.0; /* Try other values for example, 7.0 */
k3d/share/shaders/k3d_graphic_lines.sl:1:surface k3d_graphic_lines (
k3d/share/shaders/k3d_graphic_lines.sl:6:        float roughness=1.0;
k3d/share/shaders/k3d_graphic_lines.sl:10:        float ink_thresh=0.10;
k3d/share/shaders/k3d_graphic_lines.sl:14:        string up_highlight="z";
k3d/share/shaders/k3d_graphic_lines.sl:15:        float line_scale_highlight=16.0;
k3d/share/shaders/k3d_graphic_lines.sl:16:        float contrast_highlight=1.0;
k3d/share/shaders/k3d_graphic_lines.sl:17:        float brightness_highlight=0.5;
k3d/share/shaders/k3d_graphic_lines.sl:18:        float randomness_highlight=0.0;
k3d/share/shaders/k3d_graphic_lines.sl:19:        float noise_size_highlight=1.0;
k3d/share/shaders/k3d_graphic_lines.sl:20:        color color_curve_highlight_color1=(0.0,0.0,0.0);
k3d/share/shaders/k3d_graphic_lines.sl:21:        color color_curve_highlight_color2=(0.1,0.05,0.0);
k3d/share/shaders/k3d_graphic_lines.sl:22:        color color_curve_highlight_color3=(0.8,0.6,0.4);
k3d/share/shaders/k3d_graphic_lines.sl:23:        color color_curve_highlight_color4=(1.0,1.0,0.8);
k3d/share/shaders/k3d_graphic_lines.sl:24:        color color_curve_highlight_color5=(1.0,1.0,1.0);
k3d/share/shaders/k3d_graphic_lines.sl:25:        color color_curve_highlight_color6=(1.0,1.0,1.0);
k3d/share/shaders/k3d_graphic_lines.sl:26:        float surface_opac_highlight=1.0;
k3d/share/shaders/k3d_graphic_lines.sl:27:        float surface_trans_highlight=1.0;
k3d/share/shaders/k3d_graphic_lines.sl:28:        float fuzz_highlight=0.3;
k3d/share/shaders/k3d_graphic_lines.sl:29:				float tfreq_highlight=50;
k3d/share/shaders/k3d_graphic_lines.sl:30:				color illumcolor_highlight=(0.0,0.0,0.0);
k3d/share/shaders/k3d_graphic_lines.sl:31:				float illumination_highlight=0.0;
k3d/share/shaders/k3d_graphic_lines.sl:32:				float Ka_highlight=0.10;
k3d/share/shaders/k3d_graphic_lines.sl:33:				float Kd_highlight=0.70;
k3d/share/shaders/k3d_graphic_lines.sl:34:				float Ks_highlight=0.20;
k3d/share/shaders/k3d_graphic_lines.sl:35:				float roughness_highlight=0.2;
k3d/share/shaders/k3d_graphic_lines.sl:40:        float brightness_paint=0.3;
k3d/share/shaders/k3d_graphic_lines.sl:58:				float roughness_paint=0.2;
k3d/share/shaders/k3d_graphic_lines.sl:63:        float brightness_ink=0.5;
k3d/share/shaders/k3d_graphic_lines.sl:81:				float roughness_ink=0.2;
k3d/share/shaders/k3d_graphic_lines.sl:86:	/** hightlights **/
k3d/share/shaders/k3d_graphic_lines.sl:88:	point P_highlight = P;
k3d/share/shaders/k3d_graphic_lines.sl:89:	normal N_highlight = N;
k3d/share/shaders/k3d_graphic_lines.sl:90:	color Ci_highlight = Ci;
k3d/share/shaders/k3d_graphic_lines.sl:91:	color Oi_highlight = Oi;
k3d/share/shaders/k3d_graphic_lines.sl:93:	color surface_color_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:94:	color layer_color_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:95:	color color_curve_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:96:	color layer_opac_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:97:	float stripemin_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:98:	float stripemax_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:99:	float tt_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:100:	float x_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:101:	float y_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:102:	float z_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:103:	float i_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:104:	float n_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:105:	float ns_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:106:	vector Nf_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:107:	vector V_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:108:	point Psh_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:109:	Psh_highlight=transform("shader",P_highlight);
k3d/share/shaders/k3d_graphic_lines.sl:110:	Nf_highlight=faceforward(normalize(N_highlight),I);
k3d/share/shaders/k3d_graphic_lines.sl:111:	V_highlight=-normalize(I);
k3d/share/shaders/k3d_graphic_lines.sl:113:/** setup tt_highlight with chosen axis **/
k3d/share/shaders/k3d_graphic_lines.sl:114:	if (up_highlight == "z")
k3d/share/shaders/k3d_graphic_lines.sl:115:	{z_highlight=zcomp(Psh_highlight);
k3d/share/shaders/k3d_graphic_lines.sl:116:		z_highlight*=line_scale_highlight*line_scale_master;
k3d/share/shaders/k3d_graphic_lines.sl:117:		tt_highlight=mod(z_highlight,1);
k3d/share/shaders/k3d_graphic_lines.sl:119:	else if (up_highlight == "y")
k3d/share/shaders/k3d_graphic_lines.sl:120:	{y_highlight=ycomp(Psh_highlight);
k3d/share/shaders/k3d_graphic_lines.sl:121:		y_highlight*=line_scale_highlight*line_scale_master;
k3d/share/shaders/k3d_graphic_lines.sl:122:		tt_highlight=mod(y_highlight,1);
k3d/share/shaders/k3d_graphic_lines.sl:124:	else {x_highlight=xcomp(Psh_highlight);
k3d/share/shaders/k3d_graphic_lines.sl:125:		x_highlight*=line_scale_highlight*line_scale_master;
k3d/share/shaders/k3d_graphic_lines.sl:126:		tt_highlight=mod(x_highlight,1);
k3d/share/shaders/k3d_graphic_lines.sl:128:	illumcolor_highlight=(Ka_highlight*ambient()+Kd_highlight*diffuse(Nf_highlight)+Ks_highlight*specular(Nf_highlight,V_highlight,roughness_highlight));
k3d/share/shaders/k3d_graphic_lines.sl:129:	illumination_highlight=max(max(comp(illumcolor_highlight,0),comp(illumcolor_highlight,1)),comp(illumcolor_highlight,2));
k3d/share/shaders/k3d_graphic_lines.sl:130:	n_highlight=0;
k3d/share/shaders/k3d_graphic_lines.sl:131:	ns_highlight=noise_size_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:133:	for (i_highlight=0; i_highlight<6.0 ;i_highlight+=1.0){
k3d/share/shaders/k3d_graphic_lines.sl:134:		n_highlight+=(2*noise(Psh_highlight*ns_highlight)-1)/ns_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:135:		ns_highlight*=2.17;
k3d/share/shaders/k3d_graphic_lines.sl:137:	illumination_highlight=(illumination_highlight*contrast_highlight)+(1.0-contrast_highlight)/2.0+(brightness_highlight-1.0)+n_highlight*randomness_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:138:	if (illumination_highlight<0.01)
k3d/share/shaders/k3d_graphic_lines.sl:139:	{surface_color_highlight=color(0.0,0.0,0.0);
k3d/share/shaders/k3d_graphic_lines.sl:140:		layer_color_highlight=0.0;
k3d/share/shaders/k3d_graphic_lines.sl:142:	else if (illumination_highlight>0.99)
k3d/share/shaders/k3d_graphic_lines.sl:143:	{surface_color_highlight=color(1.0,1.0,1.0);
k3d/share/shaders/k3d_graphic_lines.sl:144:		layer_color_highlight=1.0;
k3d/share/shaders/k3d_graphic_lines.sl:146:	else {surface_color_highlight=color(0.0,0.0,0.0);
k3d/share/shaders/k3d_graphic_lines.sl:147:		layer_color_highlight=1.0;
k3d/share/shaders/k3d_graphic_lines.sl:149:	stripemin_highlight=0.5-smoothstep(0.0,1.0,illumination_highlight)/2.0;
k3d/share/shaders/k3d_graphic_lines.sl:150:	stripemax_highlight=0.5+smoothstep(0.0,1.0,illumination_highlight)/2.0;
k3d/share/shaders/k3d_graphic_lines.sl:151:	float val_highlight=(smoothstep((stripemin_highlight)-(fuzz_highlight),(stripemin_highlight),(tt_highlight))-smoothstep((stripemax_highlight)-(fuzz_highlight),(stripemax_highlight),(tt_highlight)));
k3d/share/shaders/k3d_graphic_lines.sl:152:	layer_opac_highlight=color(val_highlight);
k3d/share/shaders/k3d_graphic_lines.sl:153:	surface_color_highlight=((surface_color_highlight)*(1-(layer_opac_highlight))+(layer_color_highlight)*(layer_opac_highlight));
k3d/share/shaders/k3d_graphic_lines.sl:154:	float color_val_highlight=mix(0.0,1.0,val_highlight);
k3d/share/shaders/k3d_graphic_lines.sl:155:	color_curve_highlight=spline(color_val_highlight,color_curve_highlight_color1,color_curve_highlight_color2,color_curve_highlight_color3,color_curve_highlight_color4,color_curve_highlight_color5,color_curve_highlight_color6);
k3d/share/shaders/k3d_graphic_lines.sl:156:	float spacescale_highlight=length(vtransform("shader",normalize(N_highlight)));
k3d/share/shaders/k3d_graphic_lines.sl:157:	vector Ndisp_highlight=normalize(N_highlight)*(0/max(spacescale_highlight,1e-6));
k3d/share/shaders/k3d_graphic_lines.sl:159:	P_highlight+=0*Ndisp_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:160:	N_highlight=normalize(calculatenormal(P_highlight+(1-0)*Ndisp_highlight));
k3d/share/shaders/k3d_graphic_lines.sl:161:	Ci_highlight=surface_opac_highlight*color_curve_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:162:	Oi_highlight=surface_trans_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:186:	point Psh_paint;
k3d/share/shaders/k3d_graphic_lines.sl:187:	Psh_paint=transform("shader",P_paint);
k3d/share/shaders/k3d_graphic_lines.sl:191:	{z_paint=zcomp(Psh_paint);
k3d/share/shaders/k3d_graphic_lines.sl:196:	{y_paint=ycomp(Psh_paint);
k3d/share/shaders/k3d_graphic_lines.sl:200:	else {x_paint=xcomp(Psh_paint);
k3d/share/shaders/k3d_graphic_lines.sl:203:	}illumcolor_paint=(Ka_paint*ambient()+Kd_paint*diffuse(Nf_paint)+Ks_paint*specular(Nf_paint,V_paint,roughness_paint));
k3d/share/shaders/k3d_graphic_lines.sl:208:		n_paint+=(2*noise(Psh_paint*ns_paint)-1)/ns_paint;
k3d/share/shaders/k3d_graphic_lines.sl:211:	illumination_paint=(illumination_paint*contrast_paint)+(1.0-contrast_paint)/2.0+(brightness_paint-1.0)+n_paint*randomness_paint;
k3d/share/shaders/k3d_graphic_lines.sl:222:	}stripemin_paint=0.5-smoothstep(0.0,1.0,illumination_paint)/2.0;
k3d/share/shaders/k3d_graphic_lines.sl:223:	stripemax_paint=0.5+smoothstep(0.0,1.0,illumination_paint)/2.0;
k3d/share/shaders/k3d_graphic_lines.sl:224:	float val1=(smoothstep((stripemin_paint)-(fuzz_paint),(stripemin_paint),(tt_paint))-smoothstep((stripemax_paint)-(fuzz_paint),(stripemax_paint),(tt_paint)));
k3d/share/shaders/k3d_graphic_lines.sl:229:	float spacescale1=length(vtransform("shader",normalize(N_paint)));
k3d/share/shaders/k3d_graphic_lines.sl:258:	point Psh_ink;
k3d/share/shaders/k3d_graphic_lines.sl:259:	Psh_ink=transform("shader",P_ink);
k3d/share/shaders/k3d_graphic_lines.sl:263:	{z_ink=zcomp(Psh_ink);
k3d/share/shaders/k3d_graphic_lines.sl:268:	{y_ink=ycomp(Psh_ink);
k3d/share/shaders/k3d_graphic_lines.sl:272:	else {x_ink=xcomp(Psh_ink);
k3d/share/shaders/k3d_graphic_lines.sl:275:	}illumcolor_ink=(Ka_ink*ambient()+Kd_ink*diffuse(Nf_ink)+Ks_ink*specular(Nf_ink,V_ink,roughness_ink));
k3d/share/shaders/k3d_graphic_lines.sl:280:		n_ink+=(2*noise(Psh_ink*ns_ink)-1)/ns_ink;
k3d/share/shaders/k3d_graphic_lines.sl:283:	illumination_ink=(illumination_ink*contrast_ink)+(1.0-contrast_ink)/2.0+(brightness_ink-1.0)+n_ink*randomness_ink;
k3d/share/shaders/k3d_graphic_lines.sl:294:	}stripemin_ink=0.5-smoothstep(0.0,1.0,illumination_ink)/2.0;
k3d/share/shaders/k3d_graphic_lines.sl:295:	stripemax_ink=0.5+smoothstep(0.0,1.0,illumination_ink)/2.0;
k3d/share/shaders/k3d_graphic_lines.sl:296:	float val2=(smoothstep((stripemin_ink)-(fuzz_ink),(stripemin_ink),(tt_ink))-smoothstep((stripemax_ink)-(fuzz_ink),(stripemax_ink),(tt_ink)));
k3d/share/shaders/k3d_graphic_lines.sl:301:	float spacescale2=length(vtransform("shader",normalize(N_ink)));
k3d/share/shaders/k3d_graphic_lines.sl:314:	glinespec(vector N, V; float roughness)
k3d/share/shaders/k3d_graphic_lines.sl:321:			C += pow(N.H, 1/roughness);
k3d/share/shaders/k3d_graphic_lines.sl:326:	float cos_here;
k3d/share/shaders/k3d_graphic_lines.sl:329:	vector normI, half;
k3d/share/shaders/k3d_graphic_lines.sl:348:	/* antialias the transition */
k3d/share/shaders/k3d_graphic_lines.sl:349:	diff = smoothstep(paint_trans - paint_fuzz/2, paint_trans + paint_fuzz/2, diff);
k3d/share/shaders/k3d_graphic_lines.sl:352:	spec = glinespec(Nf, -normalize(I), roughness);
k3d/share/shaders/k3d_graphic_lines.sl:353:	spec = smoothstep(paint_spec - paint_fuzz/2, paint_spec + paint_fuzz/2, spec);
k3d/share/shaders/k3d_graphic_lines.sl:355:	layer_color = Cs*(Kd*diff*Ci_paint + Ka*ambient()) + Ci_highlight*Ks*spec;
k3d/share/shaders/k3d_graphic_lines.sl:363:	cos_here = normalize(Nf).normI;
k3d/share/shaders/k3d_graphic_lines.sl:366:	layer_opac = 1 - smoothstep(ink_thresh - ink_fuzz/2, ink_thresh + ink_fuzz/2, abs(cos_here));
k3d/share/shaders/k3d_graphic_lines.sl:368:	if (abs(cos_here) < ink_thresh)
k3d/share/shaders/k3d_grass_displace.sl:5: * creating a random look on the grass texture.

k3d/share/shaders/k3d_grass_displace.sl:7: * This is simply uses the noise function and a checkerboard

k3d/share/shaders/k3d_grass_displace.sl:8: * pattern.  The displacements are circular.

k3d/share/shaders/k3d_grass_displace.sl:10: *   by Lawrence D. Chin, cs184-bo

k3d/share/shaders/k3d_grass_displace.sl:13:#include "k3d_rmannotes.h"

k3d/share/shaders/k3d_grass_displace.sl:16:k3d_grass_displace ( float height = 1.0,

k3d/share/shaders/k3d_grass_displace.sl:44:	P += N * height;

k3d/share/shaders/k3d_grass_displace.sl:56:	P += N * height;

k3d/share/shaders/k3d_grass_surface.sl:4: *  by Lawrence D. Chin, cs184-bo

k3d/share/shaders/k3d_grass_surface.sl:7:#include "k3d_rmannotes.h"

k3d/share/shaders/k3d_grass_surface.sl:10:k3d_grass_surface ( float height = 1.0, Ka=0.5, Kd=0.1, Ks= 1, roughness = 0.25,

k3d/share/shaders/k3d_grass_surface.sl:36:      color layer_opac = 1 - smoothstep(radius - fuzz, radius, d);

k3d/share/shaders/k3d_grass_surface.sl:46:  Ci = Ci * (Ka *ambient() + Kd * diffuse(Nf) + Ks* specular(Nf,-I,roughness));

k3d/share/shaders/k3d_greenmarble.sl:2: * greenmarble.sl -- RenderMan compatible shader for green veined marble.
k3d/share/shaders/k3d_greenmarble.sl:8: *   Ka, Kd, Ks, roughness, specularcolor - work just like the plastic
k3d/share/shaders/k3d_greenmarble.sl:9: *   txtscale - overall scaling for the texture
k3d/share/shaders/k3d_greenmarble.sl:10: *   darkcolor, lightcolor - colors of the underlying substrate
k3d/share/shaders/k3d_greenmarble.sl:11: *   veincolor - color of the bright veins
k3d/share/shaders/k3d_greenmarble.sl:12: *   veinfreq - controls the frequency of the veining effects
k3d/share/shaders/k3d_greenmarble.sl:13: *   sharpness - how sharp the veins appear
k3d/share/shaders/k3d_greenmarble.sl:20:#include "k3d_noises.h"
k3d/share/shaders/k3d_greenmarble.sl:21:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_greenmarble.sl:22:#include "k3d_material.h"
k3d/share/shaders/k3d_greenmarble.sl:25:surface k3d_greenmarble(float Ka = 0.1, Kd = 0.6, Ks = 0.4, roughness = 0.1;
k3d/share/shaders/k3d_greenmarble.sl:28:			color lightcolor = color(0.06, 0.18, 0.02);
k3d/share/shaders/k3d_greenmarble.sl:31:			float sharpness = 25; float txtscale = 1;
k3d/share/shaders/k3d_greenmarble.sl:38:  point PP = txtscale * transform("shader", P);
k3d/share/shaders/k3d_greenmarble.sl:39:  float dPP = filterwidthp(PP);
k3d/share/shaders/k3d_greenmarble.sl:42:   * First calculate the underlying color of the substrate
k3d/share/shaders/k3d_greenmarble.sl:46:  Ct = mix(darkcolor, lightcolor, smoothstep(0.1, .35, turb));
k3d/share/shaders/k3d_greenmarble.sl:49:   * Now we layer on the veins
k3d/share/shaders/k3d_greenmarble.sl:52:  /* perturb the lookup */
k3d/share/shaders/k3d_greenmarble.sl:55:  /* Now calculate the veining function for the lookup area */
k3d/share/shaders/k3d_greenmarble.sl:62:      turb = pow(smoothstep(0.8, 1, 1 - turb), sharpness) / freq;
k3d/share/shaders/k3d_greenmarble.sl:67:    smoothstep(-0.1, 0.05, snoise(2 * (PP + vector(-4.4, 8.34, 27.1))));
k3d/share/shaders/k3d_greenmarble.sl:72:   * Shade like plastic
k3d/share/shaders/k3d_greenmarble.sl:75:  Ci = MaterialPlastic(Nf, Ct, Ka, Kd, Ks, roughness);
k3d/share/shaders/k3d_grids.sl:1:/** Grid shader copyright 2005 Daniel Scott Matthews dan@3-e.net **/
k3d/share/shaders/k3d_grids.sl:8:float roughness=0.0373; 
k3d/share/shaders/k3d_grids.sl:15:float G1L1_linewidth=0.579; 
k3d/share/shaders/k3d_grids.sl:23:float G1L2_linewidth=0.209; 
k3d/share/shaders/k3d_grids.sl:31:float G2L1_linewidth=0.281; 
k3d/share/shaders/k3d_grids.sl:39:float G2L2_linewidth=0.149; 
k3d/share/shaders/k3d_grids.sl:48:#define pulse(a,b,fuzz,x) (smoothstep((a)-(fuzz),(a),(x)) - smoothstep((b)-(fuzz),(b),(x)))
k3d/share/shaders/k3d_grids.sl:65:color G1L1_layer_opac = pulse(G1L1_linewidth, 1-G1L1_linewidth, G1L1_fuzz, G1L1_tt);
k3d/share/shaders/k3d_grids.sl:73:color G1L2_layer_opac = pulse(G1L2_linewidth, 1-G1L2_linewidth, G1L2_fuzz, G1L2_tt);
k3d/share/shaders/k3d_grids.sl:84:color G2L1_layer_opac = pulse(G2L1_linewidth, 1-G2L1_linewidth, G2L1_fuzz, G2L1_tt);
k3d/share/shaders/k3d_grids.sl:92:color G2L2_layer_opac = pulse(G2L2_linewidth, 1-G2L2_linewidth, G2L2_fuzz, G2L2_tt);
k3d/share/shaders/k3d_grids.sl:98:specularcolor * K_specular * phong(G1_Nf, G1_V, 1/roughness);
k3d/share/shaders/k3d_grids_disp.sl:7: float spacescale = length(vtransform("shader", dir));
k3d/share/shaders/k3d_grids_disp.sl:17:float linewidth0=0.368; 
k3d/share/shaders/k3d_grids_disp.sl:23:float linewidth1=0.122; )
k3d/share/shaders/k3d_grids_disp.sl:27:#define pulse(a,b,fuzz,x) (smoothstep((a)-(fuzz),(a),(x)) - smoothstep((b)-(fuzz),(b),(x)))
k3d/share/shaders/k3d_grids_disp.sl:37:color layer_opac0 = pulse(linewidth0, 1-linewidth0, fuzz0, tt0);
k3d/share/shaders/k3d_grids_disp.sl:40:#define pulse(a,b,fuzz,x) (smoothstep((a)-(fuzz),(a),(x)) - smoothstep((b)-(fuzz),(b),(x)))
k3d/share/shaders/k3d_grids_disp.sl:50:color layer_opac1 = pulse(linewidth1, 1-linewidth1, fuzz1, tt1);
k3d/share/shaders/k3d_hair.sl:3:surface k3d_hair(
k3d/share/shaders/k3d_hair.sl:7:	float roughness = .15;
k3d/share/shaders/k3d_hair.sl:13:	vector T = normalize (dPdv); /* tangent along length of hair */
k3d/share/shaders/k3d_hair.sl:14:	vector V = -normalize(I);    /* V is the view vector */
k3d/share/shaders/k3d_hair.sl:15:	color Cspec = 0, Cdiff = 0;  /* collect specular & diffuse light */
k3d/share/shaders/k3d_hair.sl:18:	/* Loop over lights, catch highlights as if this was a thin cylinder */
k3d/share/shaders/k3d_hair.sl:22:			Cspec += Cl * v * pow (cosang, 1/roughness);
k3d/share/shaders/k3d_hair.sl:25:			/* We multipled by v to make it darker at the roots.  This assumes v=0 at the root, v=1 at the tip.  */
k3d/share/shaders/k3d_hdr_light.sl:1:/*Environment Light to project an environment map onto 3D geometry - designed

k3d/share/shaders/k3d_hdr_light.sl:2:* to work with 32 bit floating point TIFF environment maps to give a higher

k3d/share/shaders/k3d_hdr_light.sl:5:*Created by Simon Bunker 27th September 2001

k3d/share/shaders/k3d_hdr_light.sl:6:*simon@rendermania.com http://www.rendermania.com/HDRI/

k3d/share/shaders/k3d_hdr_light.sl:8:*This shader is made freely available under the proviso that this copyright

k3d/share/shaders/k3d_hdr_light.sl:9:*notice remain intact and that I am acknowledged as the original author. Please

k3d/share/shaders/k3d_hdr_light.sl:10:*post links back to the above address*or get in contact if you have any queries

k3d/share/shaders/k3d_hdr_light.sl:11:*or bug reports related to this shader 

k3d/share/shaders/k3d_hdr_light.sl:16:color hdrenv(string envname;vector R;float blur)

k3d/share/shaders/k3d_hdr_light.sl:18:	color hdrtex;

k3d/share/shaders/k3d_hdr_light.sl:33:		hdrtex = texture(envname,ss,tt,"blur",blur);

k3d/share/shaders/k3d_hdr_light.sl:36:	return hdrtex;

k3d/share/shaders/k3d_hdr_light.sl:40:light k3d_hdr_light (

k3d/share/shaders/k3d_hdr_light.sl:44:	string envspace = "shader";

k3d/share/shaders/k3d_hdr_light.sl:48:	float shadowmapping = 0.0;

k3d/share/shaders/k3d_hdr_light.sl:49:	string shadowname = "";

k3d/share/shaders/k3d_hdr_light.sl:50:	float shadowsamples = 16.0;

k3d/share/shaders/k3d_hdr_light.sl:51:	float shadowblur = 0.0;

k3d/share/shaders/k3d_hdr_light.sl:52:	float shadowbias = 0.0;

k3d/share/shaders/k3d_hdr_light.sl:56:/* Code based off of Larry Gritz's Uberlight Shader */

k3d/share/shaders/k3d_hdr_light.sl:60:vector axis = normalize(vector "shader" (0,0,1));

k3d/share/shaders/k3d_hdr_light.sl:66:		/*Use light ray direction as map lookup NB L points from surface to lightsource*/

k3d/share/shaders/k3d_hdr_light.sl:69:		/*Else bright red colour warns if light is not picking up texture*/

k3d/share/shaders/k3d_hdr_light.sl:77:				Ct = hdrenv(envname,R,blur);

k3d/share/shaders/k3d_hdr_light.sl:93:		if (shadowmapping == 1){

k3d/share/shaders/k3d_hdr_light.sl:94:		        if (shadowname != "") {

k3d/share/shaders/k3d_hdr_light.sl:95:		            Cl *= 1 - shadow(shadowname, Ps, "samples", shadowsamples, "blur", shadowblur, "bias", shadowbias);

k3d/share/shaders/k3d_hdr_surface.sl:1:/*Environment Light to project an environment map onto 3D geometry - designed

k3d/share/shaders/k3d_hdr_surface.sl:2:* to work with 32 bit floating point TIFF environment maps to give a higher 

k3d/share/shaders/k3d_hdr_surface.sl:5:*Created by Simon Bunker 27th September 2001

k3d/share/shaders/k3d_hdr_surface.sl:6:*simon@rendermania.com http://www.rendermania.com/HDRI/

k3d/share/shaders/k3d_hdr_surface.sl:8:*This shader is made freely available under the proviso that this copyright

k3d/share/shaders/k3d_hdr_surface.sl:9:*notice remain intact and that I am acknowledged as the original author. Please

k3d/share/shaders/k3d_hdr_surface.sl:10:*post links back to the above address*or get in contact if you have any queries

k3d/share/shaders/k3d_hdr_surface.sl:11:*or bug reports related to this shader 

k3d/share/shaders/k3d_hdr_surface.sl:15:color hdrenv(string envname;vector R;float blur)

k3d/share/shaders/k3d_hdr_surface.sl:17:	color hdrtex;

k3d/share/shaders/k3d_hdr_surface.sl:32:		hdrtex = texture(envname,ss,tt,"blur",blur);

k3d/share/shaders/k3d_hdr_surface.sl:35:	return hdrtex;

k3d/share/shaders/k3d_hdr_surface.sl:39:surface k3d_hdr_surface (

k3d/share/shaders/k3d_hdr_surface.sl:43:	string envspace = "shader";

k3d/share/shaders/k3d_hdr_surface.sl:56:			Ct = hdrenv(envname,R,blur);

k3d/share/shaders/k3d_hdri1.sl:1:light k3d_hdri1 (string envname = "")
k3d/share/shaders/k3d_hdri2.sl:1:light 
k3d/share/shaders/k3d_hdri2.sl:2:k3d_hdri2 (float intensity = 1;
k3d/share/shaders/k3d_hdri2.sl:3:       color lightcolor = 1;
k3d/share/shaders/k3d_hdri2.sl:7:       string shadowname = "";
k3d/share/shaders/k3d_hdri2.sl:8:       float shadowblur = 0.001;
k3d/share/shaders/k3d_hdri2.sl:9:       float shadowbias = 0.01;
k3d/share/shaders/k3d_hdri2.sl:10:       float shadowsamples = 1;)
k3d/share/shaders/k3d_hdri2.sl:17:        if (shadowname != "")
k3d/share/shaders/k3d_hdri2.sl:18:            Cl *= 1 - color shadow (shadowname, Ps, "samples", shadowsamples,
k3d/share/shaders/k3d_hdri2.sl:19:				    "blur", shadowblur, "bias", shadowbias);
k3d/share/shaders/k3d_hexatile_bump.sl:2:* FGHexaTile_bump.sl -- "Simple shader to do "Hexagon" displacement"
k3d/share/shaders/k3d_hexatile_bump.sl:5:* A simple bump shader that tile a "Hexagon" pattern
k3d/share/shaders/k3d_hexatile_bump.sl:9:* 	string Name 	= "FGHexaTile_bump"	---	Name of the shader "do nothing".
k3d/share/shaders/k3d_hexatile_bump.sl:12:*	float ScaleSS	= 3 			---	Scale the "s" direction.
k3d/share/shaders/k3d_hexatile_bump.sl:13:*	float ScaleTT	= 3 			---	Scale the "t" direction.
k3d/share/shaders/k3d_hexatile_bump.sl:14:*	float Rotate	= 180 			---	Rotate the tile default "Z-direction"
k3d/share/shaders/k3d_hexatile_bump.sl:16:*	point P2	= point(0,0,1) 		---	The x,y,z direction for Rotate.
k3d/share/shaders/k3d_hexatile_bump.sl:17:*	string Projection = "planar" 		---	Projection "preoject.h"
k3d/share/shaders/k3d_hexatile_bump.sl:18:*	string Space	  = "shader" 		---	Space for projection.
k3d/share/shaders/k3d_hexatile_bump.sl:20:*	float C1	= 1 			---	Multiply of f1 the closes future point.
k3d/share/shaders/k3d_hexatile_bump.sl:21:*	float C2	= 2 			---	Multiply of f2 the second closes future point.
k3d/share/shaders/k3d_hexatile_bump.sl:28:* Author: Fredrik Gustafsson, gusten@SpamSucks_algonet.se
k3d/share/shaders/k3d_hexatile_bump.sl:31:* Larry Gritz "noises.h", "project.h", "patterns.h"
k3d/share/shaders/k3d_hexatile_bump.sl:38:#include "k3d_project.h"
k3d/share/shaders/k3d_hexatile_bump.sl:39:#include "k3d_patterns.h"
k3d/share/shaders/k3d_hexatile_bump.sl:42:Worley2D_f1f2 (float ss, tt; float jitter, seed, c1, c2, hexagon, scale_ss, scale_tt; 
k3d/share/shaders/k3d_hexatile_bump.sl:46:float sthiscell = floor(ss)+0.5, tthiscell = floor(tt)+0.5;
k3d/share/shaders/k3d_hexatile_bump.sl:52:		float stestcell = sthiscell + i;
k3d/share/shaders/k3d_hexatile_bump.sl:54:				float ttestcell = tthiscell + j;
k3d/share/shaders/k3d_hexatile_bump.sl:57:if ((hexagon != 0) && abs(mod(stestcell, 2)) < 1)
k3d/share/shaders/k3d_hexatile_bump.sl:78:displacement k3d_hexatile_bump (
k3d/share/shaders/k3d_hexatile_bump.sl:88:	string Space	  = "shader"; 
k3d/share/shaders/k3d_hexatile_bump.sl:111:/*** ----- SmoothPulse macro ----- ***/
k3d/share/shaders/k3d_hexatile_bump.sl:112:float smoothp_20 = smoothpulse (0,Edge1,Edge2,1,SQRT_f2);
k3d/share/shaders/k3d_hexatile_bump.sl:117:/*** ----- SmoothPulse macro ----- ***/
k3d/share/shaders/k3d_hexatile_bump.sl:118:float smoothp_22 = smoothpulse (0,Edge1,Edge2,1,SQRT_f1);
k3d/share/shaders/k3d_hexatile_bump.sl:125:	float spacescale = length(space);
k3d/share/shaders/k3d_hexatile_bump.sl:131:vector VShd = vtransform("shader", vector(normalize(N)));
k3d/share/shaders/k3d_hexatile_bump.sl:133:float disp = clamp(smoothp_20*smoothp_22,0,0.95);
k3d/share/shaders/k3d_hexatile_bump.sl:135:N = Displace(normalize(N),VShd,Km*disp,Truedisp); 
k3d/share/shaders/k3d_hextile.sl:2: * hextile.sl -- surface shader for hexagonal tiles in st space
k3d/share/shaders/k3d_hextile.sl:5: *       This surface shader operates in s-t space and gives a pattern of
k3d/share/shaders/k3d_hextile.sl:6: *    hexagonal tiles, similar to that found as floor patterns in public
k3d/share/shaders/k3d_hextile.sl:7: *    places and such.
k3d/share/shaders/k3d_hextile.sl:8: *       The basic pattern is a hexagonal tiling, with a little bit of
k3d/share/shaders/k3d_hextile.sl:9: *    color variation from tile to tile.  On top of that is some staining
k3d/share/shaders/k3d_hextile.sl:10: *    (presumably due to water or something), which darkens the tile or
k3d/share/shaders/k3d_hextile.sl:11: *    mortar underneath it.  Finally, there is scuffing due to people's
k3d/share/shaders/k3d_hextile.sl:12: *    shoes, which really only affects the tile part not the mortar part.
k3d/share/shaders/k3d_hextile.sl:16: *    Ka, Kd, Ks, roughness, specularcolor - work just like plastic
k3d/share/shaders/k3d_hextile.sl:17: *    tilecolor - the color of the tiles
k3d/share/shaders/k3d_hextile.sl:18: *    mortarcolor - the color of the mortar (space between the tiles)
k3d/share/shaders/k3d_hextile.sl:19: *    tileradius - the "radius" (in s-t units) of a single tile
k3d/share/shaders/k3d_hextile.sl:20: *    mortarwidth - the width of the mortar (in s-t units)
k3d/share/shaders/k3d_hextile.sl:21: *    tilevary - the color variance from tile to tile
k3d/share/shaders/k3d_hextile.sl:24: *    Some rudimentary antialiasing is performed on the borders between
k3d/share/shaders/k3d_hextile.sl:28: *    If all of the default parameters are used, the tiles look just like
k3d/share/shaders/k3d_hextile.sl:29: *    the floors in the public areas of the Washington DC subway system.
k3d/share/shaders/k3d_hextile.sl:45:k3d_hextile (float Ka = .5;
k3d/share/shaders/k3d_hextile.sl:48:         float roughness = .1;
k3d/share/shaders/k3d_hextile.sl:53:	 float mortarwidth = 0.02;
k3d/share/shaders/k3d_hextile.sl:63:  float tilewidth;
k3d/share/shaders/k3d_hextile.sl:68:  float swidth, twidth, sfuzz, tfuzz, fuzzmax;
k3d/share/shaders/k3d_hextile.sl:74:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_hextile.sl:75:  swidth = abs(Du(s)*du) + abs(Dv(s)*dv);
k3d/share/shaders/k3d_hextile.sl:76:  twidth = abs(Du(t)*du) + abs(Dv(t)*dv);
k3d/share/shaders/k3d_hextile.sl:77:  sfuzz = 0.5 * swidth;
k3d/share/shaders/k3d_hextile.sl:78:  tfuzz = 0.5 * twidth;
k3d/share/shaders/k3d_hextile.sl:81:  tilewidth = tileradius * 1.7320508;  /* sqrt(3) */
k3d/share/shaders/k3d_hextile.sl:85:       ss = s + tilewidth/2;
k3d/share/shaders/k3d_hextile.sl:87:  stile = floor (ss / tilewidth);
k3d/share/shaders/k3d_hextile.sl:88:  ss = mod (ss, tilewidth);
k3d/share/shaders/k3d_hextile.sl:90:  mw2 = mortarwidth/2;
k3d/share/shaders/k3d_hextile.sl:92:      mortar =  1 - (smoothstep(mw2,mw2+sfuzz,ss) *
k3d/share/shaders/k3d_hextile.sl:93:		     (1 - smoothstep(tilewidth-mw2-sfuzz,tilewidth-mw2,ss)));
k3d/share/shaders/k3d_hextile.sl:96:      x = tilewidth/2 - abs (ss - tilewidth/2);
k3d/share/shaders/k3d_hextile.sl:102:	  if (ss > tilewidth/2)
k3d/share/shaders/k3d_hextile.sl:105:      mortar = (smoothstep (x-1.73*mw2-tfuzz, x-1.73*mw2, y) *
k3d/share/shaders/k3d_hextile.sl:106:		(1 - smoothstep (x+1.73*mw2, x+1.73*mw2+tfuzz, y)));
k3d/share/shaders/k3d_hextile.sl:112:  stain = stains * smoothstep (.5,1, noise(s*stainfrequency,t*stainfrequency));
k3d/share/shaders/k3d_hextile.sl:114:  scuff = scuffing * smoothstep (.6,1, noise(t*scufffrequency-90.26,
k3d/share/shaders/k3d_hextile.sl:122:	      specularcolor * ks*specular(Nf,-normalize(I),roughness));
k3d/share/shaders/k3d_imagelayerclouds.sl:9:			     float threshold = 0.5;)
k3d/share/shaders/k3d_imagelayerclouds.sl:12:  color Ct;			/* Color of the surface */
k3d/share/shaders/k3d_imagelayerclouds.sl:13:  point PP;			/* Surface point in shader space */
k3d/share/shaders/k3d_imagelayerclouds.sl:16://  PP = txtscale * transform ("shader", P);
k3d/share/shaders/k3d_imagelayerclouds.sl:19:  /* Use fractional Brownian motion to compute a value for this point */
k3d/share/shaders/k3d_imagelayerclouds.sl:33:  Ct = mix(skycolor, cloudcolor, smoothstep(threshold, 1, value));
k3d/share/shaders/k3d_imagelayerclouds.sl:35:  /* Shade like matte, but use color Ct */
k3d/share/shaders/k3d_imagelayerclouds.sl:37:  Ci = Ct;			/* This makes the color disregard the lighting */
k3d/share/shaders/k3d_imagelayergradient.sl:1:surface k3d_imagelayergradient(color zenith = color(0, 0, 1);
k3d/share/shaders/k3d_imagelayergradient.sl:10:      Ci = Cs * mix(zenith, sky, v * 2.0);
k3d/share/shaders/k3d_incandplastic.sl:2: * Felipe Esquivel <felipe@siggraph.org.mx>

k3d/share/shaders/k3d_incandplastic.sl:4: * Este es un shader plastico con componente de

k3d/share/shaders/k3d_incandplastic.sl:7: * This is a normal plastic shader and includes an

k3d/share/shaders/k3d_incandplastic.sl:8: * incandescence value like the blinn shader.

k3d/share/shaders/k3d_incandplastic.sl:16:	      float Roughness = 0.05;

k3d/share/shaders/k3d_incandplastic.sl:26:			 SpecularColor * Ks * specular(Nf, NI, Roughness) +

k3d/share/shaders/k3d_indirect.sl:1:/* indirect.sl - retrieve radiosity data from the "ray server"
k3d/share/shaders/k3d_indirect.sl:3: * This shader is never called from BMRT -- the "indirect" light source
k3d/share/shaders/k3d_indirect.sl:4: * is built into the renderer.
k3d/share/shaders/k3d_indirect.sl:6: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_indirect.sl:7: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_indirect.sl:11:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_indirect.sl:14:light k3d_indirect(output float __nonspecular = 1;)
k3d/share/shaders/k3d_indirect.sl:17:  /* Just in case this is ever compiled for BMRT, make it do nothing. */
k3d/share/shaders/k3d_indirect.sl:20:#else /* PRMan - make a light that looks up from the ray server */
k3d/share/shaders/k3d_indirect.sl:22:  /* Exploit the fact that PRMan (incorrectly) leaves the surface normal
k3d/share/shaders/k3d_leather.sl:4: * I have done this shader from JMredapple.sl for RMR

k3d/share/shaders/k3d_leather.sl:6: * add some parameter, change many thing

k3d/share/shaders/k3d_leather.sl:8: *and offer you this shader, it was done (JMredapple.sl) by Jonathan Merritt

k3d/share/shaders/k3d_leather.sl:9: *without hes shader i wouldnt be able to do mine so send him flowers :)

k3d/share/shaders/k3d_leather.sl:11: *	re-autor istarion@3dvf.net    web site http://istarion.3dvf.net

k3d/share/shaders/k3d_leather.sl:18:k3d_leather (

k3d/share/shaders/k3d_leather.sl:21:	float Ka = 1;             /* Ambient light coeff.          */

k3d/share/shaders/k3d_leather.sl:23:	float roughness = .1;     /* Specular roughness param.     */          

k3d/share/shaders/k3d_leather.sl:43:	 * Shader variables

k3d/share/shaders/k3d_leather.sl:47:	float base_turb, blotch_turb, disp_turb;

k3d/share/shaders/k3d_leather.sl:48:	float small_noise, blotch, speck, disp = 0, blackness;

k3d/share/shaders/k3d_leather.sl:58:	PP = transform("shader", P);

k3d/share/shaders/k3d_leather.sl:63:	 * Pick the base color for the apple.

k3d/share/shaders/k3d_leather.sl:65:	 * The base color consists of patches of pure green,

k3d/share/shaders/k3d_leather.sl:66:	 * and patches of finely speckled red and green. These

k3d/share/shaders/k3d_leather.sl:67:	 * are set up so that the poles of the apple (as "t"

k3d/share/shaders/k3d_leather.sl:70:	 * The apple geometry is such that lines of constant

k3d/share/shaders/k3d_leather.sl:72:	 * The constants T1 - T4 specify locations of the

k3d/share/shaders/k3d_leather.sl:73:	 * start of 'greenness' toward the poles.

k3d/share/shaders/k3d_leather.sl:79:	#define BASE_GRC         0.4    /* shift factor for more red       */

k3d/share/shaders/k3d_leather.sl:82:	#define T3               0.8    /* T2->T3 => red can exist here    */

k3d/share/shaders/k3d_leather.sl:105:	 * Pick the blotch color.

k3d/share/shaders/k3d_leather.sl:107:	 * The blotch color is finally determined by mixing,

k3d/share/shaders/k3d_leather.sl:108:	 * using the blotching coefficient "blotch". This

k3d/share/shaders/k3d_leather.sl:109:	 * section sets that coefficient, using a funky yet

k3d/share/shaders/k3d_leather.sl:112:	/*#define BLOTCH_SF          20   s-factor for blotches  */

k3d/share/shaders/k3d_leather.sl:113:	/*#define BLOTCH_TF          15   t-factor for blotches  */

k3d/share/shaders/k3d_leather.sl:115:	#define BLOTCH_DELTA       0.1  /* 'nother scaling kludge */

k3d/share/shaders/k3d_leather.sl:116:	#define BLOTCH_SPECK_COEFF 0.3  /* blotch specking coeff  */

k3d/share/shaders/k3d_leather.sl:117:	blotch_turb = noise(BLOTCH_SF*sin(2*PI*(s+.1234)) + PI + label,

k3d/share/shaders/k3d_leather.sl:119:	blotch = pow(blotch_turb, 1.3) * BLOTCH_TCF * 

k3d/share/shaders/k3d_leather.sl:121:	blotch = blotch * (1+small_noise) +

k3d/share/shaders/k3d_leather.sl:123:	if (blotch > 1) blotch = 1;

k3d/share/shaders/k3d_leather.sl:127:	 * Set the brown specking.

k3d/share/shaders/k3d_leather.sl:129:	 * The apple has brown speckles on it, set by mixing

k3d/share/shaders/k3d_leather.sl:130:	 * using the speckling coefficient "speck". These

k3d/share/shaders/k3d_leather.sl:131:	 * specks are very dot-like in nature, and this

k3d/share/shaders/k3d_leather.sl:132:	 * dottiness technique is stolen from LG's starfield 

k3d/share/shaders/k3d_leather.sl:133:	 * shader.

k3d/share/shaders/k3d_leather.sl:137:	speck = pow(smoothstep(SPECK_CUTOFF, 1,

k3d/share/shaders/k3d_leather.sl:141:	 * Determine where the apple goes black at the poles.

k3d/share/shaders/k3d_leather.sl:142:	 * This simulates the spots where the stalk would be

k3d/share/shaders/k3d_leather.sl:143:	 * attached, and where the wierd bit at the very bottom

k3d/share/shaders/k3d_leather.sl:148:	blackness = 1-(smoothstep(BEDGE, BEDGE+BWIDTH, t)*

k3d/share/shaders/k3d_leather.sl:149:	               smoothstep(BEDGE, BEDGE+BWIDTH, 1-t));

k3d/share/shaders/k3d_leather.sl:153:	 * Combine what we have so far to set the surface

k3d/share/shaders/k3d_leather.sl:156:	cs = mix(base_color, dred, blotch);

k3d/share/shaders/k3d_leather.sl:162:	 * Set the shading surface normal.

k3d/share/shaders/k3d_leather.sl:164:	 * Here we set the surface normal to fix up the specular

k3d/share/shaders/k3d_leather.sl:165:	 * highlights. We'd like them perturbed by the small

k3d/share/shaders/k3d_leather.sl:166:	 * noise, affected a little by the brown specks, and

k3d/share/shaders/k3d_leather.sl:187:	 * Here, we raytrace for the slight mirrored reflections

k3d/share/shaders/k3d_leather.sl:188:	 * in the surface of an apple. They don't add much, but

k3d/share/shaders/k3d_leather.sl:189:	 * may be needed for the 'perfect' apple :-).

k3d/share/shaders/k3d_leather.sl:191:	 * Note: You'll need Larry Gritz's raytrace helper files

k3d/share/shaders/k3d_leather.sl:192:	 * for this bit!

k3d/share/shaders/k3d_leather.sl:207:	 * Combine everything to get Ci, in the standard form.

k3d/share/shaders/k3d_leather.sl:212:	                            Ks * specular(Nf, V, roughness)));

k3d/share/shaders/k3d_lensflare.sl:4: * Description: This shader, when placed on a piece of geometry 
k3d/share/shaders/k3d_lensflare.sl:5: *   immediately in front of the camera, simulates lens flare.
k3d/share/shaders/k3d_lensflare.sl:6: *   These effects happen in real cameras when the camera points toward
k3d/share/shaders/k3d_lensflare.sl:7: *   a bright light source, resulting in interreflections within the
k3d/share/shaders/k3d_lensflare.sl:8: *   optical elements of the lens system itself.  Real lens flare is
k3d/share/shaders/k3d_lensflare.sl:9: *   pretty plain looking and uninteresting; this shader takes some
k3d/share/shaders/k3d_lensflare.sl:14: *   bloomintensity - overall intensity of the "bloom" effect.  Setting
k3d/share/shaders/k3d_lensflare.sl:15: *          this to 0 removes the bloom effect altogether.
k3d/share/shaders/k3d_lensflare.sl:16: *   bloomradius, bloomfalloff - control the size & shape of the bloom
k3d/share/shaders/k3d_lensflare.sl:17: *   bloomstarry, bloomnpoints - control the "starry" appearance of the 
k3d/share/shaders/k3d_lensflare.sl:20: *   starburstradius, starburstnpoints, starburstfalloff - control the
k3d/share/shaders/k3d_lensflare.sl:21: *          size and shape of the starburst effect
k3d/share/shaders/k3d_lensflare.sl:23: *   rainbowradius, rainbowwidth - size of the rainbow
k3d/share/shaders/k3d_lensflare.sl:24: *   nspots - number of "spots" splayed out on the axis joining the
k3d/share/shaders/k3d_lensflare.sl:25: *          image center with the light position
k3d/share/shaders/k3d_lensflare.sl:26: *   disky, ringy, blotty, bloony - give the relative proportions of
k3d/share/shaders/k3d_lensflare.sl:27: *          the 4 different kinds of spots.
k3d/share/shaders/k3d_lensflare.sl:28: *   spotintensity - overall intensity scale for the spots
k3d/share/shaders/k3d_lensflare.sl:29: *   spotvarycolor - scale the color variation of the spots
k3d/share/shaders/k3d_lensflare.sl:30: *   seed - random number seed for many of the computations
k3d/share/shaders/k3d_lensflare.sl:32: * WARNING: lens flare is notorious as a sign of cheesy, cheap computer
k3d/share/shaders/k3d_lensflare.sl:33: *   graphics.  Use this effect with extreme care!  
k3d/share/shaders/k3d_lensflare.sl:37: * Author: Larry Gritz & Tony Apodaca, 1999
k3d/share/shaders/k3d_lensflare.sl:45:#include "k3d_patterns.h"
k3d/share/shaders/k3d_lensflare.sl:48:/* Helper function: compute the aspect ratio of the frame */
k3d/share/shaders/k3d_lensflare.sl:59:/* Helper function: compute the camera's diagonal field of view */
k3d/share/shaders/k3d_lensflare.sl:64:  uniform float halfangle = acos(normalize(corner).vector(0, 0, 1));
k3d/share/shaders/k3d_lensflare.sl:65:  return 2 * halfangle;
k3d/share/shaders/k3d_lensflare.sl:95:		      float rainbowradius = 0.5; float rainbowwidth = 0.2;
k3d/share/shaders/k3d_lensflare.sl:119:  float dPndc = filterwidthp(Pndc);
k3d/share/shaders/k3d_lensflare.sl:124:    atten = 1 - smoothstep(1, 2, abs(atten) / (lensfov / 2));
k3d/share/shaders/k3d_lensflare.sl:126:    float brightness =
k3d/share/shaders/k3d_lensflare.sl:132:    point Plight = (transform("NDC", P + L) - vector(.5, .5, 0)) * 2;
k3d/share/shaders/k3d_lensflare.sl:133:    Plight *= vector(aspect, 1, 0);
k3d/share/shaders/k3d_lensflare.sl:135:    vector Lvec = Plight - Pndc;
k3d/share/shaders/k3d_lensflare.sl:139:     * Handle the image of the lamp.  There are 3 effects:
k3d/share/shaders/k3d_lensflare.sl:140:     * the bloom, a small red ring flare, and the triple starburst.
k3d/share/shaders/k3d_lensflare.sl:142:    float dist = length(Lvec);
k3d/share/shaders/k3d_lensflare.sl:146:	float radius = sqrt(brightness) * 5 * mix(.2, bloomradius, urand());
k3d/share/shaders/k3d_lensflare.sl:149:	bloom = mix(1, bloom, smoothstep(0, 0.5, dist / radius));
k3d/share/shaders/k3d_lensflare.sl:150:	bloom = pow(1 - smoothstep(0.0, radius * bloom, dist), bloomfalloff);
k3d/share/shaders/k3d_lensflare.sl:151:	Cflare += bloom * (bloomintensity / intensity) / brightness;
k3d/share/shaders/k3d_lensflare.sl:158:	  sqrt(brightness) * 5 * mix(.2, starburstradius, urand());
k3d/share/shaders/k3d_lensflare.sl:162:	  pow(1 - smoothstep(0.0, radius * star, dist), starburstfalloff);
k3d/share/shaders/k3d_lensflare.sl:163:	Cflare += star * (starburstintensity / intensity) / brightness;
k3d/share/shaders/k3d_lensflare.sl:170:	  brightness * (rainbowintensity / intensity) *
k3d/share/shaders/k3d_lensflare.sl:171:	  rainbow((dist / rainbowradius - 1) / rainbowwidth,
k3d/share/shaders/k3d_lensflare.sl:172:		  (dPndc / rainbowradius) / rainbowwidth);
k3d/share/shaders/k3d_lensflare.sl:176:     * Now emit the random rings themselves
k3d/share/shaders/k3d_lensflare.sl:178:    vector axis = normalize(vector Plight);
k3d/share/shaders/k3d_lensflare.sl:187:			   pow(urand(), 2)) * distance(cntr, Plight);
k3d/share/shaders/k3d_lensflare.sl:190:	float bright = 1 - (2 * radius);
k3d/share/shaders/k3d_lensflare.sl:191:	bright *= bright;
k3d/share/shaders/k3d_lensflare.sl:210:	    int = 1 - smoothstep(0, radius, axisdist);
k3d/share/shaders/k3d_lensflare.sl:213:	  {			/* Spot with soft hole in middle */
k3d/share/shaders/k3d_lensflare.sl:214:	    int = smoothstep(0, radius, axisdist) - filterstep(radius,
k3d/share/shaders/k3d_lensflare.sl:220:	Cflare += spotintensity * bright * clr * Cs * int;
k3d/share/shaders/k3d_luna.sl:2: * luna.sl -- surface shader for the moon
k3d/share/shaders/k3d_luna.sl:5: *    Makes a surface that looks sort of like Earth's moon.  It doesn't really
k3d/share/shaders/k3d_luna.sl:6: *    have craters, so it isn't good for closeups.  But it's pretty good at about
k3d/share/shaders/k3d_luna.sl:7: *    the scale for human naked-eye viewing from earth.
k3d/share/shaders/k3d_luna.sl:11: *    Translation to Shading Language by Larry Gritz.
k3d/share/shaders/k3d_luna.sl:14: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_luna.sl:15: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_luna.sl:20: *    Apr 94 - translation to Shading Language by L. Gritz
k3d/share/shaders/k3d_luna.sl:22: * this file last updated 18 Apr 1994
k3d/share/shaders/k3d_luna.sl:37:		 color highland_color = .7;
k3d/share/shaders/k3d_luna.sl:40:		 float highland_threshold = -0.2;
k3d/share/shaders/k3d_luna.sl:41:		 float highland_altitude = 0.001, maria_altitude = 0.0004;
k3d/share/shaders/k3d_luna.sl:43:		 .02, outer_rad = .05; float peak_ht = 0.005, rim_ht = 0.003;
k3d/share/shaders/k3d_luna.sl:51:  float chaos;
k3d/share/shaders/k3d_luna.sl:55:  float uu, ht, freq, scale;
k3d/share/shaders/k3d_luna.sl:56:  float lighten;
k3d/share/shaders/k3d_luna.sl:62:  PP = transform("shader", P);
k3d/share/shaders/k3d_luna.sl:77:  chaos = a;
k3d/share/shaders/k3d_luna.sl:81:  /* Insure that the crater is in one of the maria */
k3d/share/shaders/k3d_luna.sl:84:    chaos -= arg23 * (1 - smoothstep(0, 1, temp1));
k3d/share/shaders/k3d_luna.sl:86:  if(chaos > highland_threshold)
k3d/share/shaders/k3d_luna.sl:88:      PQ += chaos * highland_altitude * NN;
k3d/share/shaders/k3d_luna.sl:89:      Ct += highland_color * chaos;
k3d/share/shaders/k3d_luna.sl:93:      PQ += chaos * maria_altitude * NN;
k3d/share/shaders/k3d_luna.sl:94:      Ct *= maria_basecolor + maria_color * chaos;
k3d/share/shaders/k3d_luna.sl:103:  lighten = 0;
k3d/share/shaders/k3d_luna.sl:107:/*      lighten = uu*uu; */
k3d/share/shaders/k3d_luna.sl:108:      ht = peak_ht * smoothstep(0, 1, uu);
k3d/share/shaders/k3d_luna.sl:112:      ht = 0;
k3d/share/shaders/k3d_luna.sl:117:      lighten = .75 * uu;
k3d/share/shaders/k3d_luna.sl:118:      ht = rim_ht * smoothstep(0, 1, uu);
k3d/share/shaders/k3d_luna.sl:123:      lighten = .75 * uu * uu;
k3d/share/shaders/k3d_luna.sl:124:      ht = rim_ht * smoothstep(0, 1, uu * uu);
k3d/share/shaders/k3d_luna.sl:127:    ht = 0;
k3d/share/shaders/k3d_luna.sl:128:  PQ += ht * NN;
k3d/share/shaders/k3d_luna.sl:129:  lighten *= 0.2;
k3d/share/shaders/k3d_luna.sl:130:  Ct += color(lighten, lighten, lighten);
k3d/share/shaders/k3d_luna.sl:140:	  ht = 0;
k3d/share/shaders/k3d_luna.sl:143:	      ht += scale * snoise(freq * vv);
k3d/share/shaders/k3d_luna.sl:147:/*	  ht = wrinkled (vv, 2, .833, 4); */
k3d/share/shaders/k3d_luna.sl:148:	  PQ += 0.0025 * uu * ht * NN;
k3d/share/shaders/k3d_luna.sl:155:	  ht = 0;
k3d/share/shaders/k3d_luna.sl:158:	      ht += scale * snoise(freq * vv);
k3d/share/shaders/k3d_luna.sl:162:/*	  ht = wrinkled (vv, 2, .833, 4); */
k3d/share/shaders/k3d_luna.sl:165:	  PQ += 0.0025 * (0.5 * uu + 0.5 * ht) * NN;
k3d/share/shaders/k3d_luna.sl:171:  lighten = 0;
k3d/share/shaders/k3d_luna.sl:174:      lighten = smoothstep(.15, .5, snoise(62 * u));
k3d/share/shaders/k3d_luna.sl:176:      lighten *= (1 - smoothstep(raydist - .2, raydist, pd));
k3d/share/shaders/k3d_luna.sl:178:  lighten = 0.2 * clamp(lighten, 0, 1);
k3d/share/shaders/k3d_luna.sl:179:  Ct += color(lighten, lighten, lighten);
k3d/share/shaders/k3d_luna.sl:182:  /* Recalc normal since we changed P a whole bunch. */
k3d/share/shaders/k3d_luna.sl:185:  /* Shade like matte */
k3d/share/shaders/k3d_lunette.sl:4: * lunette.sl -- A pretty surface shader ideal for "ground planes".
k3d/share/shaders/k3d_lunette.sl:7: *   A grid pattern overlaid upon an fBm noise.  This shader is good for
k3d/share/shaders/k3d_lunette.sl:8: *   surfaces placed beneath your scene which act as the ground.  The default
k3d/share/shaders/k3d_lunette.sl:9: *   colors are a bland pastel blue and yellow, which should complement many
k3d/share/shaders/k3d_lunette.sl:10: *   hero objects that you might wish to show off.  The shader is a copy of a
k3d/share/shaders/k3d_lunette.sl:11: *   pattern I saw in the background of another image entitled "Lunettes",
k3d/share/shaders/k3d_lunette.sl:12: *   which I believe has something to do with spectacles in French.  Hence the
k3d/share/shaders/k3d_lunette.sl:13: *   name, anyway.  The pattern is calculated in 2D u,v coordinates.
k3d/share/shaders/k3d_lunette.sl:16: *   Ka, Kd, Ks, roughness, specularcolor - work like the plastic shader
k3d/share/shaders/k3d_lunette.sl:17: *   urepeats, vrepeats - number of repeats of the grid pattern in u and v
k3d/share/shaders/k3d_lunette.sl:18: *   ulinewidth, vlinewidth - proportional width of the grid lines
k3d/share/shaders/k3d_lunette.sl:19: *   colorA, colorB - colors used in the background fBm noise
k3d/share/shaders/k3d_lunette.sl:20: *   baselinecolor - base color of the grid lines
k3d/share/shaders/k3d_lunette.sl:21: *   colorBenhance - amount to enhance colorB's presence over colorA
k3d/share/shaders/k3d_lunette.sl:22: *   gridDensity - effective opacity of the grid lines
k3d/share/shaders/k3d_lunette.sl:23: *   noiseScale - scale factor for the fBm noise relative to the grid size
k3d/share/shaders/k3d_lunette.sl:24: *   noiseRandom - randomization factor for the fBm noise
k3d/share/shaders/k3d_lunette.sl:25: *   maxOctaves, lunacrity, gain - work as in the fBm function
k3d/share/shaders/k3d_lunette.sl:28: *   The shader should antialias itself quite well, since it uses antialiased
k3d/share/shaders/k3d_lunette.sl:31: * Author: written by Jonathan Merritt (jmerritt@warpax.com), 5th October 2002
k3d/share/shaders/k3d_lunette.sl:33: * License: This shader is distributed under the GNU General Public License.
k3d/share/shaders/k3d_lunette.sl:37:#include "k3d_patterns.h"
k3d/share/shaders/k3d_lunette.sl:38:#include "k3d_noises.h"
k3d/share/shaders/k3d_lunette.sl:42: * Base color for the "lunette" pattern.  The pattern is calculated in a two-
k3d/share/shaders/k3d_lunette.sl:43: * dimensional fashion using the coordinates ss and tt as texture / pattern
k3d/share/shaders/k3d_lunette.sl:48: *   ssrepeats, ttrepeats - Number of repeats of the grid pattern in both ss
k3d/share/shaders/k3d_lunette.sl:49: *                           and tt directions.  Also scales the noise in both
k3d/share/shaders/k3d_lunette.sl:51: *   sslinewidth, ttlinewidth - Width of the grid lines in ss and tt
k3d/share/shaders/k3d_lunette.sl:52: *                              respectively; expressed as a fraction of the
k3d/share/shaders/k3d_lunette.sl:53: *                              cell over which the grid repeat occurs.
k3d/share/shaders/k3d_lunette.sl:54: *   colorA, colorB - Two colors for the background pattern.
k3d/share/shaders/k3d_lunette.sl:55: *   noiseScale - Scale of the background fBm noise (relative to the size of
k3d/share/shaders/k3d_lunette.sl:56: *                a grid cell).  Increasing this value makes a finer, smaller
k3d/share/shaders/k3d_lunette.sl:58: *   noiseRandom - Randomization value for the noise.
k3d/share/shaders/k3d_lunette.sl:59: *   maxOctaves - Maximum number of octaves for the fBm noise.
k3d/share/shaders/k3d_lunette.sl:60: *   lunacrity - Lunacrity of the fBm noise.
k3d/share/shaders/k3d_lunette.sl:61: *   gain - Gain of the fBm noise.
k3d/share/shaders/k3d_lunette.sl:62: *   colorBenhance - After the noise has been calculated, there exists the
k3d/share/shaders/k3d_lunette.sl:63: *                   possibility to increase the amount of colorB present in
k3d/share/shaders/k3d_lunette.sl:64: *                   the output.  A value of colorBenhance = 1 means that
k3d/share/shaders/k3d_lunette.sl:66: *                   Increasing this value puts more colorB in the output.
k3d/share/shaders/k3d_lunette.sl:67: *   gridDensity - Effective opacity of the grid pattern over the underlying
k3d/share/shaders/k3d_lunette.sl:69: *   baselinecolor - Base color of the grid lines.
k3d/share/shaders/k3d_lunette.sl:72:	float ss;		/* ss coordinate for the lunette pattern */
k3d/share/shaders/k3d_lunette.sl:73:	float tt;		/* tt coordinate for the lunette pattern */
k3d/share/shaders/k3d_lunette.sl:74:	float ssrepeats;	/* number of repeats in the ss direction */
k3d/share/shaders/k3d_lunette.sl:75:	float ttrepeats;	/* number of repeats in the tt direction */
k3d/share/shaders/k3d_lunette.sl:76:	float sslinewidth;	/* proportional width of lines in ss */
k3d/share/shaders/k3d_lunette.sl:77:	float ttlinewidth;	/* proportional width of lines in tt */
k3d/share/shaders/k3d_lunette.sl:78:	color colorA;		/* first color in the pattern */
k3d/share/shaders/k3d_lunette.sl:79:	color colorB;		/* second color in the pattern */
k3d/share/shaders/k3d_lunette.sl:80:	float noiseScale;	/* scale of the noise relative to the grid */
k3d/share/shaders/k3d_lunette.sl:81:	float noiseRandom;	/* randomization for the noise */
k3d/share/shaders/k3d_lunette.sl:82:	uniform float maxOctaves;	/* maximum number of octives for the noise */
k3d/share/shaders/k3d_lunette.sl:83:	uniform float lunacrity;	/* lunacrity of the noise */
k3d/share/shaders/k3d_lunette.sl:84:	uniform float gain;		/* gain for the noise */
k3d/share/shaders/k3d_lunette.sl:85:	float colorBenhance;	/* amount to enhance color B */
k3d/share/shaders/k3d_lunette.sl:86:	float gridDensity;	/* density of the grid pattern */
k3d/share/shaders/k3d_lunette.sl:87:	color baselinecolor;	/* base color for the lines */
k3d/share/shaders/k3d_lunette.sl:91:	 * Calculate pulsegrid, which is a variable indicating the value of
k3d/share/shaders/k3d_lunette.sl:92:	 * the grid.  pulsegrid = 0 means that there is no grid at the point
k3d/share/shaders/k3d_lunette.sl:93:	 * whereas pulsegrid = 1 means that there IS a grid at the point.
k3d/share/shaders/k3d_lunette.sl:94:	 * pulsegrid varies smoothly between the two values to cope with
k3d/share/shaders/k3d_lunette.sl:95:	 * antialising at the edges of the grid.
k3d/share/shaders/k3d_lunette.sl:98:		1/ssrepeats, sslinewidth, ss, filterwidth(ss)
k3d/share/shaders/k3d_lunette.sl:101:		1/ttrepeats, ttlinewidth, tt, filterwidth(tt)
k3d/share/shaders/k3d_lunette.sl:106:	 * Find the base color for the pattern.  The base color is a mix
k3d/share/shaders/k3d_lunette.sl:107:	 * between colorA and colorB, created using noise and other mixing
k3d/share/shaders/k3d_lunette.sl:112:	float noisefilterwidth = filterwidthp(noisePt);
k3d/share/shaders/k3d_lunette.sl:114:		noisePt, noisefilterwidth, maxOctaves, lunacrity, gain
k3d/share/shaders/k3d_lunette.sl:116:	noiseamt = pow(noiseamt, colorBenhance);
k3d/share/shaders/k3d_lunette.sl:120:	 * find the base line color for the grid pattern
k3d/share/shaders/k3d_lunette.sl:125:	 * return the mix between the base grid and the colorful noise
k3d/share/shaders/k3d_lunette.sl:136:	float roughness = .1;
k3d/share/shaders/k3d_lunette.sl:140:	float ulinewidth = 0.125;	/* Relative width of grid lines in u */
k3d/share/shaders/k3d_lunette.sl:142:	float vlinewidth = 0.12;	/* Relative width of grid lines in v */
k3d/share/shaders/k3d_lunette.sl:147:	float colorBenhance = 1.6;	/* Enhancement of colorB in output */
k3d/share/shaders/k3d_lunette.sl:148:	float gridDensity = .5;		/* Effective opacity of the grid */
k3d/share/shaders/k3d_lunette.sl:157:	 * fetch the lunette color
k3d/share/shaders/k3d_lunette.sl:160:		u, v, urepeats, vrepeats, ulinewidth, vlinewidth,
k3d/share/shaders/k3d_lunette.sl:162:		lunacrity, gain, colorBenhance, gridDensity, baselinecolor
k3d/share/shaders/k3d_lunette.sl:172:		specularcolor * Ks*specular(Nf,-normalize(I),roughness));
k3d/share/shaders/k3d_map_pattern_1.sl:3:float channel1=4; 
k3d/share/shaders/k3d_map_pattern_1.sl:4:float swidth1=1; 
k3d/share/shaders/k3d_map_pattern_1.sl:5:float twidth1=1; 
k3d/share/shaders/k3d_map_pattern_1.sl:10:color lightwood=color(0.69,0.44,0.25); 
k3d/share/shaders/k3d_map_pattern_1.sl:16:float roughness = .1;
k3d/share/shaders/k3d_map_pattern_1.sl:34:if (channel1 < 0 || channel1 > 3)
k3d/share/shaders/k3d_map_pattern_1.sl:36:temt_c1=texture(map1,temp_ss1,temp_tt1,"swidth",swidth1,"twidth",twidth1,"samples",samples1);
k3d/share/shaders/k3d_map_pattern_1.sl:40:temt_c1=texture(map1[channel1],temp_ss1,temp_tt1,"swidth",swidth1,"twidth",twidth1,"samples",samples1);
k3d/share/shaders/k3d_map_pattern_1.sl:51:PP = txtscale * transform ("shader", P);
k3d/share/shaders/k3d_map_pattern_1.sl:60:r = 0.2 + 0.8 * smoothstep(0.2, 0.55, r) * (1 - smoothstep(0.75, 0.8, r));
k3d/share/shaders/k3d_map_pattern_1.sl:65:Ct = mix (lightwood, darkwood, r*r2*r2);
k3d/share/shaders/k3d_map_pattern_1.sl:69:C_temp1 = Os * (Cs * (Ka * ambient() + Kd * diffuse(Nf)) + specularcolor * Ks * specular(Nf, -normalize(I), roughness));
k3d/share/shaders/k3d_matte.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_matte.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_matte.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_metal.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_metal.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_metal.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_metal.sl:11:		  float roughness = .1;)
k3d/share/shaders/k3d_metal.sl:16:  Ci = Os * Cs * (Ka * ambient() + Ks * specular(Nf, V, roughness));
k3d/share/shaders/k3d_mondometal.sl:2: * felipe@siggraph.org.mx

k3d/share/shaders/k3d_mondometal.sl:4: * Layered shader with mondo as a base and a metal modulated with a matte file.

k3d/share/shaders/k3d_mondometal.sl:6: * Version ampliada de Mondo.sl. Recibe un archivo B/N como mate, donde

k3d/share/shaders/k3d_mondometal.sl:15:    float abUseColorMapAlpha = 0;

k3d/share/shaders/k3d_mondometal.sl:25:    float abRoughness = .3;

k3d/share/shaders/k3d_mondometal.sl:26:    string abRoughnessMap = "";

k3d/share/shaders/k3d_mondometal.sl:27:    float abRoughnessMapBlur = 1;

k3d/share/shaders/k3d_mondometal.sl:46:    float roughness = 0.25;

k3d/share/shaders/k3d_mondometal.sl:49:    point STMatrix0 = point "shader" (1,0,0);

k3d/share/shaders/k3d_mondometal.sl:50:    point STMatrix1 = point "shader" (0,1,0);

k3d/share/shaders/k3d_mondometal.sl:64:    float ss, tt, roughness, diff, spec, bmp;

k3d/share/shaders/k3d_mondometal.sl:67:    ss = vector(s, t, 1) . vector(transform("shader", STMatrix0));

k3d/share/shaders/k3d_mondometal.sl:68:    tt = vector(s, t, 1) . vector(transform("shader", STMatrix1));

k3d/share/shaders/k3d_mondometal.sl:74:                            "swidth", abColorMapBlur,

k3d/share/shaders/k3d_mondometal.sl:75:                            "twidth", abColorMapBlur );

k3d/share/shaders/k3d_mondometal.sl:76:        if(abUseColorMapAlpha != 0)

k3d/share/shaders/k3d_mondometal.sl:79:                            "swidth", abColorMapBlur,

k3d/share/shaders/k3d_mondometal.sl:80:                            "twidth", abColorMapBlur );

k3d/share/shaders/k3d_mondometal.sl:81:            /* need to un-premultiply the color in this case */

k3d/share/shaders/k3d_mondometal.sl:99:                            "swidth", abDiffuseMapBlur,

k3d/share/shaders/k3d_mondometal.sl:100:                            "twidth", abDiffuseMapBlur );

k3d/share/shaders/k3d_mondometal.sl:111:                            "swidth", abSpecularMapBlur,

k3d/share/shaders/k3d_mondometal.sl:112:                            "twidth", abSpecularMapBlur );

k3d/share/shaders/k3d_mondometal.sl:124:                      "swidth", abSpecularColorMapBlur, 

k3d/share/shaders/k3d_mondometal.sl:125:                      "twidth", abSpecularColorMapBlur );

k3d/share/shaders/k3d_mondometal.sl:131:    /* determine roughness */

k3d/share/shaders/k3d_mondometal.sl:132:    if(abRoughnessMap != "")

k3d/share/shaders/k3d_mondometal.sl:134:        roughness = abRoughness * float texture(abRoughnessMap, ss, tt,

k3d/share/shaders/k3d_mondometal.sl:135:                            "swidth", abRoughnessMapBlur, 

k3d/share/shaders/k3d_mondometal.sl:136:                            "twidth", abRoughnessMapBlur );

k3d/share/shaders/k3d_mondometal.sl:140:        roughness = abRoughness;

k3d/share/shaders/k3d_mondometal.sl:149:                            "swidth", abTransparencyMapBlur, 

k3d/share/shaders/k3d_mondometal.sl:150:                            "twidth", abTransparencyMapBlur );

k3d/share/shaders/k3d_mondometal.sl:155:                            "swidth", abTransparencyMapBlur, 

k3d/share/shaders/k3d_mondometal.sl:156:                            "twidth", abTransparencyMapBlur ));

k3d/share/shaders/k3d_mondometal.sl:164:                            "swidth", abIncandescenseMapBlur, 

k3d/share/shaders/k3d_mondometal.sl:165:                            "twidth", abIncandescenseMapBlur );

k3d/share/shaders/k3d_mondometal.sl:173:    /* do the bump */

k3d/share/shaders/k3d_mondometal.sl:177:                            "swidth", abBumpMapBlur,

k3d/share/shaders/k3d_mondometal.sl:178:                            "twidth", abBumpMapBlur );

k3d/share/shaders/k3d_mondometal.sl:179:        PP = transform("shader", P);

k3d/share/shaders/k3d_mondometal.sl:180:        Nf = normalize( ntransform("shader", N) );

k3d/share/shaders/k3d_mondometal.sl:182:        PP = transform("shader", "current", PP);

k3d/share/shaders/k3d_mondometal.sl:191:            P = PP; /* usually it's better to do displacments in displacement shader */

k3d/share/shaders/k3d_mondometal.sl:198:    /* compute shading variables **/

k3d/share/shaders/k3d_mondometal.sl:213:                                    "swidth", abReflectionMapBlur,

k3d/share/shaders/k3d_mondometal.sl:214:                                    "twidth", abReflectionMapBlur );

k3d/share/shaders/k3d_mondometal.sl:223:                            "swidth", abColorMapBlur,

k3d/share/shaders/k3d_mondometal.sl:224:                            "twidth", abColorMapBlur);

k3d/share/shaders/k3d_mondometal.sl:229:    /* now add it all together */

k3d/share/shaders/k3d_mondometal.sl:235:           (spec * Cspec * (specular(Nf, V, roughness) + Crefl) ));

k3d/share/shaders/k3d_mondometal.sl:240:            Ks * specular(Nf,-normalize(I),roughness));

k3d/share/shaders/k3d_mysky.sl:1:/* I took wave's lead and renamed starfield to KMPuffyclouds.sl -- tal@cs.caltech.edu */

k3d/share/shaders/k3d_mysky.sl:6: * puffyclouds.sl -- RenderMan compatible surface shader for puffy

k3d/share/shaders/k3d_mysky.sl:10: *    Makes nice looking cumulous clouds like you would see in the sky

k3d/share/shaders/k3d_mysky.sl:11: *    on a bright sunny day.  Works as a basic thresholded fBm.  Since

k3d/share/shaders/k3d_mysky.sl:12: *    this texture is generally used as a backdrop, it does not take

k3d/share/shaders/k3d_mysky.sl:13: *    lighting into account.  If you wanted a lit surface that looked like

k3d/share/shaders/k3d_mysky.sl:14: *    puffy clouds (like painted clouds on a wall), then it would be pretty

k3d/share/shaders/k3d_mysky.sl:15: *    easy to add the lighting.

k3d/share/shaders/k3d_mysky.sl:19: *    skycolor, cloudcolor - the obvious meanings

k3d/share/shaders/k3d_mysky.sl:20: *    octaves, omega, lambda - control the fractal appearance of the clouds

k3d/share/shaders/k3d_mysky.sl:21: *    threshold - fBm sum below this level is just blue sky

k3d/share/shaders/k3d_mysky.sl:24: *    None, but should be easy to add antialiasing simply by adaptively

k3d/share/shaders/k3d_mysky.sl:25: *    setting the "octaves" parameter based on distance from eye point.

k3d/share/shaders/k3d_mysky.sl:29: *    Translation to RenderMan Shading Language by Larry Gritz.

k3d/share/shaders/k3d_mysky.sl:32: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,

k3d/share/shaders/k3d_mysky.sl:33: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.

k3d/share/shaders/k3d_mysky.sl:38: *    Apr 94 - translation to Shading Language by L. Gritz

k3d/share/shaders/k3d_mysky.sl:40: * this file last updated 18 Apr 1994

k3d/share/shaders/k3d_mysky.sl:56:	     float threshold = 0;

k3d/share/shaders/k3d_mysky.sl:60:  color Ct;      /* Color of the surface */

k3d/share/shaders/k3d_mysky.sl:61:  point PP;      /* Surface point in shader space */

k3d/share/shaders/k3d_mysky.sl:64:  PP = txtscale * transform ("shader", P);

k3d/share/shaders/k3d_mysky.sl:66:  /* Use fractional Brownian motion to compute a value for this point */

k3d/share/shaders/k3d_mysky.sl:76:  Ct = mix (skycolor, cloudcolor, smoothstep (threshold, 1, value));

k3d/share/shaders/k3d_mysky.sl:78:  /* Shade like matte, but use color Ct */

k3d/share/shaders/k3d_noisysmoke.sl:4:/* Here is where we define the GADD. */
k3d/share/shaders/k3d_noisysmoke.sl:6:         if (use_lighting > 0) {                                            \
k3d/share/shaders/k3d_noisysmoke.sl:21:             g = density * smoothstep(-1,1,smokevary*smoke);                \
k3d/share/shaders/k3d_noisysmoke.sl:33:		      float use_lighting = 1; float use_noise = 1;
k3d/share/shaders/k3d_noisysmoke.sl:36:		      float lightscale = 15;
k3d/share/shaders/k3d_noisysmoke.sl:40:  /* PRMan and BMRT used to have I reverse of each other, conflict in spec */
k3d/share/shaders/k3d_noisysmoke.sl:42:  vector incident = vtransform("shader", -I);
k3d/share/shaders/k3d_noisysmoke.sl:44:  /* But with BMRT 2.3.6 and later, they're the same... */
k3d/share/shaders/k3d_noisysmoke.sl:46:  vector incident = vtransform("shader", I);
k3d/share/shaders/k3d_noisysmoke.sl:48:  point origin = transform("shader", Worigin);
k3d/share/shaders/k3d_noisysmoke.sl:55:  color li, last_li, lighttau;
k3d/share/shaders/k3d_noisysmoke.sl:61:  end = min(length(incident), integend) - 0.0001;
k3d/share/shaders/k3d_noisysmoke.sl:63:  /* Integrate forwards from the start point */
k3d/share/shaders/k3d_noisysmoke.sl:68:      WIN = vtransform("shader", "current", IN);
k3d/share/shaders/k3d_noisysmoke.sl:75:      while(d <= end)
k3d/share/shaders/k3d_noisysmoke.sl:82:	    /* Our goal now is to find dC and dO, the color and opacity
k3d/share/shaders/k3d_noisysmoke.sl:83:	     * of the portion of the volume covered by this step.
k3d/share/shaders/k3d_noisysmoke.sl:86:	  lighttau = .5 * ss * (li * dtau + last_li * last_dtau);
k3d/share/shaders/k3d_noisysmoke.sl:92:	  dC = lighttau * dO;
k3d/share/shaders/k3d_noisysmoke.sl:104:  /* Ci & Oi are the color (premultiplied by opacity) and opacity of 
k3d/share/shaders/k3d_noisysmoke.sl:105:   * the background element.
k3d/share/shaders/k3d_noisysmoke.sl:106:   * Now Cv is the light contributed by the volume itself, and Ov is the
k3d/share/shaders/k3d_noisysmoke.sl:107:   * opacity of the volume, i.e. (1-Ov)*Ci is the light from the background
k3d/share/shaders/k3d_noisysmoke.sl:108:   * which makes it through the volume.
k3d/share/shaders/k3d_noisysmoke.sl:110:  Ci = lightscale * Cv + (1 - Ov) * Ci;
k3d/share/shaders/k3d_null.sl:2: * Null shader - does nothing to a surface
k3d/share/shaders/k3d_null.sl:4: * Note: we include dummy Ka and Kd arguments to appease the radiosity
k3d/share/shaders/k3d_oak.sl:4: * Description: makes procedural solid texture that looks very much like
k3d/share/shaders/k3d_oak.sl:5: *    wood grain.  The rings surround the z axis, so to position the
k3d/share/shaders/k3d_oak.sl:6: *    pattern, one should translate the shadingspace (which defaults to
k3d/share/shaders/k3d_oak.sl:7: *    "shader").  This makes a fairly plain, unfinished wood, that looks
k3d/share/shaders/k3d_oak.sl:8: *    very much like oak.
k3d/share/shaders/k3d_oak.sl:10: * Parameters for the coordinate mapping: 
k3d/share/shaders/k3d_oak.sl:11: *   shadingspace - space in which the pattern is laid out
k3d/share/shaders/k3d_oak.sl:12: *   shadingfreq - overall scaling factor for the pattern
k3d/share/shaders/k3d_oak.sl:13: *   Pref - if supplied, gives the reference pose
k3d/share/shaders/k3d_oak.sl:15: * Parameters for the color and pattern: 
k3d/share/shaders/k3d_oak.sl:16: *   Clightwood - the light, "background" wood color
k3d/share/shaders/k3d_oak.sl:17: *   Cdarkwood - the darker color in the ring/grain
k3d/share/shaders/k3d_oak.sl:20: *   grainfreq - frequency of the fine grain
k3d/share/shaders/k3d_oak.sl:21: *   ringnoise, ringnoisefreq - general warping of the domain
k3d/share/shaders/k3d_oak.sl:22: *   trunkwobble, trunkwobblefreq - controls noise which wobbles the
k3d/share/shaders/k3d_oak.sl:23: *       axis of the trunk so that it's not perfectly on the z axis.
k3d/share/shaders/k3d_oak.sl:25: *       the z axis.
k3d/share/shaders/k3d_oak.sl:26: *   ringy, grainy - overall scale on the degree to which rings and
k3d/share/shaders/k3d_oak.sl:27: *       grain are weighted.  0 turns one off, 1 makes full effect.
k3d/share/shaders/k3d_oak.sl:28: *   divotdepth - depth (in shader units) of the displacement due to
k3d/share/shaders/k3d_oak.sl:33: *   Ka, Kd, Ks, roughness - the usual meaning
k3d/share/shaders/k3d_oak.sl:37: * Author: Larry Gritz, 1999
k3d/share/shaders/k3d_oak.sl:45:#include "k3d_project.h"
k3d/share/shaders/k3d_oak.sl:46:#include "k3d_pshad.h"
k3d/share/shaders/k3d_oak.sl:47:#include "k3d_material.h"
k3d/share/shaders/k3d_oak.sl:48:#include "k3d_displace.h"
k3d/share/shaders/k3d_oak.sl:50:#include "k3d_oak.h"
k3d/share/shaders/k3d_oak.sl:54:surface k3d_oak(float Ka = 1, Kd = 1, Ks = .25, roughness = 0.2;
k3d/share/shaders/k3d_oak.sl:61:		float divotdepth = 0.05;
k3d/share/shaders/k3d_oak.sl:62:		color Clightwood = color(.5, .2, .067);	/* light wood color */
k3d/share/shaders/k3d_oak.sl:73:    oaktexture(Pshad, dPshad, ringfreq, ringunevenness, grainfreq, ringnoise,
k3d/share/shaders/k3d_oak.sl:76:  color Cwood = mix(Clightwood, Cdarkwood, wood);
k3d/share/shaders/k3d_oak.sl:77:  Nf = faceforward(Displace(Nf, "shader", -wood * divotdepth, truedisp), I);
k3d/share/shaders/k3d_oak.sl:80:  Ci = MaterialPlastic(Nf, Cwood, Ka, Kd, Ks * (1 - 0.5 * wood), roughness);
k3d/share/shaders/k3d_oakplank.sl:4: * Description: makes procedural varnished wood planks.  The planks
k3d/share/shaders/k3d_oakplank.sl:5: *    are projected onto the x-y plane, with the length aligned with
k3d/share/shaders/k3d_oakplank.sl:6: *    the y axis.  The subpattern within each individual plank is just
k3d/share/shaders/k3d_oakplank.sl:7: *    a shifted version of the oaktexture function from oak.h.
k3d/share/shaders/k3d_oakplank.sl:9: * Parameters for the coordinate mapping: 
k3d/share/shaders/k3d_oakplank.sl:10: *   shadingspace - space in which the pattern is laid out
k3d/share/shaders/k3d_oakplank.sl:11: *   shadingfreq - overall scaling factor for the pattern
k3d/share/shaders/k3d_oakplank.sl:12: *   Pref - if supplied, gives the reference pose
k3d/share/shaders/k3d_oakplank.sl:14: * Parameters for the pattern of the plank structure: 
k3d/share/shaders/k3d_oakplank.sl:15: *   plankwidth, planklength - size of the planks
k3d/share/shaders/k3d_oakplank.sl:16: *   groovewidth, grooveheight - width of the grooves between planks
k3d/share/shaders/k3d_oakplank.sl:17: *   Cgroove - color of the grooves between the planks
k3d/share/shaders/k3d_oakplank.sl:18: *   groovedepth - how far down do the grooves displace?
k3d/share/shaders/k3d_oakplank.sl:19: *   edgewidth - how close to the plank border does the wood start to curl?
k3d/share/shaders/k3d_oakplank.sl:20: *   varyhue, varysat, varylum - control plank-to-plank color variation
k3d/share/shaders/k3d_oakplank.sl:22: * Parameters for the color and pattern of the wood grain: 
k3d/share/shaders/k3d_oakplank.sl:23: *   Clightwood - the light, "background" wood color
k3d/share/shaders/k3d_oakplank.sl:24: *   Cdarkwood - the darker color in the ring/grain
k3d/share/shaders/k3d_oakplank.sl:27: *   grainfreq - frequency of the fine grain
k3d/share/shaders/k3d_oakplank.sl:28: *   ringnoise, ringnoisefreq - general warping of the domain
k3d/share/shaders/k3d_oakplank.sl:29: *   trunkwobble, trunkwobblefreq - controls noise which wobbles the
k3d/share/shaders/k3d_oakplank.sl:30: *       axis of the trunk so that it's not perfectly on the z axis.
k3d/share/shaders/k3d_oakplank.sl:32: *       the z axis.
k3d/share/shaders/k3d_oakplank.sl:33: *   ringy, grainy - overall scale on the degree to which rings and
k3d/share/shaders/k3d_oakplank.sl:34: *       grain are weighted.  0 turns one off, 1 makes full effect.
k3d/share/shaders/k3d_oakplank.sl:35: *   divotdepth - depth (in shader units) of the displacement due to
k3d/share/shaders/k3d_oakplank.sl:40: *   Ka, Kd, Ks, roughness - the usual meaning
k3d/share/shaders/k3d_oakplank.sl:41: *   Kr, blur, eta - reflection parameters for the tile
k3d/share/shaders/k3d_oakplank.sl:44: *   varnishlump, arnishlumpfreq - amp & freq of lumpiness in the varnish
k3d/share/shaders/k3d_oakplank.sl:48: * Author: Larry Gritz, 1999
k3d/share/shaders/k3d_oakplank.sl:56:/* Comment out the following line if you do *not* wish to use BMRT and
k3d/share/shaders/k3d_oakplank.sl:57: * PRMan together.
k3d/share/shaders/k3d_oakplank.sl:59:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_oakplank.sl:61:#include "k3d_project.h"
k3d/share/shaders/k3d_oakplank.sl:62:#include "k3d_pshad.h"
k3d/share/shaders/k3d_oakplank.sl:63:#include "k3d_material.h"
k3d/share/shaders/k3d_oakplank.sl:64:#include "k3d_noises.h"
k3d/share/shaders/k3d_oakplank.sl:65:#include "k3d_displace.h"
k3d/share/shaders/k3d_oakplank.sl:66:#include "k3d_patterns.h"
k3d/share/shaders/k3d_oakplank.sl:68:#include "k3d_oak.h"
k3d/share/shaders/k3d_oakplank.sl:71:/* Given 2-D texture coordinates ss,tt, filter widths ds, dt, and the
k3d/share/shaders/k3d_oakplank.sl:72: * width and height of the grooves between tiles, figure out which
k3d/share/shaders/k3d_oakplank.sl:73: * (integer indexed) plank we are on and what coordinates within our
k3d/share/shaders/k3d_oakplank.sl:74: * individual plank we are shading.
k3d/share/shaders/k3d_oakplank.sl:77:		   float plankwidth, planklength;
k3d/share/shaders/k3d_oakplank.sl:78:		   float groovewidth, grooveheight;
k3d/share/shaders/k3d_oakplank.sl:79:		   output float swhichplank, twhichplank;
k3d/share/shaders/k3d_oakplank.sl:82:  /* Find which s plank we're on and our s coordinate within it */
k3d/share/shaders/k3d_oakplank.sl:83:  swhichplank = floor(ss / plankwidth);
k3d/share/shaders/k3d_oakplank.sl:84:  splank = ss - swhichplank * plankwidth;
k3d/share/shaders/k3d_oakplank.sl:85:  /* Shift in t a random amount for each plank column */
k3d/share/shaders/k3d_oakplank.sl:86:  float newt = tt + planklength * cellnoise(swhichplank);
k3d/share/shaders/k3d_oakplank.sl:87:  /* Find which t plank we're on and our t coordinate within it */
k3d/share/shaders/k3d_oakplank.sl:88:  twhichplank = floor(newt / planklength);
k3d/share/shaders/k3d_oakplank.sl:89:  tplank = newt - twhichplank * planklength;
k3d/share/shaders/k3d_oakplank.sl:93:  return filteredpulsetrain(groovewidth, plankwidth, ss + groovewidth / 2,
k3d/share/shaders/k3d_oakplank.sl:94:			    ds) * filteredpulsetrain(grooveheight,
k3d/share/shaders/k3d_oakplank.sl:95:						     planklength,
k3d/share/shaders/k3d_oakplank.sl:96:						     newt + grooveheight / 2,
k3d/share/shaders/k3d_oakplank.sl:102:surface k3d_oakplank(float Ka = 1, Kd = 1, Ks = .75, roughness = 0.1;
k3d/share/shaders/k3d_oakplank.sl:111:		     float divotdepth = 0.012, truedisp = 0;
k3d/share/shaders/k3d_oakplank.sl:112:		     color Clightwood = color(.5, .2, .067);	/* light wood color */
k3d/share/shaders/k3d_oakplank.sl:116:		     float plankwidth = 2, planklength = 30;
k3d/share/shaders/k3d_oakplank.sl:117:		     float groovewidth = 0.05, grooveheight = 0.05;
k3d/share/shaders/k3d_oakplank.sl:118:		     float varyhue = 0.015, varysat = 0.1, varylum = 0.5;
k3d/share/shaders/k3d_oakplank.sl:119:		     float groovedepth = 0.03, edgewidth = 0.1;
k3d/share/shaders/k3d_oakplank.sl:120:		     float varnishlump = 0.01, varnishlumpfreq = 0.5;
k3d/share/shaders/k3d_oakplank.sl:124:  float ss = xcomp(Pshad), tt = ycomp(Pshad), height = zcomp(Pshad);
k3d/share/shaders/k3d_oakplank.sl:125:  float dss = filterwidth(ss), dtt = filterwidth(tt);
k3d/share/shaders/k3d_oakplank.sl:128:   * Find out where in the pattern we are: which plank we're on, and
k3d/share/shaders/k3d_oakplank.sl:129:   * the (splank,tplank) coordinates (both on [0,1]) within our tile.
k3d/share/shaders/k3d_oakplank.sl:131:  float swhichplank, twhichplank, splank, tplank;
k3d/share/shaders/k3d_oakplank.sl:132:  float inplank = plankpattern(ss, tt, dss, dtt, plankwidth, planklength,
k3d/share/shaders/k3d_oakplank.sl:133:			       groovewidth, grooveheight,
k3d/share/shaders/k3d_oakplank.sl:134:			       swhichplank, twhichplank, splank, tplank);
k3d/share/shaders/k3d_oakplank.sl:135:  float plankindex = swhichplank + 13 * twhichplank;
k3d/share/shaders/k3d_oakplank.sl:137:    point(splank - 0.5, height - 0.01 * tplank, tplank) + vector(1, 5,
k3d/share/shaders/k3d_oakplank.sl:139:    (vector cellnoise(swhichplank, twhichplank) - 0.5);
k3d/share/shaders/k3d_oakplank.sl:141:  float wood = oaktexture(Ppat, dPshad, ringfreq, ringunevenness, grainfreq,
k3d/share/shaders/k3d_oakplank.sl:145:  color Cwood = mix(Clightwood, Cdarkwood, wood);
k3d/share/shaders/k3d_oakplank.sl:147:  Cwood = varyEach(Cwood, plankindex, varyhue, varysat, varylum);
k3d/share/shaders/k3d_oakplank.sl:150:  /* Displacement: the edges of the planks displace down a bit, as do
k3d/share/shaders/k3d_oakplank.sl:151:   * the grooves between planks. 
k3d/share/shaders/k3d_oakplank.sl:153:  float edgedisp = smoothpulse(0, edgewidth, plankwidth - edgewidth,
k3d/share/shaders/k3d_oakplank.sl:154:			       plankwidth, splank);
k3d/share/shaders/k3d_oakplank.sl:156:    smoothpulse(0, edgewidth, planklength - edgewidth, planklength, tplank);
k3d/share/shaders/k3d_oakplank.sl:158:  float disp = -wood * divotdepth + groovedepth * (edgedisp - 1);
k3d/share/shaders/k3d_oakplank.sl:160:    varnishlump * filteredsnoise(Pshad * varnishlumpfreq,
k3d/share/shaders/k3d_oakplank.sl:161:				 dPshad * varnishlumpfreq);
k3d/share/shaders/k3d_oakplank.sl:162:  Nf = faceforward(Displace(Nf, "shader", disp, truedisp), I);
k3d/share/shaders/k3d_oakplank.sl:165:   * Less specular in the grooves, more specular in the dark wood. 
k3d/share/shaders/k3d_oakplank.sl:169:    MaterialShinyPlastic(Nf, Cwood, Ka, Kd, specadjusted * Ks, roughness,
k3d/share/shaders/k3d_orange.sl:2: * Actually it is a condensed version of the mango shader from Sig '92 "Writing RenderMan Shaders"
k3d/share/shaders/k3d_orange.sl:12: *	Ka, Kd, Ks, roughness - the usual
k3d/share/shaders/k3d_orange.sl:17: *	tal@SpamSucks_cs.caltech.edu
k3d/share/shaders/k3d_orange.sl:30:	float roughness = .2;
k3d/share/shaders/k3d_orange.sl:49:	Ci = Cs * (Ka * ambient() + Kd * diffuse (Nf)) + Ks * specular (Nf, V, roughness);
k3d/share/shaders/k3d_orennayar.sl:1:/* renamed LG_orennayar.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_orennayar.sl:4: * orennayar.sl - rough diffuse surface
k3d/share/shaders/k3d_orennayar.sl:8: *   Makes a rough surface using a BRDF which is more accurate than
k3d/share/shaders/k3d_orennayar.sl:12: *   an especially accurate one for rough surfaces.  Truly rough surfacs
k3d/share/shaders/k3d_orennayar.sl:13: *   tend to act more like retroreflectors than like isotropic scatterers.
k3d/share/shaders/k3d_orennayar.sl:17: *   sigma - roughness (0 is lambertian, larger values are rougher)
k3d/share/shaders/k3d_orennayar.sl:22: *   Oren, Michael and Shree K. Nayar.  "Generalization of Lambert's
k3d/share/shaders/k3d_orennayar.sl:23: *         Reflectance Model," Computer Graphics Annual Conference
k3d/share/shaders/k3d_orennayar.sl:27: *   1. Note that this is really just an illuminance loop that gathers
k3d/share/shaders/k3d_orennayar.sl:28: *      light from the sources and applies Oren & Nayar's local reflectance
k3d/share/shaders/k3d_orennayar.sl:29: *      model to the result.  It could easily be packaged up as a macro
k3d/share/shaders/k3d_orennayar.sl:30: *      or a function and used in any other shader, in place of diffuse().
k3d/share/shaders/k3d_orennayar.sl:31: *   2. Examination of why rough surfaces are not Lambertian will lead
k3d/share/shaders/k3d_orennayar.sl:32: *      you to the solution to the famous "flat full moon" problem.
k3d/share/shaders/k3d_orennayar.sl:46:    color lightC = 0;
k3d/share/shaders/k3d_orennayar.sl:49:    float theta_r, theta_i, cos_theta_i;
k3d/share/shaders/k3d_orennayar.sl:50:    float alpha, beta, sigma2, cos_phi_diff;
k3d/share/shaders/k3d_orennayar.sl:55:    theta_r = acos (Eye . Nf);
k3d/share/shaders/k3d_orennayar.sl:60:	cos_theta_i = LN . Nf;
k3d/share/shaders/k3d_orennayar.sl:61:	cos_phi_diff = normalize(Eye-Nf*(Eye.Nf)) . normalize(LN - Nf*(LN.Nf));
k3d/share/shaders/k3d_orennayar.sl:62:	theta_i = acos (cos_theta_i);
k3d/share/shaders/k3d_orennayar.sl:63:	alpha = max (theta_i, theta_r);
k3d/share/shaders/k3d_orennayar.sl:64:	beta = min (theta_i, theta_r);
k3d/share/shaders/k3d_orennayar.sl:67:	if (cos_phi_diff >= 0)
k3d/share/shaders/k3d_orennayar.sl:68:	    C2 *= sin(alpha);
k3d/share/shaders/k3d_orennayar.sl:69:	else C2 *= (sin(alpha) - pow(2*beta/PI,3));
k3d/share/shaders/k3d_orennayar.sl:70:	C3 = 0.125 * sigma2 / (sigma2+0.09) * pow ((4*alpha*beta)/(PI*PI),2);
k3d/share/shaders/k3d_orennayar.sl:71:	L1 = Cs * (cos_theta_i * (C1 + cos_phi_diff * C2 * tan(beta) +
k3d/share/shaders/k3d_orennayar.sl:72:				  (1 - abs(cos_phi_diff)) * C3 * tan((alpha+beta)/2)));
k3d/share/shaders/k3d_orennayar.sl:73:	L2 = (Cs * Cs) * (0.17 * cos_theta_i * sigma2/(sigma2+0.13) *
k3d/share/shaders/k3d_orennayar.sl:74:			  (1 - cos_phi_diff*(4*beta*beta)/(PI*PI)));
k3d/share/shaders/k3d_orennayar.sl:75:	lightC += (L1 + L2) * Cl;
k3d/share/shaders/k3d_orennayar.sl:79:    Ci = Os * (Cs * (Ka*ambient()) + Kd*lightC);
k3d/share/shaders/k3d_outlet.sl:2: * outlet.sl -- surface shader for an electrical outlet
k3d/share/shaders/k3d_outlet.sl:6: *   patch to make a wall more interesting.  The patch should be
k3d/share/shaders/k3d_outlet.sl:7: *   twice as high as it is wide.  *Totally* cheesy if you see it from
k3d/share/shaders/k3d_outlet.sl:8: *   up close, but from across the room, it's a nice touch of detail.
k3d/share/shaders/k3d_outlet.sl:9: *   I should probably add some bump mapping or other variation, but
k3d/share/shaders/k3d_outlet.sl:13: *   Ka, Kd 	   	work just like the matte shader
k3d/share/shaders/k3d_outlet.sl:14: *   screwKs            Ks parameter for the screw
k3d/share/shaders/k3d_outlet.sl:20: *      June 1992 -- first written by lg for the Kitchen image
k3d/share/shaders/k3d_outlet.sl:21: *      17 Jan 1994 -- recoded by lg in correct shading language.
k3d/share/shaders/k3d_outlet.sl:34:  float ks, kd, roughness;
k3d/share/shaders/k3d_outlet.sl:40:  roughness = 0.25;
k3d/share/shaders/k3d_outlet.sl:67:  /* Use the plastic illumination model */
k3d/share/shaders/k3d_outlet.sl:71:	      ks * specular(Nf,-normalize(I),roughness));
k3d/share/shaders/k3d_outline.sl:2: * it's the valdez algorithm. short and sweet.
k3d/share/shaders/k3d_outline.sl:3: * width sets the line width.
k3d/share/shaders/k3d_outline.sl:6:k3d_outline(float width = .05)
k3d/share/shaders/k3d_outline.sl:12:  P += Nn*width;
k3d/share/shaders/k3d_outline.sl:14:  Oi = smoothstep(-.01,0,dot);
k3d/share/shaders/k3d_paintedplastic.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_paintedplastic.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_paintedplastic.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_paintedplastic.sl:9: *    Apply a texture map to a plastic surface, indexing the texture
k3d/share/shaders/k3d_paintedplastic.sl:10: *    by the s,t parameters of the surface.
k3d/share/shaders/k3d_paintedplastic.sl:13: *    Ka, Kd, Ks, roughness, specularcolor - the usual meaning.
k3d/share/shaders/k3d_paintedplastic.sl:14: *    texturename - the name of the texture file.
k3d/share/shaders/k3d_paintedplastic.sl:22:	float roughness = 0.1;
k3d/share/shaders/k3d_paintedplastic.sl:46:	Ci = Oi * Cs * Ct * (Ka * ambient() + Kd * diffuse(Nf)) + specularcolor * Ks * specular(Nf, V, roughness);
k3d/share/shaders/k3d_parquet_plank.sl:2: * parquet_plank.sl -- another surface shader for wood.
k3d/share/shaders/k3d_parquet_plank.sl:5: *   Makes texture of wooden planks in s-t space.  This wood looks rather
k3d/share/shaders/k3d_parquet_plank.sl:6: *   like oak plank parquet floor tiles.  The actual wood and plank pattern
k3d/share/shaders/k3d_parquet_plank.sl:7: *   is based on my "planks" shader.  This shader works best if "s" and "t"
k3d/share/shaders/k3d_parquet_plank.sl:8: *   units are both the same size in world space.
k3d/share/shaders/k3d_parquet_plank.sl:11: *   Ka, Kd, Ks, specular, roughness - work just like the plastic shader
k3d/share/shaders/k3d_parquet_plank.sl:12: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_parquet_plank.sl:13: *   plankwidth - width of each plank (in terms of s/t)
k3d/share/shaders/k3d_parquet_plank.sl:14: *   plankspertile - number of planks in each parquet tile
k3d/share/shaders/k3d_parquet_plank.sl:15: *   ringscale - scaling for the ring spacing
k3d/share/shaders/k3d_parquet_plank.sl:16: *   grainscale - scaling for the fine grain
k3d/share/shaders/k3d_parquet_plank.sl:17: *   groovewidth - width of the grooves between the planks (in terms of s/t)
k3d/share/shaders/k3d_parquet_plank.sl:18: *   lightwood, darkwood - surface colors for the wood itself
k3d/share/shaders/k3d_parquet_plank.sl:19: *   groovecolor - the color of the "grooves" between the planks
k3d/share/shaders/k3d_parquet_plank.sl:20: *   plankvary - controls how much wood color varies from plank to plank
k3d/share/shaders/k3d_parquet_plank.sl:22: *   wavy - relative wavyness of the ring pattern
k3d/share/shaders/k3d_parquet_plank.sl:24: * ANTIALIASING: this shader does a pretty good job of antialiasing itself,
k3d/share/shaders/k3d_parquet_plank.sl:25: *   even with low sampling densities.
k3d/share/shaders/k3d_parquet_plank.sl:31:surface k3d_parquet_plank(float Ka = 1, Kd = 0.75, Ks = .15, roughness = .025;
k3d/share/shaders/k3d_parquet_plank.sl:36:			  color lightwood = color(0.57, 0.292, 0.125);
k3d/share/shaders/k3d_parquet_plank.sl:39:			  float plankwidth = .05, groovewidth = 0.001;
k3d/share/shaders/k3d_parquet_plank.sl:49:  float whichrow, whichplank;
k3d/share/shaders/k3d_parquet_plank.sl:50:  float swidth, twidth, fwidth, ss, tt, w, h, fade, ttt;
k3d/share/shaders/k3d_parquet_plank.sl:54:  float tmp, planklength;
k3d/share/shaders/k3d_parquet_plank.sl:56:  PGWIDTH = plankwidth + groovewidth;
k3d/share/shaders/k3d_parquet_plank.sl:57:  planklength = PGWIDTH * plankspertile - groovewidth;
k3d/share/shaders/k3d_parquet_plank.sl:58:  PGHEIGHT = planklength + groovewidth;
k3d/share/shaders/k3d_parquet_plank.sl:59:  GWF = groovewidth * 0.5 / PGWIDTH;
k3d/share/shaders/k3d_parquet_plank.sl:60:  GHF = groovewidth * 0.5 / PGHEIGHT;
k3d/share/shaders/k3d_parquet_plank.sl:62:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_parquet_plank.sl:63:  swidth =
k3d/share/shaders/k3d_parquet_plank.sl:66:  twidth =
k3d/share/shaders/k3d_parquet_plank.sl:69:  fwidth = max(swidth, twidth);
k3d/share/shaders/k3d_parquet_plank.sl:74:  whichrow = floor(ss);
k3d/share/shaders/k3d_parquet_plank.sl:76:  whichplank = floor(tt);
k3d/share/shaders/k3d_parquet_plank.sl:77:  if(mod(whichrow / plankspertile + whichplank, 2) >= 1)
k3d/share/shaders/k3d_parquet_plank.sl:80:      whichrow = floor(ss);
k3d/share/shaders/k3d_parquet_plank.sl:82:      whichplank = floor(tt);
k3d/share/shaders/k3d_parquet_plank.sl:83:      tmp = swidth;
k3d/share/shaders/k3d_parquet_plank.sl:84:      swidth = twidth;
k3d/share/shaders/k3d_parquet_plank.sl:85:      twidth = tmp;
k3d/share/shaders/k3d_parquet_plank.sl:87:  ss -= whichrow;
k3d/share/shaders/k3d_parquet_plank.sl:88:  tt -= whichplank;
k3d/share/shaders/k3d_parquet_plank.sl:89:  whichplank += 20 * (whichrow + 10);
k3d/share/shaders/k3d_parquet_plank.sl:92:   * Figure out where the grooves are.  The value groovy is 0 where there
k3d/share/shaders/k3d_parquet_plank.sl:93:   * are grooves, 1 where the wood grain is visible.  Do some simple
k3d/share/shaders/k3d_parquet_plank.sl:96:  if(swidth >= 1)
k3d/share/shaders/k3d_parquet_plank.sl:100:      clamp(boxstep(GWF - swidth, GWF, ss), max(1 - GWF / swidth, 0),
k3d/share/shaders/k3d_parquet_plank.sl:101:	    1) - clamp(boxstep(1 - GWF - swidth, 1 - GWF, ss), 0,
k3d/share/shaders/k3d_parquet_plank.sl:102:		       2 * GWF / swidth);
k3d/share/shaders/k3d_parquet_plank.sl:103:  if(twidth >= 1)
k3d/share/shaders/k3d_parquet_plank.sl:104:    h = 1 - 2 * GHF;
k3d/share/shaders/k3d_parquet_plank.sl:106:    h =
k3d/share/shaders/k3d_parquet_plank.sl:107:      clamp(boxstep(GHF - twidth, GHF, tt), max(1 - GHF / twidth, 0),
k3d/share/shaders/k3d_parquet_plank.sl:108:	    1) - clamp(boxstep(1 - GHF - twidth, 1 - GHF, tt), 0,
k3d/share/shaders/k3d_parquet_plank.sl:109:		       2 * GHF / twidth);
k3d/share/shaders/k3d_parquet_plank.sl:110:  /* This would be the non-antialiased version:
k3d/share/shaders/k3d_parquet_plank.sl:112:   * h = step (GHF,tt) - step(1-GHF,tt);
k3d/share/shaders/k3d_parquet_plank.sl:114:  groovy = w * h;
k3d/share/shaders/k3d_parquet_plank.sl:118:   * Add the ring patterns
k3d/share/shaders/k3d_parquet_plank.sl:120:  fade = smoothstep(1 / ringscale, 8 / ringscale, fwidth);
k3d/share/shaders/k3d_parquet_plank.sl:123:      ttt = tt / 4 + whichplank / 28.38 + wavy * noise(8 * ss, tt / 4);
k3d/share/shaders/k3d_parquet_plank.sl:124:      r = ringscale * noise(ss - whichplank, ttt);
k3d/share/shaders/k3d_parquet_plank.sl:127:	0.3 + 0.7 * smoothstep(0.2, 0.55, r) * (1 - smoothstep(0.75, 0.8, r));
k3d/share/shaders/k3d_parquet_plank.sl:131:       * Multiply the ring pattern by the fine grain
k3d/share/shaders/k3d_parquet_plank.sl:133:      fade = smoothstep(2 / grainscale, 8 / grainscale, fwidth);
k3d/share/shaders/k3d_parquet_plank.sl:147:  /* Mix the light and dark wood according to the grain pattern */
k3d/share/shaders/k3d_parquet_plank.sl:148:  woodcolor = mix(lightwood, darkwood, r);
k3d/share/shaders/k3d_parquet_plank.sl:152:    (1 - plankvary / 2 + plankvary * (float noise(whichplank + 0.5)));
k3d/share/shaders/k3d_parquet_plank.sl:156:  /* Use the plastic illumination model */
k3d/share/shaders/k3d_parquet_plank.sl:160:	  specularcolor * Ks * specular(Nf, -normalize(I), roughness));
k3d/share/shaders/k3d_parquet_plank2.sl:3: * parquet_plank.sl -- another surface shader for wood.
k3d/share/shaders/k3d_parquet_plank2.sl:6: *   Makes texture of wooden planks in s-t space.  This wood looks rather
k3d/share/shaders/k3d_parquet_plank2.sl:7: *   like oak plank parquet floor tiles.  The actual wood and plank pattern
k3d/share/shaders/k3d_parquet_plank2.sl:8: *   is based on my "planks" shader.  This shader works best if "s" and "t"
k3d/share/shaders/k3d_parquet_plank2.sl:9: *   units are both the same size in world space.
k3d/share/shaders/k3d_parquet_plank2.sl:12: *   Ka, Kd, Ks, specular, roughness - work just like the plastic shader
k3d/share/shaders/k3d_parquet_plank2.sl:13: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_parquet_plank2.sl:14: *   plankwidth - width of each plank (in terms of s/t)
k3d/share/shaders/k3d_parquet_plank2.sl:15: *   plankspertile - number of planks in each parquet tile
k3d/share/shaders/k3d_parquet_plank2.sl:16: *   ringscale - scaling for the ring spacing
k3d/share/shaders/k3d_parquet_plank2.sl:17: *   grainscale - scaling for the fine grain
k3d/share/shaders/k3d_parquet_plank2.sl:18: *   groovewidth - width of the grooves between the planks (in terms of s/t)
k3d/share/shaders/k3d_parquet_plank2.sl:19: *   lightwood, darkwood - surface colors for the wood itself
k3d/share/shaders/k3d_parquet_plank2.sl:20: *   groovecolor - the color of the "grooves" between the planks
k3d/share/shaders/k3d_parquet_plank2.sl:21: *   plankvary - controls how much wood color varies from plank to plank
k3d/share/shaders/k3d_parquet_plank2.sl:23: *   wavy - relative wavyness of the ring pattern
k3d/share/shaders/k3d_parquet_plank2.sl:25: * ANTIALIASING: this shader does a pretty good job of antialiasing itself,
k3d/share/shaders/k3d_parquet_plank2.sl:26: *   even with low sampling densities.
k3d/share/shaders/k3d_parquet_plank2.sl:28: * AUTHOR: written by Larry Gritz, the George Washington University
k3d/share/shaders/k3d_parquet_plank2.sl:32: *                Washington, DC 20052
k3d/share/shaders/k3d_parquet_plank2.sl:35: *    10 Feb 1995 - written by Larry Gritz, based on my "plank" shader.
k3d/share/shaders/k3d_parquet_plank2.sl:36: *    10 Feb 1995 - modified by wave to change the name
k3d/share/shaders/k3d_parquet_plank2.sl:45:k3d_parquet_plank2 (float Ka = 1, Kd = 0.75, Ks = .15, roughness = .025;
k3d/share/shaders/k3d_parquet_plank2.sl:50:	       color lightwood = color (0.57, 0.292, 0.125);
k3d/share/shaders/k3d_parquet_plank2.sl:53:	       float plankwidth = .05, groovewidth = 0.001;
k3d/share/shaders/k3d_parquet_plank2.sl:63:  float whichrow, whichplank;
k3d/share/shaders/k3d_parquet_plank2.sl:64:  float swidth, twidth, fwidth, ss, tt, w, h, fade, ttt;
k3d/share/shaders/k3d_parquet_plank2.sl:68:  float tilewidth, whichtile, tmp, planklength;
k3d/share/shaders/k3d_parquet_plank2.sl:70:  PGWIDTH = plankwidth+groovewidth;
k3d/share/shaders/k3d_parquet_plank2.sl:71:  planklength = PGWIDTH * plankspertile - groovewidth;
k3d/share/shaders/k3d_parquet_plank2.sl:72:  PGHEIGHT = planklength+groovewidth;
k3d/share/shaders/k3d_parquet_plank2.sl:73:  GWF = groovewidth*0.5/PGWIDTH;
k3d/share/shaders/k3d_parquet_plank2.sl:74:  GHF = groovewidth*0.5/PGHEIGHT;
k3d/share/shaders/k3d_parquet_plank2.sl:76:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_parquet_plank2.sl:77:  swidth = (max (abs(Du(s)*du) + abs(Dv(s)*dv), MINFILTERWIDTH) / PGWIDTH) * txtscale;
k3d/share/shaders/k3d_parquet_plank2.sl:78:  twidth = (max (abs(Du(t)*du) + abs(Dv(t)*dv), MINFILTERWIDTH) / PGHEIGHT) * txtscale;
k3d/share/shaders/k3d_parquet_plank2.sl:79:  fwidth = max(swidth,twidth);
k3d/share/shaders/k3d_parquet_plank2.sl:84:  whichrow = floor (ss);
k3d/share/shaders/k3d_parquet_plank2.sl:86:  whichplank = floor(tt);
k3d/share/shaders/k3d_parquet_plank2.sl:87:  if (mod (whichrow/plankspertile + whichplank, 2) >= 1) {
k3d/share/shaders/k3d_parquet_plank2.sl:89:      whichrow = floor (ss);
k3d/share/shaders/k3d_parquet_plank2.sl:91:      whichplank = floor(tt);
k3d/share/shaders/k3d_parquet_plank2.sl:92:      tmp = swidth;  swidth = twidth;  twidth = tmp;
k3d/share/shaders/k3d_parquet_plank2.sl:94:  ss -= whichrow;
k3d/share/shaders/k3d_parquet_plank2.sl:95:  tt -= whichplank;
k3d/share/shaders/k3d_parquet_plank2.sl:96:  whichplank += 20*(whichrow+10);
k3d/share/shaders/k3d_parquet_plank2.sl:99:   * Figure out where the grooves are.  The value groovy is 0 where there
k3d/share/shaders/k3d_parquet_plank2.sl:100:   * are grooves, 1 where the wood grain is visible.  Do some simple
k3d/share/shaders/k3d_parquet_plank2.sl:103:  if (swidth >= 1)
k3d/share/shaders/k3d_parquet_plank2.sl:105:  else w = clamp (boxstep(GWF-swidth,GWF,ss), max(1-GWF/swidth,0), 1)
k3d/share/shaders/k3d_parquet_plank2.sl:106:	 - clamp (boxstep(1-GWF-swidth,1-GWF,ss), 0, 2*GWF/swidth);
k3d/share/shaders/k3d_parquet_plank2.sl:107:  if (twidth >= 1)
k3d/share/shaders/k3d_parquet_plank2.sl:108:      h = 1 - 2*GHF;
k3d/share/shaders/k3d_parquet_plank2.sl:109:  else h = clamp (boxstep(GHF-twidth,GHF,tt), max(1-GHF/twidth,0),1)
k3d/share/shaders/k3d_parquet_plank2.sl:110:	 - clamp (boxstep(1-GHF-twidth,1-GHF,tt), 0, 2*GHF/twidth);
k3d/share/shaders/k3d_parquet_plank2.sl:111:  /* This would be the non-antialiased version:
k3d/share/shaders/k3d_parquet_plank2.sl:113:   * h = step (GHF,tt) - step(1-GHF,tt);
k3d/share/shaders/k3d_parquet_plank2.sl:115:  groovy = w*h;
k3d/share/shaders/k3d_parquet_plank2.sl:119:   * Add the ring patterns
k3d/share/shaders/k3d_parquet_plank2.sl:121:  fade = smoothstep (1/ringscale, 8/ringscale, fwidth);
k3d/share/shaders/k3d_parquet_plank2.sl:123:      ttt = tt/4+whichplank/28.38 + wavy * noise (8*ss, tt/4);
k3d/share/shaders/k3d_parquet_plank2.sl:124:      r = ringscale * noise (ss-whichplank, ttt);
k3d/share/shaders/k3d_parquet_plank2.sl:126:      r = 0.3 + 0.7 * smoothstep(0.2, 0.55, r) * (1 - smoothstep(0.75, 0.8, r));
k3d/share/shaders/k3d_parquet_plank2.sl:130:       * Multiply the ring pattern by the fine grain
k3d/share/shaders/k3d_parquet_plank2.sl:132:      fade = smoothstep (2/grainscale, 8/grainscale, fwidth);
k3d/share/shaders/k3d_parquet_plank2.sl:143:  /* Mix the light and dark wood according to the grain pattern */
k3d/share/shaders/k3d_parquet_plank2.sl:144:  woodcolor = mix (lightwood, darkwood, r);
k3d/share/shaders/k3d_parquet_plank2.sl:147:  woodcolor *= (1-plankvary/2 + plankvary * noise (whichplank+0.5));
k3d/share/shaders/k3d_parquet_plank2.sl:151:  /* Use the plastic illumination model */
k3d/share/shaders/k3d_parquet_plank2.sl:154:	      specularcolor * Ks*specular(Nf,-normalize(I),roughness));
k3d/share/shaders/k3d_parquet_tile.sl:2: * DWParquetTile.sl -- yet another surface shader for wood
k3d/share/shaders/k3d_parquet_tile.sl:4: * parquet_plank.sl -- another surface shader for wood.
k3d/share/shaders/k3d_parquet_tile.sl:7: *   Makes texture of wooden planks in s-t space.  This wood looks rather
k3d/share/shaders/k3d_parquet_tile.sl:8: *   like oak plank parquet floor tiles.  The actual wood and plank pattern
k3d/share/shaders/k3d_parquet_tile.sl:9: *   is based on my "planks" shader.  This shader works best if "s" and "t"
k3d/share/shaders/k3d_parquet_tile.sl:10: *   units are both the same size in world space.
k3d/share/shaders/k3d_parquet_tile.sl:13: *   Ka, Kd, Ks, specular, roughness - work just like the plastic shader
k3d/share/shaders/k3d_parquet_tile.sl:14: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_parquet_tile.sl:15: *   plankwidth - width of each plank (in terms of s/t)
k3d/share/shaders/k3d_parquet_tile.sl:16: *   plankspertile - number of planks in each parquet tile
k3d/share/shaders/k3d_parquet_tile.sl:17: *   ringscale - scaling for the ring spacing
k3d/share/shaders/k3d_parquet_tile.sl:18: *   grainscale - scaling for the fine grain
k3d/share/shaders/k3d_parquet_tile.sl:19: *   groovewidth - width of the grooves between the planks (in terms of s/t)
k3d/share/shaders/k3d_parquet_tile.sl:20: *   lightwood, darkwood - surface colors for the wood itself
k3d/share/shaders/k3d_parquet_tile.sl:21: *   groovecolor - the color of the "grooves" between the planks
k3d/share/shaders/k3d_parquet_tile.sl:22: *   plankvary - controls how much wood color varies from plank to plank
k3d/share/shaders/k3d_parquet_tile.sl:24: *   wavy - relative wavyness of the ring pattern
k3d/share/shaders/k3d_parquet_tile.sl:26: * ANTIALIASING: this shader does a pretty good job of antialiasing itself,
k3d/share/shaders/k3d_parquet_tile.sl:27: *   even with low sampling densities.
k3d/share/shaders/k3d_parquet_tile.sl:29: * AUTHOR: written by Larry Gritz, the George Washington University
k3d/share/shaders/k3d_parquet_tile.sl:33: *                Washington, DC 20052
k3d/share/shaders/k3d_parquet_tile.sl:36: *    10 Feb 1995 - written by Larry Gritz, based on my "plank" shader.
k3d/share/shaders/k3d_parquet_tile.sl:37: *    10 Feb 1995 - modified by wave to change the name
k3d/share/shaders/k3d_parquet_tile.sl:43: *   - made one plank per tile like the flooring in our lab
k3d/share/shaders/k3d_parquet_tile.sl:44: *   - comments appear where changes are made
k3d/share/shaders/k3d_parquet_tile.sl:45: *   - many thanks to Larry Gritz and wave for creating the original
k3d/share/shaders/k3d_parquet_tile.sl:52: * changed:
k3d/share/shaders/k3d_parquet_tile.sl:57: *   - plankwidth from .05 to .2
k3d/share/shaders/k3d_parquet_tile.sl:60:k3d_parquet_tile (float Ka = 1, Kd = 0.75, Ks = .15, roughness = .025;
k3d/share/shaders/k3d_parquet_tile.sl:65:	       color lightwood = color (0.57, 0.292, 0.125);
k3d/share/shaders/k3d_parquet_tile.sl:68:	       float plankwidth = .2, groovewidth = 0.001;
k3d/share/shaders/k3d_parquet_tile.sl:78:  float whichrow, whichplank;
k3d/share/shaders/k3d_parquet_tile.sl:79:  float swidth, twidth, fwidth, ss, tt, w, h, fade, ttt;
k3d/share/shaders/k3d_parquet_tile.sl:83:  float tilewidth, whichtile, tmp, planklength;
k3d/share/shaders/k3d_parquet_tile.sl:85:  PGWIDTH = plankwidth+groovewidth;
k3d/share/shaders/k3d_parquet_tile.sl:86:  planklength = PGWIDTH * plankspertile - groovewidth;
k3d/share/shaders/k3d_parquet_tile.sl:87:  PGHEIGHT = planklength+groovewidth;
k3d/share/shaders/k3d_parquet_tile.sl:88:  GWF = groovewidth*0.5/PGWIDTH;
k3d/share/shaders/k3d_parquet_tile.sl:89:  GHF = groovewidth*0.5/PGHEIGHT;
k3d/share/shaders/k3d_parquet_tile.sl:91:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_parquet_tile.sl:92:  swidth = (max (abs(Du(s)*du) + abs(Dv(s)*dv), MINFILTERWIDTH) / PGWIDTH) * txtscale;
k3d/share/shaders/k3d_parquet_tile.sl:93:  twidth = (max (abs(Du(t)*du) + abs(Dv(t)*dv), MINFILTERWIDTH) / PGHEIGHT) * txtscale;
k3d/share/shaders/k3d_parquet_tile.sl:94:  fwidth = max(swidth,twidth);
k3d/share/shaders/k3d_parquet_tile.sl:99:  whichrow = floor (ss);
k3d/share/shaders/k3d_parquet_tile.sl:101:  whichplank = floor(tt);
k3d/share/shaders/k3d_parquet_tile.sl:102:  if (mod (whichrow/plankspertile + whichplank, 2) >= 1) {
k3d/share/shaders/k3d_parquet_tile.sl:104:      whichrow = floor (ss);
k3d/share/shaders/k3d_parquet_tile.sl:106:      whichplank = floor(tt);
k3d/share/shaders/k3d_parquet_tile.sl:107:      tmp = swidth;  swidth = twidth;  twidth = tmp;
k3d/share/shaders/k3d_parquet_tile.sl:109:  ss -= whichrow;
k3d/share/shaders/k3d_parquet_tile.sl:110:  tt -= whichplank;
k3d/share/shaders/k3d_parquet_tile.sl:111:  whichplank += 20*(whichrow+10);
k3d/share/shaders/k3d_parquet_tile.sl:114:   * Figure out where the grooves are.  The value groovy is 0 where there
k3d/share/shaders/k3d_parquet_tile.sl:115:   * are grooves, 1 where the wood grain is visible.  Do some simple
k3d/share/shaders/k3d_parquet_tile.sl:118:  if (swidth >= 1)
k3d/share/shaders/k3d_parquet_tile.sl:120:  else w = clamp (boxstep(GWF-swidth,GWF,ss), max(1-GWF/swidth,0), 1)
k3d/share/shaders/k3d_parquet_tile.sl:121:	 - clamp (boxstep(1-GWF-swidth,1-GWF,ss), 0, 2*GWF/swidth);
k3d/share/shaders/k3d_parquet_tile.sl:122:  if (twidth >= 1)
k3d/share/shaders/k3d_parquet_tile.sl:123:      h = 1 - 2*GHF;
k3d/share/shaders/k3d_parquet_tile.sl:124:  else h = clamp (boxstep(GHF-twidth,GHF,tt), max(1-GHF/twidth,0),1)
k3d/share/shaders/k3d_parquet_tile.sl:125:	 - clamp (boxstep(1-GHF-twidth,1-GHF,tt), 0, 2*GHF/twidth);
k3d/share/shaders/k3d_parquet_tile.sl:126:  /* This would be the non-antialiased version:
k3d/share/shaders/k3d_parquet_tile.sl:128:   * h = step (GHF,tt) - step(1-GHF,tt);
k3d/share/shaders/k3d_parquet_tile.sl:130:  groovy = w*h;
k3d/share/shaders/k3d_parquet_tile.sl:134:   * Add the ring patterns
k3d/share/shaders/k3d_parquet_tile.sl:136:  fade = smoothstep (1/ringscale, 8/ringscale, fwidth);
k3d/share/shaders/k3d_parquet_tile.sl:138:      ttt = tt/4+whichplank/28.38 + wavy * noise (8*ss, tt/4);
k3d/share/shaders/k3d_parquet_tile.sl:139:      r = ringscale * noise (ss-whichplank, ttt);
k3d/share/shaders/k3d_parquet_tile.sl:141:      r = 0.3 + 0.7 * smoothstep(0.2, 0.55, r) * (1 - smoothstep(0.75, 0.8, r));
k3d/share/shaders/k3d_parquet_tile.sl:145:       * Multiply the ring pattern by the fine grain
k3d/share/shaders/k3d_parquet_tile.sl:147:      fade = smoothstep (2/grainscale, 8/grainscale, fwidth);
k3d/share/shaders/k3d_parquet_tile.sl:158:  /* Mix the light and dark wood according to the grain pattern */
k3d/share/shaders/k3d_parquet_tile.sl:159:  woodcolor = mix (lightwood, darkwood, r);
k3d/share/shaders/k3d_parquet_tile.sl:162:  woodcolor *= (1-plankvary/2 + plankvary * noise (whichplank+0.5));
k3d/share/shaders/k3d_parquet_tile.sl:166:  /* Use the plastic illumination model */
k3d/share/shaders/k3d_parquet_tile.sl:169:	      specularcolor * Ks*specular(Nf,-normalize(I),roughness));
k3d/share/shaders/k3d_planetclouds.sl:3: *                   an earth-like planetary model.
k3d/share/shaders/k3d_planetclouds.sl:6: *      When put on a sphere, sets the color & opacity of the sphere to
k3d/share/shaders/k3d_planetclouds.sl:7: *   make it look like the clouds surrounding an Earth-like planet.
k3d/share/shaders/k3d_planetclouds.sl:8: *      The shader works by creating a fractal turbulence function over
k3d/share/shaders/k3d_planetclouds.sl:9: *   the surface, then modulating the opacity based on this function in
k3d/share/shaders/k3d_planetclouds.sl:10: *   a way that looks like clouds on a planetary scale.
k3d/share/shaders/k3d_planetclouds.sl:14: *    Ka, Kd - the usual meaning
k3d/share/shaders/k3d_planetclouds.sl:15: *    distortionscale - controls the amount of texture distortion
k3d/share/shaders/k3d_planetclouds.sl:16: *    omega,lambda,octaves - the fractal characteristics of the clouds
k3d/share/shaders/k3d_planetclouds.sl:18: *    offset - controls the zero crossings (where the clouds disappear)
k3d/share/shaders/k3d_planetclouds.sl:22: *   1. The way this shader is typically used is to have two concentric
k3d/share/shaders/k3d_planetclouds.sl:23: *      spheres represent a planet.  The inner one is colored like the
k3d/share/shaders/k3d_planetclouds.sl:24: *      surface of a planet (perhaps using the "terran" shader), and the
k3d/share/shaders/k3d_planetclouds.sl:25: *      outer one uses the "planetclouds" shader.
k3d/share/shaders/k3d_planetclouds.sl:26: *   2. The best effects are achieved when the clouds not only occlude
k3d/share/shaders/k3d_planetclouds.sl:27: *      the view of the planet, but also shadow it.  The way to do this
k3d/share/shaders/k3d_planetclouds.sl:28: *      with the Blue Moon Renderer is to let the light cast shadows,
k3d/share/shaders/k3d_planetclouds.sl:29: *      then declare the cloud sphere as follows:
k3d/share/shaders/k3d_planetclouds.sl:31: *             Attribute "render" "casts_shadows" "shade"
k3d/share/shaders/k3d_planetclouds.sl:33: *             Sphere 1 -1 1 360
k3d/share/shaders/k3d_planetclouds.sl:35: *   3. The default values for the shader assume that the planet is
k3d/share/shaders/k3d_planetclouds.sl:36: *      represented by a unit sphere.  The texture space and/or parameters
k3d/share/shaders/k3d_planetclouds.sl:37: *      to this shader will need to be altered if the size of your planet
k3d/share/shaders/k3d_planetclouds.sl:42: *    Conversion to Shading Language and other minor changes by Larry Gritz.
k3d/share/shaders/k3d_planetclouds.sl:45: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_planetclouds.sl:46: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_planetclouds.sl:51: *    Feb 1994 - Conversion to Shading Language by L. Gritz
k3d/share/shaders/k3d_planetclouds.sl:53: * last modified 1 March 1994 by lg
k3d/share/shaders/k3d_planetclouds.sl:74:  float result;			/* Fractal sum is stored here */
k3d/share/shaders/k3d_planetclouds.sl:77:  PP = transform("shader", P);
k3d/share/shaders/k3d_planetclouds.sl:81:  /* Second cirrus: replace DNoise with vector fBm */
k3d/share/shaders/k3d_planetclouds.sl:96:  /* Adjust zero crossing (where the clouds disappear) */
k3d/share/shaders/k3d_planetclouds.sl:105:  /* Modulate surface opacity by the cloud value */
k3d/share/shaders/k3d_planetclouds.sl:108:  /* Shade like matte, but with color scaled by cloud opacity */
k3d/share/shaders/k3d_plank.sl:2: * plank.sl -- another surface shader for wood.
k3d/share/shaders/k3d_plank.sl:5: *   Makes texture of wooden planks in s-t space.  This wood looks rather
k3d/share/shaders/k3d_plank.sl:9: *   Ka, Kd, Ks, specular, roughness - work just like the plastic shader
k3d/share/shaders/k3d_plank.sl:10: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_plank.sl:11: *   ringscale - scaling for the ring spacing
k3d/share/shaders/k3d_plank.sl:12: *   grainscale - scaling for the fine grain
k3d/share/shaders/k3d_plank.sl:13: *   plankwidth - width of each plank (in terms of s/t)
k3d/share/shaders/k3d_plank.sl:14: *   planklength - length of each plank (in terms of s/t)
k3d/share/shaders/k3d_plank.sl:15: *   groovewidth - width of the grooves between the planks (in terms of s/t)
k3d/share/shaders/k3d_plank.sl:16: *   lightwood, darkwood - surface colors for the wood itself
k3d/share/shaders/k3d_plank.sl:17: *   groovecolor - the color of the "grooves" between the planks
k3d/share/shaders/k3d_plank.sl:18: *   plankvary - controls how much wood color varies from plank to plank
k3d/share/shaders/k3d_plank.sl:20: *   wavy - relative wavyness of the ring pattern
k3d/share/shaders/k3d_plank.sl:22: * ANTIALIASING: this shader does a pretty good job of antialiasing itself,
k3d/share/shaders/k3d_plank.sl:23: *   even with low sampling densities.
k3d/share/shaders/k3d_plank.sl:29:surface k3d_plank(float Ka = 1, Kd = 0.75, Ks = .15, roughness = .05;
k3d/share/shaders/k3d_plank.sl:33:		  color lightwood = color(0.57, 0.292, 0.125);
k3d/share/shaders/k3d_plank.sl:36:		  float plankwidth = .05, planklength = .75, groovewidth =
k3d/share/shaders/k3d_plank.sl:46:  float whichrow, whichplank;
k3d/share/shaders/k3d_plank.sl:47:  float swidth, twidth, fwidth, ss, tt, w, h, fade, ttt;
k3d/share/shaders/k3d_plank.sl:52:  PGWIDTH = plankwidth + groovewidth;
k3d/share/shaders/k3d_plank.sl:53:  PGHEIGHT = planklength + groovewidth;
k3d/share/shaders/k3d_plank.sl:54:  GWF = groovewidth * 0.5 / PGWIDTH;
k3d/share/shaders/k3d_plank.sl:55:  GHF = groovewidth * 0.5 / PGHEIGHT;
k3d/share/shaders/k3d_plank.sl:57:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_plank.sl:58:  swidth =
k3d/share/shaders/k3d_plank.sl:61:  twidth =
k3d/share/shaders/k3d_plank.sl:64:  fwidth = max(swidth, twidth);
k3d/share/shaders/k3d_plank.sl:69:  whichrow = floor(ss);
k3d/share/shaders/k3d_plank.sl:70:  ss -= whichrow;
k3d/share/shaders/k3d_plank.sl:71:  /* Jiggle each row */
k3d/share/shaders/k3d_plank.sl:72:  tt = (txtscale * t / PGHEIGHT) + 10 * snoise(0.5 + whichrow);
k3d/share/shaders/k3d_plank.sl:73:  whichplank = floor(tt);
k3d/share/shaders/k3d_plank.sl:74:  tt -= whichplank;
k3d/share/shaders/k3d_plank.sl:75:  whichplank += 20 * whichrow;
k3d/share/shaders/k3d_plank.sl:78:   * Figure out where the grooves are.  The value groovy is 0 where there
k3d/share/shaders/k3d_plank.sl:79:   * are grooves, 1 where the wood grain is visible.  Do some simple
k3d/share/shaders/k3d_plank.sl:82:  if(swidth >= 1)
k3d/share/shaders/k3d_plank.sl:86:      clamp(boxstep(GWF - swidth, GWF, ss), max(1 - GWF / swidth, 0),
k3d/share/shaders/k3d_plank.sl:87:	    1) - clamp(boxstep(1 - GWF - swidth, 1 - GWF, ss), 0,
k3d/share/shaders/k3d_plank.sl:88:		       2 * GWF / swidth);
k3d/share/shaders/k3d_plank.sl:89:  if(twidth >= 1)
k3d/share/shaders/k3d_plank.sl:90:    h = 1 - 2 * GHF;
k3d/share/shaders/k3d_plank.sl:92:    h =
k3d/share/shaders/k3d_plank.sl:93:      clamp(boxstep(GHF - twidth, GHF, tt), max(1 - GHF / twidth, 0),
k3d/share/shaders/k3d_plank.sl:94:	    1) - clamp(boxstep(1 - GHF - twidth, 1 - GHF, tt), 0,
k3d/share/shaders/k3d_plank.sl:95:		       2 * GHF / twidth);
k3d/share/shaders/k3d_plank.sl:96:  /* This would be the non-antialiased version:
k3d/share/shaders/k3d_plank.sl:98:   * h = step (GHF,tt) - step(1-GHF,tt);
k3d/share/shaders/k3d_plank.sl:100:  groovy = w * h;
k3d/share/shaders/k3d_plank.sl:104:   * Add the ring patterns
k3d/share/shaders/k3d_plank.sl:106:  fade = smoothstep(1 / ringscale, 8 / ringscale, fwidth);
k3d/share/shaders/k3d_plank.sl:109:      ttt = tt + whichplank / 28.38 + wavy * noise(8 * ss, tt);
k3d/share/shaders/k3d_plank.sl:110:      r = ringscale * noise(ss - whichplank, ttt);
k3d/share/shaders/k3d_plank.sl:113:	0.3 + 0.7 * smoothstep(0.2, 0.55, r) * (1 - smoothstep(0.75, 0.8, r));
k3d/share/shaders/k3d_plank.sl:117:       * Multiply the ring pattern by the fine grain
k3d/share/shaders/k3d_plank.sl:119:      fade = smoothstep(2 / grainscale, 8 / grainscale, fwidth);
k3d/share/shaders/k3d_plank.sl:133:  /* Mix the light and dark wood according to the grain pattern */
k3d/share/shaders/k3d_plank.sl:134:  woodcolor = mix(lightwood, darkwood, r);
k3d/share/shaders/k3d_plank.sl:138:    (1 - plankvary / 2 + plankvary * (float noise(whichplank + 0.5)));
k3d/share/shaders/k3d_plank.sl:143:   * Use the plastic illumination model
k3d/share/shaders/k3d_plank.sl:148:	  specularcolor * Ks * specular(Nf, -normalize(I), roughness));
k3d/share/shaders/k3d_plastic.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_plastic.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_plastic.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_plastic.sl:10:		    float Kd = .5; float Ks = .5; float roughness = .1;
k3d/share/shaders/k3d_plastic.sl:16:  Ci = Os * (Cs * (Ka * ambient() + Kd * diffuse(Nf)) + specularcolor * Ks * specular(Nf, -normalize(I), roughness));
k3d/share/shaders/k3d_plastic2.sl:1:/* I took wave's lead and renamed plastic to DPPlastic.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_plastic2.sl:6: * AUTHOR: Darwyn Peachy
k3d/share/shaders/k3d_plastic2.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_plastic2.sl:10: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_plastic2.sl:16:        float roughness = 0.1;
k3d/share/shaders/k3d_plastic2.sl:24:         + specularcolor * Ks * specular(Nf, V, roughness));
k3d/share/shaders/k3d_pointlight.sl:1:/* pointlight.sl - Standard point light source for RenderMan Interface.
k3d/share/shaders/k3d_pointlight.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_pointlight.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_pointlight.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_pointlight.sl:9:light k3d_pointlight(float intensity = 3000;
k3d/share/shaders/k3d_pointlight.sl:10:		     color lightcolor = 1;
k3d/share/shaders/k3d_pointlight.sl:11:		     point from = point "shader"(0, 0, 0);)
k3d/share/shaders/k3d_pointlight.sl:13:  illuminate(from) Cl = intensity * lightcolor / (L.L);
k3d/share/shaders/k3d_projectionmap_plastic.sl:2:// Copyright (c) 1995-2004, Timothy M. Shead
k3d/share/shaders/k3d_projectionmap_plastic.sl:4:// Contact: tshead@k-3d.com
k3d/share/shaders/k3d_projectionmap_plastic.sl:6:// This program is free software; you can redistribute it and/or
k3d/share/shaders/k3d_projectionmap_plastic.sl:7:// modify it under the terms of the GNU General Public
k3d/share/shaders/k3d_projectionmap_plastic.sl:8:// License as published by the Free Software Foundation; either
k3d/share/shaders/k3d_projectionmap_plastic.sl:9:// version 2 of the License, or (at your option) any later version.
k3d/share/shaders/k3d_projectionmap_plastic.sl:11:// This program is distributed in the hope that it will be useful,
k3d/share/shaders/k3d_projectionmap_plastic.sl:12:// but WITHOUT ANY WARRANTY; without even the implied warranty of
k3d/share/shaders/k3d_projectionmap_plastic.sl:13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
k3d/share/shaders/k3d_projectionmap_plastic.sl:16:// You should have received a copy of the GNU General Public
k3d/share/shaders/k3d_projectionmap_plastic.sl:17:// License along with this program; if not, write to the Free Software
k3d/share/shaders/k3d_projectionmap_plastic.sl:21:		\author Tim Shead (tshead@k-3d.com)
k3d/share/shaders/k3d_projectionmap_plastic.sl:28:	float roughness = 0.1;
k3d/share/shaders/k3d_projectionmap_plastic.sl:47:			point Pshad = transform("shader", P);
k3d/share/shaders/k3d_projectionmap_plastic.sl:49:			float x = xfreq * (xcomp(Pshad) - xoffset + 0.5);
k3d/share/shaders/k3d_projectionmap_plastic.sl:50:			float y = yfreq * (ycomp(Pshad) - yoffset + 0.5);
k3d/share/shaders/k3d_projectionmap_plastic.sl:62:	Ci = Oi * Cs * Ct * (Ka * ambient() + Kd * diffuse(Nf)) + specularcolor * Ks * specular(Nf, V, roughness);
k3d/share/shaders/k3d_puffyclouds.sl:1:/* I took wave's lead and renamed starfield to KMPuffyclouds.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_puffyclouds.sl:4: * puffyclouds.sl -- RenderMan compatible surface shader for puffy
k3d/share/shaders/k3d_puffyclouds.sl:8: *    Makes nice looking cumulous clouds like you would see in the sky
k3d/share/shaders/k3d_puffyclouds.sl:9: *    on a bright sunny day.  Works as a basic thresholded fBm.  Since
k3d/share/shaders/k3d_puffyclouds.sl:10: *    this texture is generally used as a backdrop, it does not take
k3d/share/shaders/k3d_puffyclouds.sl:11: *    lighting into account.  If you wanted a lit surface that looked like
k3d/share/shaders/k3d_puffyclouds.sl:12: *    puffy clouds (like painted clouds on a wall), then it would be pretty
k3d/share/shaders/k3d_puffyclouds.sl:13: *    easy to add the lighting.
k3d/share/shaders/k3d_puffyclouds.sl:17: *    skycolor, cloudcolor - the obvious meanings
k3d/share/shaders/k3d_puffyclouds.sl:18: *    octaves, omega, lambda - control the fractal appearance of the clouds
k3d/share/shaders/k3d_puffyclouds.sl:19: *    threshold - fBm sum below this level is just blue sky
k3d/share/shaders/k3d_puffyclouds.sl:22: *    None, but should be easy to add antialiasing simply by adaptively
k3d/share/shaders/k3d_puffyclouds.sl:23: *    setting the "octaves" parameter based on distance from eye point.
k3d/share/shaders/k3d_puffyclouds.sl:27: *    Translation to RenderMan Shading Language by Larry Gritz.
k3d/share/shaders/k3d_puffyclouds.sl:30: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_puffyclouds.sl:31: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_puffyclouds.sl:36: *    Apr 94 - translation to Shading Language by L. Gritz
k3d/share/shaders/k3d_puffyclouds.sl:38: * this file last updated 18 Apr 1994
k3d/share/shaders/k3d_puffyclouds.sl:53:	     float threshold = 0;
k3d/share/shaders/k3d_puffyclouds.sl:57:  color Ct;      /* Color of the surface */
k3d/share/shaders/k3d_puffyclouds.sl:58:  point PP;      /* Surface point in shader space */
k3d/share/shaders/k3d_puffyclouds.sl:61:  PP = txtscale * transform ("shader", P);
k3d/share/shaders/k3d_puffyclouds.sl:63:  /* Use fractional Brownian motion to compute a value for this point */
k3d/share/shaders/k3d_puffyclouds.sl:73:  Ct = mix (skycolor, cloudcolor, smoothstep (threshold, 1, value));
k3d/share/shaders/k3d_puffyclouds.sl:75:  /* Shade like matte, but use color Ct */
k3d/share/shaders/k3d_puffyclouds.sl:77:  Ci = Ct;   /* This makes the color disregard the lighting */
k3d/share/shaders/k3d_puffyclouds.sl:78:  /* Uncomment the next line if you want the surface to actually be lit */
k3d/share/shaders/k3d_redapple.sl:4: * redapple.sl - A nice shader for reddy-green apples.
k3d/share/shaders/k3d_redapple.sl:6: * Copyright (C) Jonathan Merritt, 1999.
k3d/share/shaders/k3d_redapple.sl:7: * Feel free to use this shader to create apples anywhere and
k3d/share/shaders/k3d_redapple.sl:8: * everywhere.
k3d/share/shaders/k3d_redapple.sl:10: * This shader creates a nice skin for red-green apples. It _is_ tuned
k3d/share/shaders/k3d_redapple.sl:12: * apple you care to lay it on. Apples are requred to have the "s"
k3d/share/shaders/k3d_redapple.sl:13: * texture parameter running equatorialy around them (like latitude
k3d/share/shaders/k3d_redapple.sl:15: * look best from the side, but work ok from the top, so long as you
k3d/share/shaders/k3d_redapple.sl:16: * don't mind the simple lerping I used to fade to green at the poles.
k3d/share/shaders/k3d_redapple.sl:18: * Look out for the "txtscale" parameter: some noise calculations are
k3d/share/shaders/k3d_redapple.sl:19: * done using shader space, instead of "s" and "t" parameters (I think
k3d/share/shaders/k3d_redapple.sl:20: * my apple's parameters are stretched a bit?), so if you use
k3d/share/shaders/k3d_redapple.sl:21: * different size apples, make sure to change txtscale appropriately.
k3d/share/shaders/k3d_redapple.sl:23: * I think this shader is really cool. If you think so too, you can
k3d/share/shaders/k3d_redapple.sl:34:#include "rayserver.h"
k3d/share/shaders/k3d_redapple.sl:35:#include "raytrace.h"
k3d/share/shaders/k3d_redapple.sl:48:	float Ka = 1;             /* Ambient light coeff.          */
k3d/share/shaders/k3d_redapple.sl:50:	float roughness = .1;     /* Specular roughness param.     */
k3d/share/shaders/k3d_redapple.sl:52:	float redness = 1;        /* Amount of 'redness' - higher  */
k3d/share/shaders/k3d_redapple.sl:60:	 * Shader variables
k3d/share/shaders/k3d_redapple.sl:64:	float base_turb, blotch_turb, disp_turb;
k3d/share/shaders/k3d_redapple.sl:65:	float small_noise, blotch, speck, disp = 0, blackness;
k3d/share/shaders/k3d_redapple.sl:82:	PP = transform("shader", P);
k3d/share/shaders/k3d_redapple.sl:87:	 * Pick the base color for the apple.
k3d/share/shaders/k3d_redapple.sl:89:	 * The base color consists of patches of pure green,
k3d/share/shaders/k3d_redapple.sl:90:	 * and patches of finely speckled red and green. These
k3d/share/shaders/k3d_redapple.sl:91:	 * are set up so that the poles of the apple (as "t"
k3d/share/shaders/k3d_redapple.sl:94:	 * The apple geometry is such that lines of constant
k3d/share/shaders/k3d_redapple.sl:96:	 * The constants T1 - T4 specify locations of the
k3d/share/shaders/k3d_redapple.sl:97:	 * start of 'greenness' toward the poles.
k3d/share/shaders/k3d_redapple.sl:103:	#define BASE_GRC         0.4    /* shift factor for more red       */
k3d/share/shaders/k3d_redapple.sl:106:	#define T3               0.8    /* T2->T3 => red can exist here    */
k3d/share/shaders/k3d_redapple.sl:129:	 * Pick the blotch color.
k3d/share/shaders/k3d_redapple.sl:131:	 * The blotch color is finally determined by mixing,
k3d/share/shaders/k3d_redapple.sl:132:	 * using the blotching coefficient "blotch". This
k3d/share/shaders/k3d_redapple.sl:133:	 * section sets that coefficient, using a funky yet
k3d/share/shaders/k3d_redapple.sl:136:	#define BLOTCH_SF          20   /* s-factor for blotches  */
k3d/share/shaders/k3d_redapple.sl:137:	#define BLOTCH_TF          15   /* t-factor for blotches  */
k3d/share/shaders/k3d_redapple.sl:139:	#define BLOTCH_DELTA       0.1  /* 'nother scaling kludge */
k3d/share/shaders/k3d_redapple.sl:140:	#define BLOTCH_SPECK_COEFF 0.3  /* blotch specking coeff  */
k3d/share/shaders/k3d_redapple.sl:141:	blotch_turb = noise(BLOTCH_SF*sin(2*PI*(s+.1234)) + PI + label,
k3d/share/shaders/k3d_redapple.sl:143:	blotch = pow(blotch_turb, 1.3) * BLOTCH_TCF * 
k3d/share/shaders/k3d_redapple.sl:145:	blotch = blotch * (1+small_noise) +
k3d/share/shaders/k3d_redapple.sl:147:	if (blotch > 1) blotch = 1;
k3d/share/shaders/k3d_redapple.sl:151:	 * Set the brown specking.
k3d/share/shaders/k3d_redapple.sl:153:	 * The apple has brown speckles on it, set by mixing
k3d/share/shaders/k3d_redapple.sl:154:	 * using the speckling coefficient "speck". These
k3d/share/shaders/k3d_redapple.sl:155:	 * specks are very dot-like in nature, and this
k3d/share/shaders/k3d_redapple.sl:156:	 * dottiness technique is stolen from LG's starfield 
k3d/share/shaders/k3d_redapple.sl:157:	 * shader.
k3d/share/shaders/k3d_redapple.sl:161:	speck = pow(smoothstep(SPECK_CUTOFF, 1,
k3d/share/shaders/k3d_redapple.sl:165:	 * Determine where the apple goes black at the poles.
k3d/share/shaders/k3d_redapple.sl:166:	 * This simulates the spots where the stalk would be
k3d/share/shaders/k3d_redapple.sl:167:	 * attached, and where the wierd bit at the very bottom
k3d/share/shaders/k3d_redapple.sl:172:	blackness = 1-(smoothstep(BEDGE, BEDGE+BWIDTH, t)*
k3d/share/shaders/k3d_redapple.sl:173:	               smoothstep(BEDGE, BEDGE+BWIDTH, 1-t));
k3d/share/shaders/k3d_redapple.sl:177:	 * Combine what we have so far to set the surface
k3d/share/shaders/k3d_redapple.sl:180:	cs = mix(base_color, dred, blotch);
k3d/share/shaders/k3d_redapple.sl:186:	 * Set the shading surface normal.
k3d/share/shaders/k3d_redapple.sl:188:	 * Here we set the surface normal to fix up the specular
k3d/share/shaders/k3d_redapple.sl:189:	 * highlights. We'd like them perturbed by the small
k3d/share/shaders/k3d_redapple.sl:190:	 * noise, affected a little by the brown specks, and
k3d/share/shaders/k3d_redapple.sl:210:	 * Here, we raytrace for the slight mirrored reflections
k3d/share/shaders/k3d_redapple.sl:211:	 * in the surface of an apple. They don't add much, but
k3d/share/shaders/k3d_redapple.sl:212:	 * may be needed for the 'perfect' apple :-).
k3d/share/shaders/k3d_redapple.sl:214:	 * Note: You'll need Larry Gritz's raytrace helper files
k3d/share/shaders/k3d_redapple.sl:215:	 * for this bit!
k3d/share/shaders/k3d_redapple.sl:230:	 * Combine everything to get Ci, in the standard form.
k3d/share/shaders/k3d_redapple.sl:235:	                            Ks * specular(Nf, V, roughness)));
k3d/share/shaders/k3d_ridged_multifractal.sl:3: *    Conversion to Shading Language and minor modifications by Fredrik Brnnbacka.

k3d/share/shaders/k3d_ridged_multifractal.sl:7: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,

k3d/share/shaders/k3d_ridged_multifractal.sl:8: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.

k3d/share/shaders/k3d_ridged_multifractal.sl:15:k3d_ridged_multifractal(float H = 0.8, lacunarity = 2.5, octaves = 7, offset = 0.9, sharpness = 4, threshold = 12, Kt = 0.1)

k3d/share/shaders/k3d_ridged_multifractal.sl:17:	float result, signal, weight, i, exponent;

k3d/share/shaders/k3d_ridged_multifractal.sl:18:	point PP =transform("shader",P);

k3d/share/shaders/k3d_ridged_multifractal.sl:27:          		signal = pow( signal, sharpness );

k3d/share/shaders/k3d_ridged_multifractal.sl:28:                             /*This should give you a power function to control

k3d/share/shaders/k3d_ridged_multifractal.sl:29:                             sharpness of the ridges. Or you can just use the

k3d/share/shaders/k3d_ridged_multifractal.sl:32:          		weight = 1.0;

k3d/share/shaders/k3d_ridged_multifractal.sl:42:          		/* weigh successive contributions by previous signal */

k3d/share/shaders/k3d_ridged_multifractal.sl:43:          		weight = signal * threshold;

k3d/share/shaders/k3d_ridged_multifractal.sl:44:          		weight = clamp(weight,0,1)    ;    		

k3d/share/shaders/k3d_ridged_multifractal.sl:53:          		/* sharpen the ridge*/

k3d/share/shaders/k3d_ridged_multifractal.sl:54:          		signal = pow( signal, sharpness ); /* Or signal *= signal;*/

k3d/share/shaders/k3d_ridged_multifractal.sl:56:          		/* weight the contribution*/

k3d/share/shaders/k3d_ridged_multifractal.sl:57:          		signal *= weight;

k3d/share/shaders/k3d_ripple.sl:5: *  This produced concave displacements on any surfaces.

k3d/share/shaders/k3d_ripple.sl:7: *    by Lawrence D. Chin, cs184-bo

k3d/share/shaders/k3d_ripple.sl:14:	       wavelength = 0.25,

k3d/share/shaders/k3d_ripple.sl:20:  P += 1 + N * amplitude * (2 - abs (sin(2*PI*(s/wavelength))));

k3d/share/shaders/k3d_roughmetal.sl:2: * roughmetal.sl
k3d/share/shaders/k3d_roughmetal.sl:5: *   Rough metal without coherent reflections
k3d/share/shaders/k3d_roughmetal.sl:8: *   Ka, Kd, Ks - ambient, diffuse, specular weights
k3d/share/shaders/k3d_roughmetal.sl:9: *   roughness - highlight width
k3d/share/shaders/k3d_roughmetal.sl:11: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_roughmetal.sl:12: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_roughmetal.sl:16:#include "k3d_material.h"
k3d/share/shaders/k3d_roughmetal.sl:19:surface k3d_roughmetal(float Ka = 1, Kd = 0.1, Ks = .9, roughness = 0.4;)
k3d/share/shaders/k3d_roughmetal.sl:22:  Ci = MaterialRoughMetal(Nf, Cs, Ka, Kd, Ks, roughness);
k3d/share/shaders/k3d_round.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_round.sl:2:/* From the RenderMan Companion p.364 */
k3d/share/shaders/k3d_round.sl:3:/* Listing 16.23  Displacement shader for bevelling perpendicular bilinear patches*/
k3d/share/shaders/k3d_round.sl:6: * round(): displace the edge of a bilinear patch so that, if it is placed 
k3d/share/shaders/k3d_round.sl:7: * next to another patch at a right angle, the edge will be rounded.
k3d/share/shaders/k3d_round.sl:12:	float	 uu,	/* distance in u to the nearest "vertical" edge */
k3d/share/shaders/k3d_round.sl:13:		 vv,	/* distance in v to the nearest "horizontal" edge */
k3d/share/shaders/k3d_round.sl:14:		 lu,	/* "real" distance to the nearest "vertical" edge */
k3d/share/shaders/k3d_round.sl:15:		 lv;	/* "real" distance to the nearest "horizontal" edge */
k3d/share/shaders/k3d_round.sl:16:	point	 center,/* point toward which the surface is displaced 	*/
k3d/share/shaders/k3d_round.sl:17:		 dpdu,	/* dPdu pointed toward patch center line 	*/
k3d/share/shaders/k3d_round.sl:18:		 dpdv;	/* dPdv pointed toward patch center line 	*/
k3d/share/shaders/k3d_round.sl:20:	/* Find the distance in parameter space from the nearest edge in
k3d/share/shaders/k3d_round.sl:21:	   u and in v, and the directions away from those edges. */
k3d/share/shaders/k3d_round.sl:37:	/* Find the distances from the edges in the current space. */
k3d/share/shaders/k3d_round.sl:38:	lu = length(dPdu*uu);
k3d/share/shaders/k3d_round.sl:39:	lv = length(dPdv*vv);
k3d/share/shaders/k3d_round.sl:41:	if (lu < radius || lv < radius) {	/* only if within radius of 
k3d/share/shaders/k3d_round.sl:44:	 * Find the point towards which the surface  point will be 
k3d/share/shaders/k3d_round.sl:45:	 *  moved. This center is on the center line of a cylinder, if we 
k3d/share/shaders/k3d_round.sl:46:	 *  are not near the corner of the patch, or is the center of a 
k3d/share/shaders/k3d_round.sl:47:	 *  sphere, if we are. We move `center' to the nearest inflection 
k3d/share/shaders/k3d_round.sl:55:		/* Move center perpendicular to the surface */
k3d/share/shaders/k3d_round.sl:57:		/* Make P be distance 'radius' along the line 
k3d/share/shaders/k3d_rubber.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_rubber.sl:2:/* From the RenderMan Companion p.385 */
k3d/share/shaders/k3d_rubber.sl:3:/* Listing 16.38  Rubber surface shader*/
k3d/share/shaders/k3d_rubber.sl:6: * rubber(): This shader generates a rubber surface. It is a matte shader that
k3d/share/shaders/k3d_rubber.sl:7: * adds in a little white dust to mimic the dust on a new eraser.
k3d/share/shaders/k3d_rubber.sl:16:		Ploc = transform("shader", P);  /* Move to shader space */
k3d/share/shaders/k3d_rubber.sl:17:	color	cout, white=1;
k3d/share/shaders/k3d_rubber.sl:19:	/* Mix in some white dust. */
k3d/share/shaders/k3d_rubber.sl:20:	cout = mix(Cs, white, .05* (float noise(txtscale*Ploc)));
k3d/share/shaders/k3d_ruledpaper.sl:5: *   Makes a patch look like a piece of loose-leaf paper with lines,
k3d/share/shaders/k3d_ruledpaper.sl:6: *   the margin, binder holes and writing (as an image texture).
k3d/share/shaders/k3d_ruledpaper.sl:10: *   Ka, Kd, Ks, specular, roughness - work just like the plastic shader
k3d/share/shaders/k3d_ruledpaper.sl:11: *   linestr - how strongly do the lines show up (0.0 to 1.0)
k3d/share/shaders/k3d_ruledpaper.sl:14: * ANTIALIASING: no antialiasing. This can be a real problem because of the
k3d/share/shaders/k3d_ruledpaper.sl:15: *               thin lines on the paper.
k3d/share/shaders/k3d_ruledpaper.sl:21: *    8 Nov 1997 - started writing shader for RDC under MS VC++
k3d/share/shaders/k3d_ruledpaper.sl:22: *    9 Nov 1997 - added binder holes and finished shader
k3d/share/shaders/k3d_ruledpaper.sl:28: *   Don't worry about the paper anatomy settings. I moved them to
k3d/share/shaders/k3d_ruledpaper.sl:29: *   the paper(...) block so that they get calculated on initialisation
k3d/share/shaders/k3d_ruledpaper.sl:32: *   I don't know how many holes there were in paper when _YOU_ were a kid
k3d/share/shaders/k3d_ruledpaper.sl:33: *   but in my day there's 7. I actually got a piece of loose-leaf paper
k3d/share/shaders/k3d_ruledpaper.sl:34: *   and got all the measurements with a ruler. This is the real thing!!
k3d/share/shaders/k3d_ruledpaper.sl:36: *   The paper shader works for A4 pieces of paper, so remeber to make your
k3d/share/shaders/k3d_ruledpaper.sl:37: *   patch 21x29.7 units or at least with an approximate aspect ratio. 
k3d/share/shaders/k3d_ruledpaper.sl:43:	float roughness = 0.1;
k3d/share/shaders/k3d_ruledpaper.sl:49:	// Paper width
k3d/share/shaders/k3d_ruledpaper.sl:51:	// Paper height 
k3d/share/shaders/k3d_ruledpaper.sl:52:		ph=29.7,
k3d/share/shaders/k3d_ruledpaper.sl:53:	// Width of plastic strip
k3d/share/shaders/k3d_ruledpaper.sl:54: 		shiny=1.25/pw,
k3d/share/shaders/k3d_ruledpaper.sl:56:		lines = 0.7 / ph,
k3d/share/shaders/k3d_ruledpaper.sl:57:	// Thickness of lines
k3d/share/shaders/k3d_ruledpaper.sl:58:		linet = 0.05 / ph,
k3d/share/shaders/k3d_ruledpaper.sl:59:	// How far into the page do the lines start
k3d/share/shaders/k3d_ruledpaper.sl:62:		margt = 2 / ph,
k3d/share/shaders/k3d_ruledpaper.sl:63:		margb = 1 - (1.35 / ph),
k3d/share/shaders/k3d_ruledpaper.sl:64:	// Where does the vertical line (margin) start and end?
k3d/share/shaders/k3d_ruledpaper.sl:67:	// Settings for binder holes (circles)
k3d/share/shaders/k3d_ruledpaper.sl:77:// Fancy macro checks ss/tt coords against bounding box and [if inside]
k3d/share/shaders/k3d_ruledpaper.sl:78:// calculates if it's inside the circle. If it is, the colour
k3d/share/shaders/k3d_ruledpaper.sl:79:// becomes black and the opacity becomes 0.
k3d/share/shaders/k3d_ruledpaper.sl:82:	if ((tt>(tm-circr)/ph) && (tt>(tm+circr)/ph))	\
k3d/share/shaders/k3d_ruledpaper.sl:93:    // For plastic and diffuse shading
k3d/share/shaders/k3d_ruledpaper.sl:97:	// Check if there's a texture given.
k3d/share/shaders/k3d_ruledpaper.sl:98:	// Use a nice handwrititng font and you can make it look like
k3d/share/shaders/k3d_ruledpaper.sl:99:	// there's writing on the paper.
k3d/share/shaders/k3d_ruledpaper.sl:105:	// If we're inside the borders/margins
k3d/share/shaders/k3d_ruledpaper.sl:107:	// Figure out where in the lining we are and draw accordingly
k3d/share/shaders/k3d_ruledpaper.sl:116:		// Figure out where we are on the paper so that we can get
k3d/share/shaders/k3d_ruledpaper.sl:119:		tt = t * ph;
k3d/share/shaders/k3d_ruledpaper.sl:122:		// I wrote this handy macro to automate it!
k3d/share/shaders/k3d_ruledpaper.sl:132:	// Check if it actually needs shading
k3d/share/shaders/k3d_ruledpaper.sl:134:		if (s<=shiny) {
k3d/share/shaders/k3d_ruledpaper.sl:135:			// If inside plasticky reinforcement strip then
k3d/share/shaders/k3d_ruledpaper.sl:136:			// use plastic shading model.
k3d/share/shaders/k3d_ruledpaper.sl:138:			specularcolor * Ks * specular(Nf, V, roughness));
k3d/share/shaders/k3d_ruledpaper.sl:140:			// Else shade diffuse paper
k3d/share/shaders/k3d_rustymetal.sl:2: * rustymetal.sl -- metal with specks of rust
k3d/share/shaders/k3d_rustymetal.sl:5: *   A rough metal surface with controllable rust spots.  The rust pattern
k3d/share/shaders/k3d_rustymetal.sl:6: *   is basically thresholded turbulence (summed abs(snoise)).  Where it's
k3d/share/shaders/k3d_rustymetal.sl:7: *   rusty, shade like rust colored matte, and also make it bumpy (like
k3d/share/shaders/k3d_rustymetal.sl:8: *   the corrosion is kind of grainy).  Where there is no rust, shade like
k3d/share/shaders/k3d_rustymetal.sl:9: *   regular metal.  All computations are done in shader space.
k3d/share/shaders/k3d_rustymetal.sl:12: *   metalKa, metalKs, metalroughness - control the appearance of the metal.
k3d/share/shaders/k3d_rustymetal.sl:13: *   rustKa, rustKd, rustcolor - control the appearance of the rust.
k3d/share/shaders/k3d_rustymetal.sl:14: *   txtscale - overall scaling factor of the rust pattern.
k3d/share/shaders/k3d_rustymetal.sl:16: *   rustbump - controls the "bumpiness" of the rusty areas.
k3d/share/shaders/k3d_rustymetal.sl:19: *   The fractal sum used to determine the rust pattern chooses a number of
k3d/share/shaders/k3d_rustymetal.sl:20: *   octaves to sum based on the shader sampling rate.  This helps to keep
k3d/share/shaders/k3d_rustymetal.sl:24: *         The George Washington University
k3d/share/shaders/k3d_rustymetal.sl:44:k3d_rustymetal (float metalKa = 1, metalKs = 1, metalroughness = .1;
k3d/share/shaders/k3d_rustymetal.sl:52:  point Nf, V;                 /* normal and view vector used for shading */
k3d/share/shaders/k3d_rustymetal.sl:53:  point Nrust;                 /* perturbed normal for the rusty areas */
k3d/share/shaders/k3d_rustymetal.sl:54:  point PP;                    /* shade space point */
k3d/share/shaders/k3d_rustymetal.sl:57:  float rustiness;             /* Result: how rusty is this point? */
k3d/share/shaders/k3d_rustymetal.sl:60:  /* Sum several octaves of abs(snoise), i.e. turbulence.  Limit the
k3d/share/shaders/k3d_rustymetal.sl:61:   * number of octaves by the estimated change in PP between adjacent
k3d/share/shaders/k3d_rustymetal.sl:62:   * shading samples.
k3d/share/shaders/k3d_rustymetal.sl:64:  PP = txtscale * transform ("shader", P);
k3d/share/shaders/k3d_rustymetal.sl:71:  /* If it's rusty, also add a high frequency bumpiness to the normal */
k3d/share/shaders/k3d_rustymetal.sl:74:  /* Scale the rust appropriately, modulate it by another noise 
k3d/share/shaders/k3d_rustymetal.sl:75:   * computation, then sharpen it by squaring its value.
k3d/share/shaders/k3d_rustymetal.sl:81:  /* If we have any rust, calculate the color of the rust, taking into
k3d/share/shaders/k3d_rustymetal.sl:82:   * account the perturbed normal and shading like matte.
k3d/share/shaders/k3d_rustymetal.sl:88:  /* If we have any metal, calculate the color of the metal, using the
k3d/share/shaders/k3d_rustymetal.sl:89:   * original (smooth) normal and the usual metal illumination model.
k3d/share/shaders/k3d_rustymetal.sl:94:      Cmetal = Cs * (metalKa*ambient() + metalKs*specular(Nf,V,metalroughness));
k3d/share/shaders/k3d_rustymetal.sl:97:  /* Now blend the metal and rust colors depending on the computed value
k3d/share/shaders/k3d_rustymetal.sl:98:   * of the rustiness.
k3d/share/shaders/k3d_saturn.sl:1:/* This was terran.sl from Larry Gritz and Ken Musgrave.  But there isn't much of it left.
k3d/share/shaders/k3d_saturn.sl:9: *      When put on a sphere, sets the color to look like relatively
k3d/share/shaders/k3d_saturn.sl:10: *   Saturn-like.  The shader works by using a variety of fractal 
k3d/share/shaders/k3d_saturn.sl:11: *   turbulence techniques.
k3d/share/shaders/k3d_saturn.sl:15: *    Ka, Kd - the usual meaning
k3d/share/shaders/k3d_saturn.sl:22: *   Assumes being used on a sphere.  Haven't really tried it by using other
k3d/share/shaders/k3d_saturn.sl:23: *   than the default arguments.
k3d/share/shaders/k3d_saturn.sl:26: *    Conversion to Shading Language and minor modifications by Larry Gritz.
k3d/share/shaders/k3d_saturn.sl:33: *    This started out as L. Gritz's terran.sl shader.  But I think he may be
k3d/share/shaders/k3d_saturn.sl:34: *        the only one that would recognize that it was.
k3d/share/shaders/k3d_saturn.sl:35: *    23 May 1995 - Changed name from terran.sl to TLSaturn.sl and
k3d/share/shaders/k3d_saturn.sl:36: *        Did major hacking to make it a Saturn-like shader by Tal Lancaster 
k3d/share/shaders/k3d_saturn.sl:37: *        tal@SpamSucks_cs.caltech.edu
k3d/share/shaders/k3d_saturn.sl:55:  /* Do all shading in shader space */
k3d/share/shaders/k3d_saturn.sl:56:  Ptexture = transform ("shader", P);
k3d/share/shaders/k3d_saturn.sl:57:  PtN = normalize (Ptexture);      /* Version of Ptexture with radius 1 */
k3d/share/shaders/k3d_saturn.sl:60:   * Step 2: Assign a climite type, roughly by latitude.
k3d/share/shaders/k3d_saturn.sl:84:  /* Shade using matte model */
k3d/share/shaders/k3d_saturnring.sl:5: *	When put on a disk will give a "saturn-like ringed" apearence with
k3d/share/shaders/k3d_saturnring.sl:9: *	Ka, Kd - the usual
k3d/share/shaders/k3d_saturnring.sl:10: *	cutoff - what point to start rings (radius of transparency)
k3d/share/shaders/k3d_saturnring.sl:12: *	opacity - the opacity of the rings (may not be used anymore)
k3d/share/shaders/k3d_saturnring.sl:15: *	The default values assume that the disk has a radius of one.  If it is
k3d/share/shaders/k3d_saturnring.sl:16: *  otherwise then they will neeb to be changed.
k3d/share/shaders/k3d_saturnring.sl:19: *	tal@SpamSucks_cs.caltech.edu
k3d/share/shaders/k3d_saturnring.sl:31:/* Grabbed from one of Larry Gritz's many shaders */
k3d/share/shaders/k3d_saturnring.sl:35:/* prman noise has less range */
k3d/share/shaders/k3d_saturnring.sl:43:	point Nf;       /* Forward facing Normalized vector of incident light */
k3d/share/shaders/k3d_saturnring.sl:44:	float val;      /* length of PP */
k3d/share/shaders/k3d_saturnring.sl:47:	float oi = 0.0; /* Opacity holder */
k3d/share/shaders/k3d_saturnring.sl:48:	color cs;	    /* color holder */
k3d/share/shaders/k3d_saturnring.sl:49:	color dgrey = color (.266, .266, .266);      /* A shade of dark grey */
k3d/share/shaders/k3d_saturnring.sl:50:	color dyellow = color (.73, .664, .398);     /* A shade of dark yellow */
k3d/share/shaders/k3d_saturnring.sl:51:	color dpink = color (.664, .465,  .465);     /* A shade of dark pink */
k3d/share/shaders/k3d_saturnring.sl:52:	color mutedgreen = color (.531, .531, .398); /* A shade of muted green */
k3d/share/shaders/k3d_saturnring.sl:54:	PP = transform ("shader", P);
k3d/share/shaders/k3d_saturnring.sl:55:	val= length (PP);
k3d/share/shaders/k3d_saturnring.sl:64:		/* Creating an inner disk that is transparent to place the planet */
k3d/share/shaders/k3d_scartissue.sl:3: *  feel free to copy, distribute, hack and/or abuse this code 
k3d/share/shaders/k3d_scartissue.sl:4: *  in any way you see fit, but please leave my name near the top
k3d/share/shaders/k3d_scartissue.sl:11:		roughness		= .2; 
k3d/share/shaders/k3d_scartissue.sl:14:	point Psh = transform("object",P);
k3d/share/shaders/k3d_scartissue.sl:17:	color light = color (1,.3,.2);
k3d/share/shaders/k3d_scartissue.sl:25:		nz += abs(.5 - noise( (freq * Psh)+offset)) / freq;
k3d/share/shaders/k3d_scartissue.sl:29:	base = mix(dark,light,nz);
k3d/share/shaders/k3d_scartissue.sl:35:	 	(1-nz)*Ks * specular(Nf,V,roughness) );
k3d/share/shaders/k3d_screen.sl:1:/* screen.sl - RenderMan compatible shader for a metalic screen.
k3d/share/shaders/k3d_screen.sl:6: *   Makes a surface that looks like a metal screen.  Strips of metal run
k3d/share/shaders/k3d_screen.sl:7: *   parallel to lines of s and t.  You can adjust the Ka, Kd, Ks, etc.
k3d/share/shaders/k3d_screen.sl:8: *   to change the material appearance.
k3d/share/shaders/k3d_screen.sl:11: *   Ka, Kd, Ks, roughness, specularcolor - work just like the plastic shader
k3d/share/shaders/k3d_screen.sl:12: *   frequency - how many cycles of screen in st space
k3d/share/shaders/k3d_screen.sl:13: *   density - how much of each cycle is opaque?
k3d/share/shaders/k3d_screen.sl:16: *   No antialiasing is performed here.
k3d/share/shaders/k3d_screen.sl:18: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_screen.sl:19: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_screen.sl:24:surface k3d_screen(float Ka = 1, Kd = 0.75, Ks = 0.4, roughness = 0.1;
k3d/share/shaders/k3d_screen.sl:36:	      specularcolor * Ks * specular(Nf, -normalize(I), roughness));
k3d/share/shaders/k3d_screen_aa.sl:2: * screen_aa.sl -- RenderMan compatible shader for a metalic screen.
k3d/share/shaders/k3d_screen_aa.sl:5: *   Makes a surface that looks like a metal screen.  Strips of metal run
k3d/share/shaders/k3d_screen_aa.sl:6: *   parallel to lines of s and t.  You can adjust the Ka, Kd, Ks, etc.
k3d/share/shaders/k3d_screen_aa.sl:7: *   to change the material appearance.  This texture antialiases pretty
k3d/share/shaders/k3d_screen_aa.sl:8: *   well, even with only one sample per pixel.
k3d/share/shaders/k3d_screen_aa.sl:11: *   Ka, Kd, Ks, roughness, specularcolor - work just like the plastic shader
k3d/share/shaders/k3d_screen_aa.sl:12: *   frequency - how many cycles of screen in st space
k3d/share/shaders/k3d_screen_aa.sl:13: *   density - how much of each cycle is opaque?
k3d/share/shaders/k3d_screen_aa.sl:20: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_screen_aa.sl:21: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_screen_aa.sl:30:surface k3d_screen_aa(float Ka = 1, Kd = 0.75, Ks = 0.4, roughness = 0.1;
k3d/share/shaders/k3d_screen_aa.sl:36:  float d;			/* Density at the sample point */
k3d/share/shaders/k3d_screen_aa.sl:37:  float ss, tt;			/* s,t, parameters in phase */
k3d/share/shaders/k3d_screen_aa.sl:38:  float swidth, twidth, GWF, w, h;
k3d/share/shaders/k3d_screen_aa.sl:44:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_screen_aa.sl:45:  swidth = max(abs(Du(s) * du) + abs(Dv(s) * dv), MINFILTERWIDTH) * frequency;
k3d/share/shaders/k3d_screen_aa.sl:46:  twidth = max(abs(Du(t) * du) + abs(Dv(t) * dv), MINFILTERWIDTH) * frequency;
k3d/share/shaders/k3d_screen_aa.sl:48:  /* Figure out where in the pattern we are */
k3d/share/shaders/k3d_screen_aa.sl:52:  /* Figure out where the strips are. Do some simple antialiasing. */
k3d/share/shaders/k3d_screen_aa.sl:54:  if(swidth >= 1)
k3d/share/shaders/k3d_screen_aa.sl:58:      clamp(boxstep(GWF - swidth, GWF, ss), max(1 - GWF / swidth, 0),
k3d/share/shaders/k3d_screen_aa.sl:59:	    1) - clamp(boxstep(1 - GWF - swidth, 1 - GWF, ss), 0,
k3d/share/shaders/k3d_screen_aa.sl:60:		       2 * GWF / swidth);
k3d/share/shaders/k3d_screen_aa.sl:61:  if(twidth >= 1)
k3d/share/shaders/k3d_screen_aa.sl:62:    h = 1 - 2 * GWF;
k3d/share/shaders/k3d_screen_aa.sl:64:    h =
k3d/share/shaders/k3d_screen_aa.sl:65:      clamp(boxstep(GWF - twidth, GWF, tt), max(1 - GWF / twidth, 0),
k3d/share/shaders/k3d_screen_aa.sl:66:	    1) - clamp(boxstep(1 - GWF - twidth, 1 - GWF, tt), 0,
k3d/share/shaders/k3d_screen_aa.sl:67:		       2 * GWF / twidth);
k3d/share/shaders/k3d_screen_aa.sl:68:  /* This would be the non-antialiased version:
k3d/share/shaders/k3d_screen_aa.sl:70:   *    h = step (GWF,tt) - step(1-GWF,tt);
k3d/share/shaders/k3d_screen_aa.sl:72:  d = 1 - w * h;
k3d/share/shaders/k3d_screen_aa.sl:79:	      specularcolor * Ks * specular(Nf, -IN, roughness));
k3d/share/shaders/k3d_sdixon.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_sdixon.sl:2:/* From the RenderMan Companion p.384 */
k3d/share/shaders/k3d_sdixon.sl:3:/* Listing 16.37  Pencil-labeling surface shader*/
k3d/share/shaders/k3d_sdixon.sl:6: * sdixon(): Paint the body of a pencil.
k3d/share/shaders/k3d_sdixon.sl:13:	 	roughness 	= .25;
k3d/share/shaders/k3d_sdixon.sl:23:	/* This shader uses a single-channel texture map to apply a 
k3d/share/shaders/k3d_sdixon.sl:26:	/* Get the amount of ink from texture file. */
k3d/share/shaders/k3d_sdixon.sl:32:	/* Compute the output color. Notice that as ink goes from zero to
k3d/share/shaders/k3d_sdixon.sl:33:	   one, the diffuse component goes to zero and the specular 
k3d/share/shaders/k3d_sdixon.sl:34:	   component is increased. This has the effect of transitioning
k3d/share/shaders/k3d_sdixon.sl:38:					ink*Ks*specular(Nf,V,roughness) ) ;
k3d/share/shaders/k3d_shadowdistant_rim.sl:1:/* renamed from MKshadowdistant_rim.sl */
k3d/share/shaders/k3d_shadowdistant_rim.sl:3:light
k3d/share/shaders/k3d_shadowdistant_rim.sl:4:k3d_shadowdistant_rim( 
k3d/share/shaders/k3d_shadowdistant_rim.sl:6:    color  lightcolor=1 ; 
k3d/share/shaders/k3d_shadowdistant_rim.sl:7:    point from = point "shader" (0,0,0) ;
k3d/share/shaders/k3d_shadowdistant_rim.sl:8:    point to   = point "shader" (0,0,1) ;
k3d/share/shaders/k3d_shadowdistant_rim.sl:9:    string shadowname="";
k3d/share/shaders/k3d_shadowdistant_rim.sl:11:    float width=1;
k3d/share/shaders/k3d_shadowdistant_rim.sl:12:    float __rimlight = 0;
k3d/share/shaders/k3d_shadowdistant_rim.sl:18:        Cl = intensity * lightcolor;
k3d/share/shaders/k3d_shadowdistant_rim.sl:19:        if (shadowname != "") {
k3d/share/shaders/k3d_shadowdistant_rim.sl:20:                Cl *= 1 - shadow(shadowname, Ps, "samples", samples,
k3d/share/shaders/k3d_shadowdistant_rim.sl:21:                        "swidth", width, "twidth", width);
k3d/share/shaders/k3d_shadowspot.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_shadowspot.sl:2:/* From the RenderMan Companion p.380 */
k3d/share/shaders/k3d_shadowspot.sl:3:/* Listing 16.33  Spotlight using shadow map*/
k3d/share/shaders/k3d_shadowspot.sl:6: *  shadowspot(): spotlight with an optional shadow map
k3d/share/shaders/k3d_shadowspot.sl:8:light k3d_shadowspot( 
k3d/share/shaders/k3d_shadowspot.sl:10:	color lightcolor = 1;
k3d/share/shaders/k3d_shadowspot.sl:11:	point from = point "shader" (0, 0, 0);
k3d/share/shaders/k3d_shadowspot.sl:12:	point to = point "shader" (0, 0, 1);
k3d/share/shaders/k3d_shadowspot.sl:16:	string shadowfile = "";
k3d/share/shaders/k3d_shadowspot.sl:21:	point A = (to - from) / length(to - from); /* direction */
k3d/share/shaders/k3d_shadowspot.sl:28:		cosangle = L.A / length(L);	/* A is already normalized */
k3d/share/shaders/k3d_shadowspot.sl:30:		attenuation *= smoothstep( cosoutside, cosinside, cosangle );
k3d/share/shaders/k3d_shadowspot.sl:31:		if( shadowfile != "" )
k3d/share/shaders/k3d_shadowspot.sl:32:		    attenuation *= (1.0 - shadow( shadowfile, Ps, "samples", samples, "blur", blur, "bias", bias ));
k3d/share/shaders/k3d_shadowspot.sl:33:		Cl = attenuation * intensity * lightcolor;
k3d/share/shaders/k3d_shifteddrtile.sl:2: * TLShiftedD_RTile.sl -- generates a surface of alternating disks and rings
k3d/share/shaders/k3d_shifteddrtile.sl:5: *	Will generate alternating and shifted rows of disks and rings
k3d/share/shaders/k3d_shifteddrtile.sl:9: *	Ka, Kd, Ks - the usual
k3d/share/shaders/k3d_shifteddrtile.sl:10: *  roughness -  Contols the specular reflection
k3d/share/shaders/k3d_shifteddrtile.sl:17: *	specularcolor - color of specular highlight
k3d/share/shaders/k3d_shifteddrtile.sl:20: *	The center varible should really be placed in the parameter list 
k3d/share/shaders/k3d_shifteddrtile.sl:21: *      (remember to set the right space)
k3d/share/shaders/k3d_shifteddrtile.sl:22: *  Also, it would be better to set the width of the ring rather than
k3d/share/shaders/k3d_shifteddrtile.sl:23: *      specifing the inner and outer ring.
k3d/share/shaders/k3d_shifteddrtile.sl:24: *  Another thing that might be useful is to add a parameter to 
k3d/share/shaders/k3d_shifteddrtile.sl:25: *      choose which row to do first.
k3d/share/shaders/k3d_shifteddrtile.sl:28: *	tal@SpamSucks_cs.caltech.edu
k3d/share/shaders/k3d_shifteddrtile.sl:33:#define smoothPulse(a, b, fuzz, loc) \
k3d/share/shaders/k3d_shifteddrtile.sl:34:	(smoothstep (a-fuzz, a+fuzz, loc) - \
k3d/share/shaders/k3d_shifteddrtile.sl:35:	smoothstep (b-fuzz, b+fuzz, loc) )
k3d/share/shaders/k3d_shifteddrtile.sl:40:#define whichtile(pos, freq) \
k3d/share/shaders/k3d_shifteddrtile.sl:47:k3d_shifteddrtile (
k3d/share/shaders/k3d_shifteddrtile.sl:51:	uniform float roughness = .1;
k3d/share/shaders/k3d_shifteddrtile.sl:63:	float mix_opacity; /* How much to mix between the surfaces */
k3d/share/shaders/k3d_shifteddrtile.sl:65:	float row, col;    /* used to determine which tile we are in */
k3d/share/shaders/k3d_shifteddrtile.sl:72:	center = (0.5, 0.5, 0);  /* This should really be */
k3d/share/shaders/k3d_shifteddrtile.sl:73:	                         /* put in the paramter list */
k3d/share/shaders/k3d_shifteddrtile.sl:75: 	row = whichtile (t, tfreq);
k3d/share/shaders/k3d_shifteddrtile.sl:91:		mix_opacity = smoothPulse (innerRadius, outerRadius, fuzz, d);
k3d/share/shaders/k3d_shifteddrtile.sl:94:		mix_opacity = 1 - smoothstep (outerRadius-fuzz, outerRadius+fuzz, d);
k3d/share/shaders/k3d_shifteddrtile.sl:101:	      specularcolor * Ks*specular(Nf,-normalize(I),roughness));
k3d/share/shaders/k3d_shiftedmoontile.sl:2: * TLShiftedMoonTile.sl -- shifted tile of cresent moons
k3d/share/shaders/k3d_shiftedmoontile.sl:5: *	Tile of shifted  cresent moons (disks)
k3d/share/shaders/k3d_shiftedmoontile.sl:8: *	Ka, Kd, Ks - the usual
k3d/share/shaders/k3d_shiftedmoontile.sl:9: *  roughness - Contols the specular reflection
k3d/share/shaders/k3d_shiftedmoontile.sl:16: *	specularcolor - color of specular highlight
k3d/share/shaders/k3d_shiftedmoontile.sl:19: *	Really should move center to the paramter list so both centers 
k3d/share/shaders/k3d_shiftedmoontile.sl:23: *	tal@SpamSucks_cs.caltech.edu
k3d/share/shaders/k3d_shiftedmoontile.sl:28:#define smoothPulse(a, b, fuzz, loc) \
k3d/share/shaders/k3d_shiftedmoontile.sl:29:	(smoothstep (a-fuzz, a+fuzz, loc) - \
k3d/share/shaders/k3d_shiftedmoontile.sl:30:	smoothstep (b-fuzz, b+fuzz, loc) )
k3d/share/shaders/k3d_shiftedmoontile.sl:35:#define whichtile(pos, freq) \
k3d/share/shaders/k3d_shiftedmoontile.sl:44:k3d_shiftedmoontile (
k3d/share/shaders/k3d_shiftedmoontile.sl:48:	uniform float roughness = .1;
k3d/share/shaders/k3d_shiftedmoontile.sl:60:	float mix_opacity;       /* How much to mix between the surfaces */
k3d/share/shaders/k3d_shiftedmoontile.sl:68:	center = (0.5, 0.5, 0);  /* This should really be moved */
k3d/share/shaders/k3d_shiftedmoontile.sl:69:	                         /*  to the paramter list */
k3d/share/shaders/k3d_shiftedmoontile.sl:71: 	row = whichtile (t, tfreq);
k3d/share/shaders/k3d_shiftedmoontile.sl:82:	circle1 = 1 - smoothstep (radius - fuzz, radius + fuzz, d);
k3d/share/shaders/k3d_shiftedmoontile.sl:83:	circle2 = 1 - smoothstep (radius - fuzz, radius + fuzz, d2);
k3d/share/shaders/k3d_shiftedmoontile.sl:89:	      specularcolor * Ks*specular(Nf,-normalize(I),roughness));
k3d/share/shaders/k3d_shiny.sl:2: * shiny.sl -- Shiny metal surface
k3d/share/shaders/k3d_shiny.sl:5: *    Ka, Kd, Ks, roughness - The usual meaning
k3d/share/shaders/k3d_shiny.sl:7: *    blur - how blurry are the reflections? (0 = perfectly sharp)
k3d/share/shaders/k3d_shiny.sl:10: *    twosided - if nonzero both sides of the surface are shiny, otherwise
k3d/share/shaders/k3d_shiny.sl:11: *        only the "outside" (where the surface normal points) will
k3d/share/shaders/k3d_shiny.sl:12: *        spawn rays.  This can be an important optimization, especially
k3d/share/shaders/k3d_shiny.sl:13: *        when using the "ray server."
k3d/share/shaders/k3d_shiny.sl:17: * Author: Larry Gritz (gritzl@acm.org).
k3d/share/shaders/k3d_shiny.sl:21: *   by Anthony A. Apodaca and Larry Gritz, Morgan Kaufmann, 1999.
k3d/share/shaders/k3d_shiny.sl:27:/* Get rid of rayserver.h if you don't want PRMan and BMRT to work together */
k3d/share/shaders/k3d_shiny.sl:28:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_shiny.sl:29:#include "k3d_material.h"
k3d/share/shaders/k3d_shiny.sl:33:surface k3d_shiny(float Ka = 1, Kd = 0.1, Ks = 1, roughness = 0.2;
k3d/share/shaders/k3d_shiny.sl:39:    MaterialShinyMetal(Nf, Cs, Ka, Kd, Ks, roughness, Kr, blur, twosided,
k3d/share/shaders/k3d_shinymetal.sl:1:/* shinymetal.sl - Standard metal with environment mapping for
k3d/share/shaders/k3d_shinymetal.sl:3: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_shinymetal.sl:5: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_shinymetal.sl:6: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_shinymetal.sl:10:surface k3d_shinymetal(float Ka = 1;
k3d/share/shaders/k3d_shinymetal.sl:11:		       float Ks = 1; float Kr = 1; float roughness = .1;
k3d/share/shaders/k3d_shinymetal.sl:29:  Ci = Os * Cs * (Ka * ambient() + Ks * specular(Nf, -V, roughness) + env);
k3d/share/shaders/k3d_shinyplastic.sl:2: * shinyplastic.sl -- Shiny plastic surface
k3d/share/shaders/k3d_shinyplastic.sl:5: *    Ka, Kd, Ks, roughness - The usual meaning
k3d/share/shaders/k3d_shinyplastic.sl:7: *    blur - how blurry are the reflections? (0 = perfectly sharp)
k3d/share/shaders/k3d_shinyplastic.sl:11: *    twosided - if nonzero both sides of the surface are shiny, otherwise
k3d/share/shaders/k3d_shinyplastic.sl:12: *        only the "outside" (where the surface normal points) will
k3d/share/shaders/k3d_shinyplastic.sl:13: *        spawn rays.  This can be an important optimization, especially
k3d/share/shaders/k3d_shinyplastic.sl:14: *        when using the "ray server."
k3d/share/shaders/k3d_shinyplastic.sl:18: * Author: Larry Gritz (lg@bmrt.org)
k3d/share/shaders/k3d_shinyplastic.sl:24:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_shinyplastic.sl:25:#include "k3d_material.h"
k3d/share/shaders/k3d_shinyplastic.sl:27:surface k3d_shinyplastic(float Ka = 1, Kd = 0.5, Ks = .5, roughness = 0.1;
k3d/share/shaders/k3d_shinyplastic.sl:35:    MaterialShinyPlastic(Nf, Cs, Ka, Kd, Ks, roughness, Kr, blur, ior,
k3d/share/shaders/k3d_show_st.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_show_st.sl:2:/* From the RenderMan Companion p.344 */
k3d/share/shaders/k3d_show_st.sl:3:/* Listing 16.11  Shader mapping texture-space coordinates to colors */
k3d/share/shaders/k3d_show_st.sl:6: * show_st(): color surface point according to its s,t coordinates.
k3d/share/shaders/k3d_show_st.sl:9:k3d_show_st()
k3d/share/shaders/k3d_skin1.sl:4: * Copyright (C) 2002, Rudy Cortes   rcortes@hntb.com
k3d/share/shaders/k3d_skin1.sl:7: * This software is placed in the public domain and is provided as is 
k3d/share/shaders/k3d_skin1.sl:8: * without express or implied warranty. 
k3d/share/shaders/k3d_skin1.sl:10: * Surface shader that implements a shading model that should have a visual 
k3d/share/shaders/k3d_skin1.sl:11: * appearence generall similar to that of skin. 
k3d/share/shaders/k3d_skin1.sl:13: * Feel free to use this shader to create skin for any character, anywhere and
k3d/share/shaders/k3d_skin1.sl:14: * everywhere, Just list me on the credits under "Shading Team"
k3d/share/shaders/k3d_skin1.sl:17: * Kd = the amount of uniform diffusion applyied to the skin
k3d/share/shaders/k3d_skin1.sl:18: * skincolor, skinmap = the color of the skin. Using a map overrides original skincolor
k3d/share/shaders/k3d_skin1.sl:20: * sheencolor, shinmap = the color of the skin at grazing angles. Using a map overrides
k3d/share/shaders/k3d_skin1.sl:21: * original sheencolor color value.
k3d/share/shaders/k3d_skin1.sl:22: * blemishfreq, blemishthresh,blemhishopac = control the freqency, threshold and opacity
k3d/share/shaders/k3d_skin1.sl:23: * of blemishes on the skin. Use to give skin a little variation.
k3d/share/shaders/k3d_skin1.sl:24: * blemishmap = Use a grayscale map to control where the belmishes will be more visible
k3d/share/shaders/k3d_skin1.sl:25: * xdir, angle = control the direction of the specular highlights.
k3d/share/shaders/k3d_skin1.sl:26: * Oily,oilmap = controls how oily the skin looks. Use a grayscale map to contol
k3d/share/shaders/k3d_skin1.sl:27: * oiliness.---Note--- teh oiliy parameter is multiplied with the map.
k3d/share/shaders/k3d_skin1.sl:28: * xroughness,yroughness = how rough is the specular highlight on x and Y?
k3d/share/shaders/k3d_skin1.sl:29: * poresfreq, poresthresh poresdepth = control the frequency, threshold and depth of the
k3d/share/shaders/k3d_skin1.sl:33: * You can replace the header functions by using
k3d/share/shaders/k3d_skin1.sl:34: * #include "locilum.h" and #include "noises.h".
k3d/share/shaders/k3d_skin1.sl:35: * NOTE- you must copy the entire subsurface skin function to your
k3d/share/shaders/k3d_skin1.sl:36: * "locIllum.h" file
k3d/share/shaders/k3d_skin1.sl:40: * Modification history:
k3d/share/shaders/k3d_skin1.sl:43: *     Made changes so would compile.
k3d/share/shaders/k3d_skin1.sl:53: /*---------FROM BMRT's locillum.h-----
k3d/share/shaders/k3d_skin1.sl:55: * The derivation and formulae can be found in:  Ward, Gregory J.
k3d/share/shaders/k3d_skin1.sl:57: * Graphics 26(2) (Proceedings of Siggraph '92), pp. 265-272, July, 1992.
k3d/share/shaders/k3d_skin1.sl:62:                         vector xdir;  float xroughness, yroughness;)
k3d/share/shaders/k3d_skin1.sl:66:    float cos_theta_r = clamp (N.V, 0.0001, 1);
k3d/share/shaders/k3d_skin1.sl:67:    vector X = xdir / xroughness;
k3d/share/shaders/k3d_skin1.sl:68:    vector Y = (N ^ xdir) / yroughness;
k3d/share/shaders/k3d_skin1.sl:76:  lightsource ("__nonspecular", nonspec);
k3d/share/shaders/k3d_skin1.sl:79:      float cos_theta_i = LN . N;
k3d/share/shaders/k3d_skin1.sl:80:      if (cos_theta_i > 0.0) {
k3d/share/shaders/k3d_skin1.sl:82:    float rho = exp (-2 * (sqr(X.H) + sqr(Y.H)) / (1 + H.N))
k3d/share/shaders/k3d_skin1.sl:83:        / sqrt (cos_theta_i * cos_theta_r);
k3d/share/shaders/k3d_skin1.sl:84:    C += Cl * ((1-nonspec) * cos_theta_i * rho);
k3d/share/shaders/k3d_skin1.sl:88:    return C / (4 * xroughness * yroughness);
k3d/share/shaders/k3d_skin1.sl:89:}    /*---locillum.h ends---*/
k3d/share/shaders/k3d_skin1.sl:92:/* ------ ADAPTED FROM Mat Pahr's Skin.sl------
k3d/share/shaders/k3d_skin1.sl:94: * Surface shader that implements a shading model that should have a visual 
k3d/share/shaders/k3d_skin1.sl:95: * appearence generall similar to that of skin.  Based on phenomenological 
k3d/share/shaders/k3d_skin1.sl:96: * information about skin reflectance from Hanrahan and Krueger, 
k3d/share/shaders/k3d_skin1.sl:98: * proceedings of Siggraph 1993.
k3d/share/shaders/k3d_skin1.sl:100:/* Evaluate the Henyey-Greenstein phase function for two vectors with
k3d/share/shaders/k3d_skin1.sl:101:   an asymmetry value g.  v1 and v2 should be normalized and g should 
k3d/share/shaders/k3d_skin1.sl:102:   be in the range (-1, 1).  Negative values of g correspond to more
k3d/share/shaders/k3d_skin1.sl:105:float phase(vector v1, v2; float g) {
k3d/share/shaders/k3d_skin1.sl:106:  float costheta = -v1 . v2;
k3d/share/shaders/k3d_skin1.sl:107:  return (1. - g*g) / pow(1. + g*g - 2.*g*costheta, 1.5);
k3d/share/shaders/k3d_skin1.sl:110:/* Compute a the single-scattering approximation to scattering from
k3d/share/shaders/k3d_skin1.sl:113:   scattering albedo (between 0 and 1 for physically-valid volumes),
k3d/share/shaders/k3d_skin1.sl:114:   and the thickness of the volume, use the closed-form single-scattering
k3d/share/shaders/k3d_skin1.sl:117:float singleScatter(vector wi, wo; normal n; float g, albedo, thickness) {
k3d/share/shaders/k3d_skin1.sl:121:    return albedo * phase(wo, wi, g) / (win + won) *
k3d/share/shaders/k3d_skin1.sl:122:    (1. - exp(-(1/win + 1/won) * thickness));
k3d/share/shaders/k3d_skin1.sl:128:    Kr = smoothstep(0., .5, Kr);
k3d/share/shaders/k3d_skin1.sl:133:/* Implements overall skin subsurface shading model.  Takes viewing and
k3d/share/shaders/k3d_skin1.sl:134:   surface normal information, the base color of the skin, a
k3d/share/shaders/k3d_skin1.sl:135:   color for an oily surface sheen.
k3d/share/shaders/k3d_skin1.sl:137:color subsurfaceSkin(vector Vf; normal Nn; color skinColor, sheenColor;
k3d/share/shaders/k3d_skin1.sl:138:                     float eta, thickness) {
k3d/share/shaders/k3d_skin1.sl:150:    C += Kr * sheenColor * Cl * (Ln . Nn) * pow(H . Nn, 4.);
k3d/share/shaders/k3d_skin1.sl:151:      C += Kr * sheenColor * Cl * (Ln . Nn) * .2;
k3d/share/shaders/k3d_skin1.sl:155:    (singleScatter(T, T2, Nn, .8, .8, thickness) +
k3d/share/shaders/k3d_skin1.sl:156:     singleScatter(T, T2, Nn, .3, .5, thickness) +
k3d/share/shaders/k3d_skin1.sl:157:     singleScatter(T, T2, Nn, 0., .4, thickness));
k3d/share/shaders/k3d_skin1.sl:167: *shader beggins here.
k3d/share/shaders/k3d_skin1.sl:174:  color sheenColor = 1.;
k3d/share/shaders/k3d_skin1.sl:175:  string sheenmap = "";
k3d/share/shaders/k3d_skin1.sl:176:  float blemishfreq  = 12,
k3d/share/shaders/k3d_skin1.sl:177:        belmishthresh = 4,
k3d/share/shaders/k3d_skin1.sl:178:        blemishopac = 1;
k3d/share/shaders/k3d_skin1.sl:179:  string blemishmap = "";
k3d/share/shaders/k3d_skin1.sl:181:        thickness = 1;
k3d/share/shaders/k3d_skin1.sl:186:  float xroughness = .3,
k3d/share/shaders/k3d_skin1.sl:187:        yroughness = .5;
k3d/share/shaders/k3d_skin1.sl:189:        poresthresh = 3,
k3d/share/shaders/k3d_skin1.sl:190:        poresdepth = -0.001;)
k3d/share/shaders/k3d_skin1.sl:205:  color Csheen = sheenColor;
k3d/share/shaders/k3d_skin1.sl:209:  /*--- layer 1 - add pores to the skin*/
k3d/share/shaders/k3d_skin1.sl:211:  PP = transform ("shader",P) * poresfreq;
k3d/share/shaders/k3d_skin1.sl:216:  turb = pow(turb,poresthresh) * poresdepth;
k3d/share/shaders/k3d_skin1.sl:223:  /* layer 1 .- apply a subsurface scattered BRDF to the surface.
k3d/share/shaders/k3d_skin1.sl:224:   * you can use an image map for the color of the skin and the sheen.
k3d/share/shaders/k3d_skin1.sl:225:   * If the map is not provided use defined colors*/
k3d/share/shaders/k3d_skin1.sl:230:  if ( sheenmap != "")
k3d/share/shaders/k3d_skin1.sl:231:      Csheen = color texture(sheenmap);
k3d/share/shaders/k3d_skin1.sl:235:  /* layer 2 - create small skin blemishes over the skin. Use a map to control
k3d/share/shaders/k3d_skin1.sl:236:   * where the blemishes are visible */
k3d/share/shaders/k3d_skin1.sl:238:  PP = transform ("shader",P) * blemishfreq;
k3d/share/shaders/k3d_skin1.sl:243:  turb = pow(turb, belmishthresh );
k3d/share/shaders/k3d_skin1.sl:251:  color blemishcol = color spline ( turb,
k3d/share/shaders/k3d_skin1.sl:264:  lc =  subsurfaceSkin(Vf, Nf, blemishcol, Csheen, 1/eta, thickness);
k3d/share/shaders/k3d_skin1.sl:265:  lo = 1 * (blemishopac) ;
k3d/share/shaders/k3d_skin1.sl:267:  if (blemishmap != "")
k3d/share/shaders/k3d_skin1.sl:268:      lo *= float texture (blemishmap);
k3d/share/shaders/k3d_skin1.sl:272:  /* --Layer 3-- apply an Anisotropic BRDF to simulate the oil layer that lies
k3d/share/shaders/k3d_skin1.sl:273:  * outside the skin. Oilyness is controlled by the oily, xrougness and yroughness.
k3d/share/shaders/k3d_skin1.sl:283:  lc = LocIllumWardAnisotropic(Nf,Vf,anisoDir,xroughness,yroughness);
k3d/share/shaders/k3d_skin2.sl:4: * Copyright (C) 2000-2001, Matt Pharr <mmp@SpamSucks_Exluna.com> 
k3d/share/shaders/k3d_skin2.sl:6: * This software is placed in the public domain and is provided as is 
k3d/share/shaders/k3d_skin2.sl:7: * without express or implied warranty. 
k3d/share/shaders/k3d_skin2.sl:9: * Surface shader that implements a shading model that should have a visual 
k3d/share/shaders/k3d_skin2.sl:10: * appearence generall similar to that of skin.  Based on phenomenological 
k3d/share/shaders/k3d_skin2.sl:11: * information about skin reflectance from Hanrahan and Krueger, 
k3d/share/shaders/k3d_skin2.sl:13: * proceedings of Siggraph 1993. 
k3d/share/shaders/k3d_skin2.sl:19:/* Evaluate the Henyey-Greenstein phase function for two vectors with
k3d/share/shaders/k3d_skin2.sl:20:   an asymmetry value g.  v1 and v2 should be normalized and g should 
k3d/share/shaders/k3d_skin2.sl:21:   be in the range (-1, 1).  Negative values of g correspond to more
k3d/share/shaders/k3d_skin2.sl:24:float phase(vector v1, v2; float g) {
k3d/share/shaders/k3d_skin2.sl:25:	float costheta = -v1 . v2;
k3d/share/shaders/k3d_skin2.sl:26:	return (1. - g*g) / pow(1. + g*g - 2.*g*costheta, 1.5);
k3d/share/shaders/k3d_skin2.sl:29:/* Compute a the single-scattering approximation to scattering from
k3d/share/shaders/k3d_skin2.sl:32:   scattering albedo (between 0 and 1 for physically-valid volumes),
k3d/share/shaders/k3d_skin2.sl:33:   and the thickness of the volume, use the closed-form single-scattering
k3d/share/shaders/k3d_skin2.sl:36:float singleScatter(vector wi, wo; normal n; float g, albedo, thickness) {
k3d/share/shaders/k3d_skin2.sl:40:    return albedo * phase(wo, wi, g) / (win + won) *
k3d/share/shaders/k3d_skin2.sl:41:		(1. - exp(-(1/win + 1/won) * thickness));
k3d/share/shaders/k3d_skin2.sl:48:    Kr = smoothstep(0., .5, Kr);
k3d/share/shaders/k3d_skin2.sl:54:/* Implements overall skin subsurface shading model.  Takes viewing and
k3d/share/shaders/k3d_skin2.sl:55:   surface normal information, the base color of the skin, a
k3d/share/shaders/k3d_skin2.sl:56:   color for an oily surface sheen, the ratio of the indices of 
k3d/share/shaders/k3d_skin2.sl:57:   refraction of the incoming ray (typically ~1 for air) to the index
k3d/share/shaders/k3d_skin2.sl:58:   of refraction for the transmitted ray (say something like 1.4 for
k3d/share/shaders/k3d_skin2.sl:59:   skin), and the overall thickness of the skin layer.  Then loops
k3d/share/shaders/k3d_skin2.sl:60:   over light sources with illuminance() and computes the reflected
k3d/share/shaders/k3d_skin2.sl:63:color subsurfaceSkin(vector Vf; normal Nn; color skinColor, sheenColor;
k3d/share/shaders/k3d_skin2.sl:64:                     float eta, thickness) {
k3d/share/shaders/k3d_skin2.sl:76:		C += Kr * sheenColor * Cl * (Ln . Nn) * pow(H . Nn, 4.);
k3d/share/shaders/k3d_skin2.sl:77:	    C += Kr * sheenColor * Cl * (Ln . Nn) * .2;
k3d/share/shaders/k3d_skin2.sl:81:		(singleScatter(T, T2, Nn, .8, .8, thickness) +
k3d/share/shaders/k3d_skin2.sl:82:		 singleScatter(T, T2, Nn, .3, .5, thickness) +
k3d/share/shaders/k3d_skin2.sl:83:		 singleScatter(T, T2, Nn, 0., .4, thickness));
k3d/share/shaders/k3d_skin2.sl:88:/* Basic surface shader that uses the skin reflection model implemented
k3d/share/shaders/k3d_skin2.sl:89:   above.  Uses Cs for the basic color of the skin (.8, .5, .5) works
k3d/share/shaders/k3d_skin2.sl:92:surface k3d_skin2(color Ka = .5; color sheenColor = 1.;
k3d/share/shaders/k3d_skin2.sl:93:             float eta = 1./1.4, thickness = .5) {
k3d/share/shaders/k3d_skin2.sl:98:	Ci = Os * subsurfaceSkin(Vf, Nn, Cs, sheenColor, eta, thickness);
k3d/share/shaders/k3d_skymetal.sl:1:/* skymetal shader 
k3d/share/shaders/k3d_skymetal.sl:2: * from p. 103 of Siggraph 1991 Course 21
k3d/share/shaders/k3d_skymetal.sl:3: * The RenderMan Interface and Shading Language
k3d/share/shaders/k3d_skymetal.sl:5: * NOTE: This shader was created at a time when the shading lanuage
k3d/share/shaders/k3d_skymetal.sl:6: *   didn't support vector the vector type.  
k3d/share/shaders/k3d_skymetal.sl:8: * A more general version with some explainations can be found in my
k3d/share/shaders/k3d_skymetal.sl:9: * TLSkymetal shader.  Actually, I never could get this oneto work right,
k3d/share/shaders/k3d_skymetal.sl:12: * tal@SpamSucks_cs.caltech.edu
k3d/share/shaders/k3d_skymetal.sl:17:  float roughness = .1;
k3d/share/shaders/k3d_skymetal.sl:19:             /* actually should be vector and vtransform if using 3.5 or 
k3d/share/shaders/k3d_skymetal.sl:26:	float costheta;
k3d/share/shaders/k3d_skymetal.sl:28:	color sky_zenith = color (0.125, 0.162, 0.5);
k3d/share/shaders/k3d_skymetal.sl:29:	color sky_horiz = color (.4, .45, .8);
k3d/share/shaders/k3d_skymetal.sl:30:	color land_horiz = color (.0281, 0.0287, 0.0220);
k3d/share/shaders/k3d_skymetal.sl:31:	color land_zenith = color (0, 0, 0);
k3d/share/shaders/k3d_skymetal.sl:35:	costheta = normalize (reflect (I, Nf)) . up;
k3d/share/shaders/k3d_skymetal.sl:37:	if (costheta >= 0.0)
k3d/share/shaders/k3d_skymetal.sl:38:		refl = mix (sky_horiz, sky_zenith, costheta);
k3d/share/shaders/k3d_skymetal.sl:40:		refl = mix (land_horiz, land_zenith, -costheta);
k3d/share/shaders/k3d_skymetal.sl:44:		Ks * specular (Nf, -I, roughness)));
k3d/share/shaders/k3d_slateroof.sl:4:	slateroof.sl - a surface shader working with slateroofd.sl, to
k3d/share/shaders/k3d_slateroof.sl:5:	introduce a slate color onto roof tiles, making the last row of tiles
k3d/share/shaders/k3d_slateroof.sl:6:	transparent (and black) so that the edge of the roof looks irregular.
k3d/share/shaders/k3d_slateroof.sl:7:	You must bear this in mind when modelling - to avoid the roof ending
k3d/share/shaders/k3d_slateroof.sl:8:	before it reaches the wall which supposedly supports it! The shader
k3d/share/shaders/k3d_slateroof.sl:9:	introduces a random color variation so that one tile will be lighter or
k3d/share/shaders/k3d_slateroof.sl:10:	darker than the next Parameters:
k3d/share/shaders/k3d_slateroof.sl:12:   Ka: Coefficient of ambient light;
k3d/share/shaders/k3d_slateroof.sl:13: 	Kd: Coefficient of diffuse light;
k3d/share/shaders/k3d_slateroof.sl:14:   sfreq: number of tiles on the s direction
k3d/share/shaders/k3d_slateroof.sl:15:   tfreq: number of tiles in the t direction
k3d/share/shaders/k3d_slateroof.sl:16: 	maxadd: the maximum amount of overlap of one tile and another
k3d/share/shaders/k3d_slateroof.sl:17: 	ramp: the amount of a tile used for the initial rise to the maximum height
k3d/share/shaders/k3d_slateroof.sl:19: 	gap: the size of the gap between one tile and the next in the s direction,
k3d/share/shaders/k3d_slateroof.sl:20: 		measured as a proportion of the tile (so the value of gap must lie between 0 
k3d/share/shaders/k3d_slateroof.sl:22: 	maxcolorvary: the maximum amount by which the color of a slate can vary from the 
k3d/share/shaders/k3d_slateroof.sl:24: 	txtscale: a scaling factor for the slate coloration - the larger txtscale the
k3d/share/shaders/k3d_slateroof.sl:25: 		the smaller the detail on the tile pattern
k3d/share/shaders/k3d_slateroof.sl:26: 	factor: a seed used for adjusting the randomness - if you have two roofs with
k3d/share/shaders/k3d_slateroof.sl:27: 		the same sfreq, tfreq change the value of factor to ensure they have a 
k3d/share/shaders/k3d_slateroof.sl:37:	Nb. This shader would normally be used with the slateroofd shader to
k3d/share/shaders/k3d_slateroof.sl:38:	produce an appropriate displacement and message passing from the
k3d/share/shaders/k3d_slateroof.sl:39:	displacement shader would eliminate the need for a lot of the
k3d/share/shaders/k3d_slateroof.sl:40:	calculations in this shader. Renderdc, however, does not yet support
k3d/share/shaders/k3d_slateroof.sl:41:	message passing, so to produce the test image the code has been
k3d/share/shaders/k3d_slateroof.sl:42:	duplicated here 
k3d/share/shaders/k3d_slateroof.sl:61:   uniform float swidth = 1 / sfreq, 		/* Tile width in the s directio */
k3d/share/shaders/k3d_slateroof.sl:62:                 twidth = 1 / tfreq, 		/* ditto for the t direction */
k3d/share/shaders/k3d_slateroof.sl:63:                 offset = swidth / 2,		/* the amount by which alternate rows are offset */
k3d/share/shaders/k3d_slateroof.sl:65:   float scoord = s, tcoord = 1 - t; 		/* re map the t coord so that the coving is at the top */
k3d/share/shaders/k3d_slateroof.sl:66:	float stile, ttile, 							/* An integer identifying the current tile */
k3d/share/shaders/k3d_slateroof.sl:67:			s_offset, t_offset, 					/* Offsets withing the current tile, between 0, 1 */
k3d/share/shaders/k3d_slateroof.sl:69:			cs, ct; 									/* Coordinates set to the centre of the tile and fed into the noise function */
k3d/share/shaders/k3d_slateroof.sl:70:   float add, 										/* Add, between 0 and 1, hold the amount the current tile overlaps the next */
k3d/share/shaders/k3d_slateroof.sl:73:										  					displacement for the non-overlapping tile */
k3d/share/shaders/k3d_slateroof.sl:78:	float 	colorvary = 0,				    	/* the random amount by which a tile is lightened or darkened */
k3d/share/shaders/k3d_slateroof.sl:85:	/* Work out which tile we are in, and the offset within that tile */
k3d/share/shaders/k3d_slateroof.sl:86:   ttile = tcoord / twidth;
k3d/share/shaders/k3d_slateroof.sl:89:   stile = scoord / swidth;
k3d/share/shaders/k3d_slateroof.sl:95:	/* Work out the displacement assuming the point is in the 
k3d/share/shaders/k3d_slateroof.sl:99:	/* the noise function is always taken at the same point in the tile 
k3d/share/shaders/k3d_slateroof.sl:100:	 * normally the center, except in the short tiles which lie at the
k3d/share/shaders/k3d_slateroof.sl:101:	 * start and end of an offset row, where the middle of the left side 
k3d/share/shaders/k3d_slateroof.sl:102:    * of the tile is used */
k3d/share/shaders/k3d_slateroof.sl:106:	/* An offset row, so we must deal with the half tiles */
k3d/share/shaders/k3d_slateroof.sl:114:	/* now calculate the displacement */
k3d/share/shaders/k3d_slateroof.sl:117:   	dispt = Km / 2 + smoothstep(0, ramp / (1 + add), (1 - temp_t_offset)) * Km / 2;
k3d/share/shaders/k3d_slateroof.sl:119:	   dispt = Km / 2 + smoothstep( 0, 1 - ramp /(1 + add), temp_t_offset) * Km / 2;
k3d/share/shaders/k3d_slateroof.sl:125:	   disps = smoothstep(0, gap * (1 + add), temp_s_offset) * Km;
k3d/share/shaders/k3d_slateroof.sl:132:	/* Work out whether the point is in fact in another tile 
k3d/share/shaders/k3d_slateroof.sl:133:	 * storing the new tile in stile, ttile and new offset
k3d/share/shaders/k3d_slateroof.sl:137:			/* the point might be in another tile */
k3d/share/shaders/k3d_slateroof.sl:139:			/* We are in an offset tile row adjust the scoord appropriately for
k3d/share/shaders/k3d_slateroof.sl:140:			 * the row below */
k3d/share/shaders/k3d_slateroof.sl:144:			newstile = newscoord / swidth;
k3d/share/shaders/k3d_slateroof.sl:147:			/* Now calculate cs, ct the reference point for the noise calculation */					
k3d/share/shaders/k3d_slateroof.sl:151:			/* An offset row, so we must deal with the half tiles */
k3d/share/shaders/k3d_slateroof.sl:156:				/* if t_offset <= newadd we are actually in the overlapping tile */
k3d/share/shaders/k3d_slateroof.sl:167:	/* calculate the displacement again */
k3d/share/shaders/k3d_slateroof.sl:170:			dispt = Km / 2 + smoothstep(0, ramp / (1 + add), (1 - t_offset)) * Km / 2;
k3d/share/shaders/k3d_slateroof.sl:172:		    dispt = Km / 2 + smoothstep( 0, 1 - ramp /(1 + add), t_offset) * Km / 2;
k3d/share/shaders/k3d_slateroof.sl:176:		disps = Km * smoothstep(0, gap / (1 + add), s_offset);
k3d/share/shaders/k3d_slateroofd.sl:4:  slateroofd.sl - a displacement shader to produce tiles on a roof
k3d/share/shaders/k3d_slateroofd.sl:10:    	sfreq: number of tiles on the s direction
k3d/share/shaders/k3d_slateroofd.sl:11:    	tfreq: number of tiles in the t direction
k3d/share/shaders/k3d_slateroofd.sl:12: 		maxadd: the maximum amount of overlap of one tile and another
k3d/share/shaders/k3d_slateroofd.sl:13: 		ramp: the amount of a tile used for the initial rise to the maximum height
k3d/share/shaders/k3d_slateroofd.sl:15: 		gap: the size of the gap between one tile and the next in the s direction,
k3d/share/shaders/k3d_slateroofd.sl:16: 			measured as a proportion of the tile (so the value of gap must lie between 0 
k3d/share/shaders/k3d_slateroofd.sl:18: 		factor: a seed used for adjusting the randomness - if you have two roofs with
k3d/share/shaders/k3d_slateroofd.sl:19: 			the same sfreq, tfreq change the value of factor to ensure they have a 
k3d/share/shaders/k3d_slateroofd.sl:24:		This routine produces a random tiled effect. In the s direction the
k3d/share/shaders/k3d_slateroofd.sl:25:		tiles are regular, with every other row offset by half a tile width, as
k3d/share/shaders/k3d_slateroofd.sl:26:		normal roof tiles would be. Each tile is expanded by a random amount in
k3d/share/shaders/k3d_slateroofd.sl:27:		the t direction so that it overlaps the tile 'below' it. No randomness
k3d/share/shaders/k3d_slateroofd.sl:28:		is incorporated in the s direction, which remains regular. The routine
k3d/share/shaders/k3d_slateroofd.sl:29:		first determines the dimensions of the current tile, and then works out
k3d/share/shaders/k3d_slateroofd.sl:30:		the surface displacement according to a simple formula: a sharp ridge at
k3d/share/shaders/k3d_slateroofd.sl:31:		the bottom of the tile, gaps to either side and the whole tile gently
k3d/share/shaders/k3d_slateroofd.sl:32:		sloping towards zero at the top of the tile. It then looks to see if the
k3d/share/shaders/k3d_slateroofd.sl:33:		point we are considering is actually in the zone of overlap with the
k3d/share/shaders/k3d_slateroofd.sl:34:		tile 'above' the current one. If it is we replace the displacement we are
k3d/share/shaders/k3d_slateroofd.sl:35:		considering with one calculated for the tile above, being a little
k3d/share/shaders/k3d_slateroofd.sl:36:		careful to ensure there are no sudden jumps in displacement.
k3d/share/shaders/k3d_slateroofd.sl:54:   uniform float swidth = 1 / sfreq, 		/* Tile width in the s directio */
k3d/share/shaders/k3d_slateroofd.sl:55:                 twidth = 1 / tfreq, 		/* ditto for the t direction */
k3d/share/shaders/k3d_slateroofd.sl:56:                 offset = swidth / 2;		/* the amount by which alternate rows are offset */
k3d/share/shaders/k3d_slateroofd.sl:57:   float scoord = s, tcoord = 1 - t; 		/* re map the t coord so that the coving is at the top */
k3d/share/shaders/k3d_slateroofd.sl:58:   float stile, ttile, 							/* An integer identifying the current tile */
k3d/share/shaders/k3d_slateroofd.sl:59:			s_offset, t_offset, 					/* Offsets withing the current tile, between 0, 1 */
k3d/share/shaders/k3d_slateroofd.sl:61:			cs, ct; 									/* Coordinates set to the centre of the tile and fed into the noise function */
k3d/share/shaders/k3d_slateroofd.sl:62:   float add,	 									/* Add, between 0 and 1, hold the amount the current tile overlaps the next */
k3d/share/shaders/k3d_slateroofd.sl:65:										 				 	displacement for the non-overlapping tile */
k3d/share/shaders/k3d_slateroofd.sl:70:	float spacescale = length(vtransform("shader", Nf));
k3d/share/shaders/k3d_slateroofd.sl:76:	/* Work out which tile we are in, and the offset within that tile */
k3d/share/shaders/k3d_slateroofd.sl:77:   ttile = tcoord / twidth;
k3d/share/shaders/k3d_slateroofd.sl:80:   stile = scoord / swidth;
k3d/share/shaders/k3d_slateroofd.sl:86:	/* Work out the displacement assuming the point is in the 
k3d/share/shaders/k3d_slateroofd.sl:91:   	/* the noise function is always taken at the same point in the tile 
k3d/share/shaders/k3d_slateroofd.sl:92:   		normally the center, except in the short tiles which lie at the
k3d/share/shaders/k3d_slateroofd.sl:93:			start and end of an offset row, where the middle of the left side 
k3d/share/shaders/k3d_slateroofd.sl:94:			of the tile is used */
k3d/share/shaders/k3d_slateroofd.sl:98:			/* An offset row, so we must deal with the half tiles */
k3d/share/shaders/k3d_slateroofd.sl:103: 		/* the very bottom row cannot expand */
k3d/share/shaders/k3d_slateroofd.sl:105:	/* now calculate the displacement */
k3d/share/shaders/k3d_slateroofd.sl:107:	/* the above adjusts t_offset so that it runs from 0 to 1 within the expanded tile */
k3d/share/shaders/k3d_slateroofd.sl:109:		dispt = Km / 2 + smoothstep(0, ramp / (1 + add), (1 - temp_t_offset)) * Km / 2;
k3d/share/shaders/k3d_slateroofd.sl:111:	   dispt = Km / 2 + smoothstep( 0, 1 - ramp /(1 + add), temp_t_offset) * Km / 2;
k3d/share/shaders/k3d_slateroofd.sl:117:	   disps = smoothstep(0, gap * (1 + add), temp_s_offset) * Km;
k3d/share/shaders/k3d_slateroofd.sl:124:	/* Work out whether the point is in fact in another tile 	
k3d/share/shaders/k3d_slateroofd.sl:125:		storing the new tile in stile, ttile and new offset
k3d/share/shaders/k3d_slateroofd.sl:129:			/* the point might be in another tile */
k3d/share/shaders/k3d_slateroofd.sl:131:				/* We are in an offset tile row adjust the scoord appropriately for
k3d/share/shaders/k3d_slateroofd.sl:132:		 			the row below */
k3d/share/shaders/k3d_slateroofd.sl:136:			newstile = newscoord / swidth;
k3d/share/shaders/k3d_slateroofd.sl:139:			/* Now calculate cs, ct the reference point for the noise calculation */					
k3d/share/shaders/k3d_slateroofd.sl:143:				/* An offset row, so we must deal with the half tiles */
k3d/share/shaders/k3d_slateroofd.sl:147:			/* if t_offset <= newadd we are actually in the overlapping tile */
k3d/share/shaders/k3d_slateroofd.sl:156:			/* calculate the displacement again */
k3d/share/shaders/k3d_slateroofd.sl:160:					dispt = Km / 2 + smoothstep(0, ramp / (1 + add), (1 - t_offset)) * Km / 2;
k3d/share/shaders/k3d_slateroofd.sl:163:				dispt = Km / 2 +  smoothstep( 0, 1 - ramp, t_offset) * Km / 2;
k3d/share/shaders/k3d_slateroofd.sl:167:				disps = Km * smoothstep(0, gap / (1 + add), s_offset);
k3d/share/shaders/k3d_slateroofd.sl:172:			/* taking the maximum of dispo, disp ensures that there
k3d/share/shaders/k3d_slideprojector.sl:1:light k3d_slideprojector(float intensity = 2000;
k3d/share/shaders/k3d_slideprojector.sl:2:			 color lightcolor = 1;
k3d/share/shaders/k3d_slideprojector.sl:35:    cosangle = (L.Z) / length(L);
k3d/share/shaders/k3d_slideprojector.sl:38:      smoothstep(cos(rconeangle), cos(rconeangle - rconedeltaangle),
k3d/share/shaders/k3d_slideprojector.sl:50:    Cl = attenuation * intensity * lightcolor * Ct;
k3d/share/shaders/k3d_smoke.sl:5: *    This is a volume shader for smoke.  Trapezoidal integration is
k3d/share/shaders/k3d_smoke.sl:10: *          to block light from behind it.
k3d/share/shaders/k3d_smoke.sl:11: *   lightdensity - smoke density control as it affects light scattering
k3d/share/shaders/k3d_smoke.sl:12: *          toward the viewer.
k3d/share/shaders/k3d_smoke.sl:13: *   integstart, integend - bounds along the viewing ray direction of the
k3d/share/shaders/k3d_smoke.sl:14: *          integration of atmospheric effects.
k3d/share/shaders/k3d_smoke.sl:16: *   smokefreq, smokeoctaves, smokevary - control the fBm of the noisy smoke
k3d/share/shaders/k3d_smoke.sl:17: *          If either smokeoctaves or smokevary is 0, there is no noise
k3d/share/shaders/k3d_smoke.sl:18: *          to the smoke.
k3d/share/shaders/k3d_smoke.sl:19: *   scatter - when non-1, can be used to give wavelength-dependent
k3d/share/shaders/k3d_smoke.sl:22: * Author: Larry Gritz
k3d/share/shaders/k3d_smoke.sl:28:#include "k3d_noises.h"
k3d/share/shaders/k3d_smoke.sl:30:/* For point P (we are passed both the current and shader space
k3d/share/shaders/k3d_smoke.sl:31: * coordinates), gather illumination from the light sources and
k3d/share/shaders/k3d_smoke.sl:32: * compute the smoke density at that point.  Only count lights tagged
k3d/share/shaders/k3d_smoke.sl:33: * with the "__foglight" parameter.  
k3d/share/shaders/k3d_smoke.sl:35:void smokedensity(point Pcur, Pshad;
k3d/share/shaders/k3d_smoke.sl:44:    float foglight = 1;
k3d/share/shaders/k3d_smoke.sl:45:    lightsource("__foglight", foglight);
k3d/share/shaders/k3d_smoke.sl:46:    if(foglight > 0)
k3d/share/shaders/k3d_smoke.sl:51:      point Psmoke = Pshad * smokefreq;
k3d/share/shaders/k3d_smoke.sl:58:      smoke = smoothstep(-1, 1, smokevary * smoke);
k3d/share/shaders/k3d_smoke.sl:77:volume k3d_smoke(float opacdensity = 1, lightdensity = 1;
k3d/share/shaders/k3d_smoke.sl:84:  point origin = transform("shader", Worigin);
k3d/share/shaders/k3d_smoke.sl:88:  /* Integrate forwards from the start point */
k3d/share/shaders/k3d_smoke.sl:90:  vector IN = normalize(vtransform("shader", I));
k3d/share/shaders/k3d_smoke.sl:91:  vector WIN = vtransform("shader", "current", IN);
k3d/share/shaders/k3d_smoke.sl:94:  float end = min(length(I), integend) - 0.0001;
k3d/share/shaders/k3d_smoke.sl:96:  /* Get the in-scattered light and the local smoke density for the
k3d/share/shaders/k3d_smoke.sl:97:   * beginning of the ray 
k3d/share/shaders/k3d_smoke.sl:102:  color Cv = 0, Ov = 0;		/* color & opacity of volume that we accumulate */
k3d/share/shaders/k3d_smoke.sl:103:  while(d <= end)
k3d/share/shaders/k3d_smoke.sl:105:      /* Take a step and get the local scattered light and smoke density */
k3d/share/shaders/k3d_smoke.sl:111:      /* Find the blocking and light scattering contribution of 
k3d/share/shaders/k3d_smoke.sl:112:       * the portion of the volume covered by this step.
k3d/share/shaders/k3d_smoke.sl:115:      color lighttau =
k3d/share/shaders/k3d_smoke.sl:116:	lightdensity * ss / 2 * (li * dtau + last_li * last_dtau);
k3d/share/shaders/k3d_smoke.sl:118:      /* Composite with exponential extinction of background light */
k3d/share/shaders/k3d_smoke.sl:119:      Cv += (1 - Ov) * lighttau;
k3d/share/shaders/k3d_smoke.sl:125:  /* Ci & Oi are the color and opacity of the background element.
k3d/share/shaders/k3d_smoke.sl:126:   * Now Cv is the light contributed by the volume itself, and Ov is the
k3d/share/shaders/k3d_smoke.sl:127:   * opacity of the volume, i.e. (1-Ov)*Ci is the light from the background
k3d/share/shaders/k3d_smoke.sl:128:   * which makes it through the volume.  So just composite!
k3d/share/shaders/k3d_smoke2.sl:2: * TLSmoke.sl -- This is really Larry's noisysmoke.sl.  I only took out the
k3d/share/shaders/k3d_smoke2.sl:6: *    This is a volume shader for smoke.  Trapezoidal integration is
k3d/share/shaders/k3d_smoke2.sl:7: *    used to integrate the GADD to find scattering and extinction.
k3d/share/shaders/k3d_smoke2.sl:11: *   integstart, integend - bounds along the viewing ray direction of the
k3d/share/shaders/k3d_smoke2.sl:12: *          integration of atmospheric effects.
k3d/share/shaders/k3d_smoke2.sl:14: *   use_lighting - if nonzero, light visibility along the ray will be taken
k3d/share/shaders/k3d_smoke2.sl:16: *   use_noise - makes the smoke noisy (nonuniform) when nonzero
k3d/share/shaders/k3d_smoke2.sl:17: *   freq, octaves, smokevary - control the fBm of the noisy smoke
k3d/share/shaders/k3d_smoke2.sl:18: *   lightscale - multiplier for light scattered toward viewer in volume
k3d/share/shaders/k3d_smoke2.sl:21: * Author: Larry Gritz
k3d/share/shaders/k3d_smoke2.sl:29: * Revision 1.1  2004/05/19 18:15:20  tshead
k3d/share/shaders/k3d_smoke2.sl:30: * * Moved scripts & shaders to the share directory
k3d/share/shaders/k3d_smoke2.sl:33: * * Initial checkin
k3d/share/shaders/k3d_smoke2.sl:39: * Compute only one octave of noise when not lit (big speedup)
k3d/share/shaders/k3d_smoke2.sl:50:/* Here is where we define the GADD. */
k3d/share/shaders/k3d_smoke2.sl:52:         if (use_lighting > 0) {                                            \
k3d/share/shaders/k3d_smoke2.sl:67:             g = density * smoothstep(-1,1,smokevary*smoke);                \
k3d/share/shaders/k3d_smoke2.sl:81:	    float use_lighting = 1;
k3d/share/shaders/k3d_smoke2.sl:85:	    float lightscale = 15;
k3d/share/shaders/k3d_smoke2.sl:90:  point incident = vtransform ("shader", -I);
k3d/share/shaders/k3d_smoke2.sl:91:#else  /* PRMan and BMRT have I reverse of each other, conflict in spec */
k3d/share/shaders/k3d_smoke2.sl:93:  point incident = vtransform ("shader", I);
k3d/share/shaders/k3d_smoke2.sl:95:  point origin = transform ("shader", Worigin);
k3d/share/shaders/k3d_smoke2.sl:102:  color li, last_li, lighttau;
k3d/share/shaders/k3d_smoke2.sl:107:  end = min (length (incident), integend) - 0.0001;
k3d/share/shaders/k3d_smoke2.sl:109:  /* Integrate forwards from the start point */
k3d/share/shaders/k3d_smoke2.sl:113:      WIN = vtransform ("shader", "current", IN);
k3d/share/shaders/k3d_smoke2.sl:121:      while (d <= end) {
k3d/share/shaders/k3d_smoke2.sl:127:	  /* Our goal now is to find dC and dO, the color and opacity
k3d/share/shaders/k3d_smoke2.sl:128:	   * of the portion of the volume covered by this step.
k3d/share/shaders/k3d_smoke2.sl:131:	  lighttau = .5 * ss * (li*dtau + last_li*last_dtau);
k3d/share/shaders/k3d_smoke2.sl:135:	  dC = lighttau * dO;
k3d/share/shaders/k3d_smoke2.sl:147:  /* Ci & Oi are the color (premultiplied by opacity) and opacity of 
k3d/share/shaders/k3d_smoke2.sl:148:   * the background element.
k3d/share/shaders/k3d_smoke2.sl:149:   * Now Cv is the light contributed by the volume itself, and Ov is the
k3d/share/shaders/k3d_smoke2.sl:150:   * opacity of the volume, i.e. (1-Ov)*Ci is the light from the background
k3d/share/shaders/k3d_smoke2.sl:151:   * which makes it through the volume.
k3d/share/shaders/k3d_smoke2.sl:153:  Ci = lightscale*Cv + (1-Ov)*Ci; 
k3d/share/shaders/k3d_softboxes.sl:10:* To do: accomodate negative widths. twosided/onesided cards.
k3d/share/shaders/k3d_softboxes.sl:14:** $Id: k3d_softboxes.sl,v 1.1 2004/05/19 18:15:20 tshead Exp $
k3d/share/shaders/k3d_softboxes.sl:16:** Derived from softbox3 v1.2 - Author Bjorke for all
k3d/share/shaders/k3d_softboxes.sl:47:/* Superellipse soft clipping - straight out of "uberlight"		***/
k3d/share/shaders/k3d_softboxes.sl:49:/*   - point Q on the x-y plane						***/
k3d/share/shaders/k3d_softboxes.sl:50:/*   - the equations of two superellipses (with major/minor axes given	***/
k3d/share/shaders/k3d_softboxes.sl:51:/*      by  a,b and A,B for the inner and outer ellipses, respectively)	***/
k3d/share/shaders/k3d_softboxes.sl:53:/*   - 0 if Q was inside the inner ellipse				***/
k3d/share/shaders/k3d_softboxes.sl:54:/*   - 1 if Q was outside the outer ellipse				***/
k3d/share/shaders/k3d_softboxes.sl:55:/*   - smoothly varying from 0 to 1 in between				***/
k3d/share/shaders/k3d_softboxes.sl:58:/* this is the identical function used by sqLight etc */
k3d/share/shaders/k3d_softboxes.sl:61:    point Q;          /* Test point on the x-y plane */
k3d/share/shaders/k3d_softboxes.sl:64:    uniform float roundness;  /* Same roundness for both ellipses */
k3d/share/shaders/k3d_softboxes.sl:70:	result = 1 - (1-smoothstep(a,A,x)) * (1-smoothstep(b,B,y));
k3d/share/shaders/k3d_softboxes.sl:76:	result = smoothstep (q, r, 1);
k3d/share/shaders/k3d_softboxes.sl:93:			boxWidth,
k3d/share/shaders/k3d_softboxes.sl:94:			boxHeight,
k3d/share/shaders/k3d_softboxes.sl:101:    output float theDist;
k3d/share/shaders/k3d_softboxes.sl:102:    output color theColor;
k3d/share/shaders/k3d_softboxes.sl:103:    output color theOpac;
k3d/share/shaders/k3d_softboxes.sl:106:    uniform string theFilterName = filtTypes[clamp(boxFilter,0,3)];
k3d/share/shaders/k3d_softboxes.sl:110:    /* Get the surface position */
k3d/share/shaders/k3d_softboxes.sl:112:    varying vector Vlight = vtransform (boxCoords, reflVect);
k3d/share/shaders/k3d_softboxes.sl:113:    varying float zv = zcomp(Vlight);
k3d/share/shaders/k3d_softboxes.sl:114:    varying point Pplane = Pb1 - Vlight*(zcomp(Pb1)/zcomp(Vlight));
k3d/share/shaders/k3d_softboxes.sl:116:    uniform float bw2 = boxWidth/2;
k3d/share/shaders/k3d_softboxes.sl:117:    uniform float bh2 = boxHeight/2;
k3d/share/shaders/k3d_softboxes.sl:119:#define bw2 boxWidth
k3d/share/shaders/k3d_softboxes.sl:120:#define bh2 boxHeight
k3d/share/shaders/k3d_softboxes.sl:123:    uniform float he = max(boxHEdge,-bh2);
k3d/share/shaders/k3d_softboxes.sl:125:    uniform float bH = bh2+he;
k3d/share/shaders/k3d_softboxes.sl:127:    uniform float iH = min(bH,bh2);
k3d/share/shaders/k3d_softboxes.sl:129:    uniform float oH = max(bH,bh2);
k3d/share/shaders/k3d_softboxes.sl:130:    if (sign(zcomp(Pb1)) == sign(zcomp(Vlight))) {
k3d/share/shaders/k3d_softboxes.sl:137:	    uniform float nChans;
k3d/share/shaders/k3d_softboxes.sl:138:	    textureinfo(boxTexture,"channels",nChans);
k3d/share/shaders/k3d_softboxes.sl:139:	    varying float theS = (oW+xcomp(Pplane))/(oW*2);
k3d/share/shaders/k3d_softboxes.sl:140:	    varying float theT = (oH-ycomp(Pplane))/(oH*2);
k3d/share/shaders/k3d_softboxes.sl:141:	    theS = min(2,max(-1,theS));
k3d/share/shaders/k3d_softboxes.sl:142:	    theT = min(2,max(-1,theT));
k3d/share/shaders/k3d_softboxes.sl:143:	    if (nChans>1) {
k3d/share/shaders/k3d_softboxes.sl:144:		ct = texture(boxTexture,theS,theT,
k3d/share/shaders/k3d_softboxes.sl:145:			    "filter",	theFilterName,
k3d/share/shaders/k3d_softboxes.sl:151:	    if ((nChans==1)||(nChans>3)) {
k3d/share/shaders/k3d_softboxes.sl:152:		uniform float alphaChan;
k3d/share/shaders/k3d_softboxes.sl:153:		if (nChans==1) {
k3d/share/shaders/k3d_softboxes.sl:154:		    alphaChan = 0;
k3d/share/shaders/k3d_softboxes.sl:156:		    alphaChan = 3;
k3d/share/shaders/k3d_softboxes.sl:158:		ot = float texture(boxTexture[alphaChan],theS,theT,
k3d/share/shaders/k3d_softboxes.sl:159:			    "filter",	theFilterName,
k3d/share/shaders/k3d_softboxes.sl:167:    varying float pDist = length(ppC - spw); /* in "world" coords */
k3d/share/shaders/k3d_softboxes.sl:168:    theDist = pDist;
k3d/share/shaders/k3d_softboxes.sl:169:    theOpac = contrib * boxOpac * ot;
k3d/share/shaders/k3d_softboxes.sl:170:    theColor = contrib * ct * boxColor / pow(pDist,decayExp);	/* premultiplied!!!!! */
k3d/share/shaders/k3d_softboxes.sl:177:float sbShadow(
k3d/share/shaders/k3d_softboxes.sl:178:    uniform string	theName;
k3d/share/shaders/k3d_softboxes.sl:179:    varying point	thePoint;
k3d/share/shaders/k3d_softboxes.sl:180:    uniform ENUM	theFilt;
k3d/share/shaders/k3d_softboxes.sl:181:    uniform float	theBlur,
k3d/share/shaders/k3d_softboxes.sl:182:			theSamples,
k3d/share/shaders/k3d_softboxes.sl:183:			theBias;
k3d/share/shaders/k3d_softboxes.sl:186:    uniform string theFilterName = filtTypes[clamp(theFilt,0,1)];
k3d/share/shaders/k3d_softboxes.sl:187:    varying float inShadow = shadow (theName,
k3d/share/shaders/k3d_softboxes.sl:188:			    thePoint,
k3d/share/shaders/k3d_softboxes.sl:189:			    "filter",	theFilterName,
k3d/share/shaders/k3d_softboxes.sl:190:			    "blur",	theBlur,
k3d/share/shaders/k3d_softboxes.sl:191:			    "samples",	theSamples,
k3d/share/shaders/k3d_softboxes.sl:192:			    "bias",	theBias);
k3d/share/shaders/k3d_softboxes.sl:193:    return(inShadow);
k3d/share/shaders/k3d_softboxes.sl:200:light k3d_softboxes(
k3d/share/shaders/k3d_softboxes.sl:205:#else /* !BMRT -- slc compiler doesn't like these definitions */
k3d/share/shaders/k3d_softboxes.sl:210:    color	lightcolor	= color (1,1,1);
k3d/share/shaders/k3d_softboxes.sl:218:    color	boxColor1	= color (1,1,1),	/* multiplied by lightcolor&intensity */
k3d/share/shaders/k3d_softboxes.sl:220:    float	boxWidth1	= 1,
k3d/share/shaders/k3d_softboxes.sl:222:		boxHeight1	= 1,
k3d/share/shaders/k3d_softboxes.sl:230:    color	boxColor2	= color (1,1,1),	/* multiplied by lightcolor&intensity */
k3d/share/shaders/k3d_softboxes.sl:232:    float	boxWidth2	= 1,
k3d/share/shaders/k3d_softboxes.sl:234:		boxHeight2	= 1,
k3d/share/shaders/k3d_softboxes.sl:242:    color	boxColor3	= color (1,1,1),	/* multiplied by lightcolor&intensity */
k3d/share/shaders/k3d_softboxes.sl:244:    float	boxWidth3	= 1,
k3d/share/shaders/k3d_softboxes.sl:246:		boxHeight3	= 1,
k3d/share/shaders/k3d_softboxes.sl:254:    color	boxColor4	= color (1,1,1),	/* multiplied by lightcolor&intensity */
k3d/share/shaders/k3d_softboxes.sl:256:    float	boxWidth4	= 1,
k3d/share/shaders/k3d_softboxes.sl:258:		boxHeight4	= 1,
k3d/share/shaders/k3d_softboxes.sl:273:    color shadowcolor = 0;
k3d/share/shaders/k3d_softboxes.sl:274:    float shadowintensity = 1;
k3d/share/shaders/k3d_softboxes.sl:275:    string shadowname = "";
k3d/share/shaders/k3d_softboxes.sl:276:    ENUM	shadowfilt = SHAD_BOX_FILT;
k3d/share/shaders/k3d_softboxes.sl:277:    float   shadowblur = 0.01,
k3d/share/shaders/k3d_softboxes.sl:278:	    shadowbias = 0,
k3d/share/shaders/k3d_softboxes.sl:279:	    shadowsamples = 16;
k3d/share/shaders/k3d_softboxes.sl:280:    string shadownameb = "";
k3d/share/shaders/k3d_softboxes.sl:281:    ENUM	shadowfiltb = SHAD_BOX_FILT;
k3d/share/shaders/k3d_softboxes.sl:282:    float   shadowblurb = 0.01,
k3d/share/shaders/k3d_softboxes.sl:283:	    shadowbiasb = 0,
k3d/share/shaders/k3d_softboxes.sl:284:	    shadowsamplesb = 16;
k3d/share/shaders/k3d_softboxes.sl:285:    string shadownamec = "";
k3d/share/shaders/k3d_softboxes.sl:286:    ENUM	shadowfiltc = SHAD_BOX_FILT;
k3d/share/shaders/k3d_softboxes.sl:287:    float   shadowblurc = 0.01,
k3d/share/shaders/k3d_softboxes.sl:288:	    shadowbiasc = 0,
k3d/share/shaders/k3d_softboxes.sl:289:	    shadowsamplesc = 16;
k3d/share/shaders/k3d_softboxes.sl:290:    string shadownamed = "";
k3d/share/shaders/k3d_softboxes.sl:291:    ENUM	shadowfiltd = SHAD_BOX_FILT;
k3d/share/shaders/k3d_softboxes.sl:292:    float   shadowblurd = 0.01,
k3d/share/shaders/k3d_softboxes.sl:293:	    shadowbiasd = 0,
k3d/share/shaders/k3d_softboxes.sl:294:	    shadowsamplesd = 16;
k3d/share/shaders/k3d_softboxes.sl:302:    output varying float __inShadow = 0;	   
k3d/share/shaders/k3d_softboxes.sl:304:    uniform string rcsInfo = "$Id: k3d_softboxes.sl,v 1.1 2004/05/19 18:15:20 tshead Exp $";
k3d/share/shaders/k3d_softboxes.sl:306:    uniform string theFilterName = filtTypes[clamp(envTexFilter,0,3)];
k3d/share/shaders/k3d_softboxes.sl:310:    uniform string theEnvSpace;
k3d/share/shaders/k3d_softboxes.sl:312:	theEnvSpace = "shader";
k3d/share/shaders/k3d_softboxes.sl:314:	theEnvSpace = envReflSpace;
k3d/share/shaders/k3d_softboxes.sl:320:	uniform point metP = transform(meterSpace,"shader",point (0,0,0));
k3d/share/shaders/k3d_softboxes.sl:321:	adjMeterDistance = length(metP) + meterDistance;
k3d/share/shaders/k3d_softboxes.sl:324:    varying float fullShad = 0;
k3d/share/shaders/k3d_softboxes.sl:354:	    varying float thisDist;
k3d/share/shaders/k3d_softboxes.sl:355:	    varying color thisOpac;
k3d/share/shaders/k3d_softboxes.sl:356:	    varying color thisColor;
k3d/share/shaders/k3d_softboxes.sl:364:		    boxWidth1,boxHeight1,boxWEdge1,boxHEdge1,
k3d/share/shaders/k3d_softboxes.sl:366:		    thisDist,thisColor,thisOpac);
k3d/share/shaders/k3d_softboxes.sl:367:	    sortedDist[boxCt]  = thisDist;
k3d/share/shaders/k3d_softboxes.sl:368:	    sortedColor[boxCt] = thisColor;
k3d/share/shaders/k3d_softboxes.sl:369:	    sortedOpac[boxCt]  = thisOpac;
k3d/share/shaders/k3d_softboxes.sl:376:		    boxWidth2,boxHeight2,boxWEdge2,boxHEdge2,
k3d/share/shaders/k3d_softboxes.sl:378:		    thisDist,thisColor,thisOpac);
k3d/share/shaders/k3d_softboxes.sl:379:	    sortedDist[boxCt]  = thisDist;
k3d/share/shaders/k3d_softboxes.sl:380:	    sortedColor[boxCt] = thisColor;
k3d/share/shaders/k3d_softboxes.sl:381:	    sortedOpac[boxCt]  = thisOpac;
k3d/share/shaders/k3d_softboxes.sl:388:		    boxWidth3,boxHeight3,boxWEdge3,boxHEdge3,
k3d/share/shaders/k3d_softboxes.sl:390:		    thisDist,thisColor,thisOpac);
k3d/share/shaders/k3d_softboxes.sl:391:	    sortedDist[boxCt]  = thisDist;
k3d/share/shaders/k3d_softboxes.sl:392:	    sortedColor[boxCt] = thisColor;
k3d/share/shaders/k3d_softboxes.sl:393:	    sortedOpac[boxCt]  = thisOpac;
k3d/share/shaders/k3d_softboxes.sl:400:		    boxWidth4,boxHeight4,boxWEdge4,boxHEdge4,
k3d/share/shaders/k3d_softboxes.sl:402:		    thisDist,thisColor,thisOpac);
k3d/share/shaders/k3d_softboxes.sl:403:	    sortedDist[boxCt]  = thisDist;
k3d/share/shaders/k3d_softboxes.sl:404:	    sortedColor[boxCt] = thisColor;
k3d/share/shaders/k3d_softboxes.sl:405:	    sortedOpac[boxCt]  = thisOpac;
k3d/share/shaders/k3d_softboxes.sl:410:		varying vector Rs = normalize (vtransform (theEnvSpace, normalize(-L)));
k3d/share/shaders/k3d_softboxes.sl:413:		    varying point PShd = transform (theEnvSpace, Ps);
k3d/share/shaders/k3d_softboxes.sl:414:		    varying float pl = vector(PShd).vector(PShd);
k3d/share/shaders/k3d_softboxes.sl:415:		    varying float pdotv = -vector(PShd).Rs;
k3d/share/shaders/k3d_softboxes.sl:416:		    Rs = vector( PShd + (pdotv + sqrt (abs (1 - pl + ((pdotv)*(pdotv)))))*Rs );
k3d/share/shaders/k3d_softboxes.sl:422:					    "filter", theFilterName,
k3d/share/shaders/k3d_softboxes.sl:434:			if (sortedDist[i]>sortedDist[j]) { /* farthest first */
k3d/share/shaders/k3d_softboxes.sl:435:			    thisDist = sortedDist[j];
k3d/share/shaders/k3d_softboxes.sl:436:			    thisOpac = sortedOpac[j];
k3d/share/shaders/k3d_softboxes.sl:437:			    thisColor = sortedColor[j];
k3d/share/shaders/k3d_softboxes.sl:441:			    sortedDist[i] = thisDist;
k3d/share/shaders/k3d_softboxes.sl:442:			    sortedOpac[i] = thisOpac;
k3d/share/shaders/k3d_softboxes.sl:443:			    sortedColor[i] = thisColor;
k3d/share/shaders/k3d_softboxes.sl:454:	    /* Apply shadow mapped shadows */
k3d/share/shaders/k3d_softboxes.sl:458:	    float theDot = Ln.Nn;
k3d/share/shaders/k3d_softboxes.sl:465:	    varying float shadowed;
k3d/share/shaders/k3d_softboxes.sl:466:	    if (shadowname != "") {
k3d/share/shaders/k3d_softboxes.sl:467:	    shadowed = sbShadow(shadowname,Ps,shadowfilt,
k3d/share/shaders/k3d_softboxes.sl:468:			shadowblur,shadowsamples,shadowbias);
k3d/share/shaders/k3d_softboxes.sl:469:	    fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_softboxes.sl:471:	    if (shadownameb != "") {
k3d/share/shaders/k3d_softboxes.sl:472:	    shadowed = sbShadow(shadownameb,Ps,shadowfiltb,
k3d/share/shaders/k3d_softboxes.sl:473:			shadowblurb,shadowsamplesb,shadowbiasb);
k3d/share/shaders/k3d_softboxes.sl:474:	    fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_softboxes.sl:476:	    if (shadownamec != "") {
k3d/share/shaders/k3d_softboxes.sl:477:	    shadowed = sbShadow(shadownamec,Ps,shadowfiltc,
k3d/share/shaders/k3d_softboxes.sl:478:			shadowblurc,shadowsamplesc,shadowbiasc);
k3d/share/shaders/k3d_softboxes.sl:479:	    fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_softboxes.sl:481:	    if (shadownamed != "") {
k3d/share/shaders/k3d_softboxes.sl:482:	    shadowed = sbShadow(shadownamed,Ps,shadowfiltd,
k3d/share/shaders/k3d_softboxes.sl:483:			shadowblurd,shadowsamplesd,shadowbiasd);
k3d/share/shaders/k3d_softboxes.sl:484:	    fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_softboxes.sl:486:	    __inShadow = fullShad; 
k3d/share/shaders/k3d_softboxes.sl:490:	Cl *= (lightcolor * adjIntensity * materiaRefl);
k3d/share/shaders/k3d_softboxes.sl:491:	Cl = mix(Cl, (shadowcolor*shadowintensity*adjIntensity), fullShad);
k3d/share/shaders/k3d_spacecloud.sl:3: *    texture-map and try to make it not so obvious that it is a texture-map.
k3d/share/shaders/k3d_spacecloud.sl:7: *   Uses a pulse function to tapper off the edges of the texture
k3d/share/shaders/k3d_spacecloud.sl:13: *   fuzz -- amount to blur the edges of the pulse
k3d/share/shaders/k3d_spacecloud.sl:14: *   minAdjust -- amount that can be subtracted from value
k3d/share/shaders/k3d_spacecloud.sl:15: *   maxAdjust -- amount that can be added to the value
k3d/share/shaders/k3d_spacecloud.sl:16: *   maxOpacity -- maximin opacity for the surface
k3d/share/shaders/k3d_spacecloud.sl:19: *  Only tested on rectanglar patch.
k3d/share/shaders/k3d_spacecloud.sl:29: *      I was never happy with the results.  So now am just using noise over
k3d/share/shaders/k3d_spacecloud.sl:43:#define smoothPulse2Fuzz(a, b, afuzz, bfuzz, loc) \
k3d/share/shaders/k3d_spacecloud.sl:44:  (smoothstep (a-afuzz, a, loc) - \
k3d/share/shaders/k3d_spacecloud.sl:45:   smoothstep (b, b+bfuzz, loc) )
k3d/share/shaders/k3d_spacecloud.sl:92:	Oi = value * smoothPulse2Fuzz (startPulse, endPulse, afuzz, afuzz, ss) * 
k3d/share/shaders/k3d_spacecloud.sl:93:		smoothPulse2Fuzz (startPulse, endPulse, bfuzz, afuzz, tt);
k3d/share/shaders/k3d_spaceshiphull1.sl:17:surface k3d_spaceshiphull1(
k3d/share/shaders/k3d_spaceshiphull1.sl:21:	float roughness = 0.8; color specularcolor = 1;
k3d/share/shaders/k3d_spaceshiphull1.sl:22:	float width = .1; float height = .06;
k3d/share/shaders/k3d_spaceshiphull1.sl:32:  // Figure out which row we're in  
k3d/share/shaders/k3d_spaceshiphull1.sl:33:  ss = s / width;
k3d/share/shaders/k3d_spaceshiphull1.sl:34:  tt = t / height;
k3d/share/shaders/k3d_spaceshiphull1.sl:53:  Ci = Os * platecolor * (Ka * ambient() + Kd * diffuse(Nf)) + specularcolor * platespecular * specular(Nf, V, roughness);
k3d/share/shaders/k3d_spotlight.sl:1:/* spotlight.sl - Standard spot light source for RenderMan Interface.
k3d/share/shaders/k3d_spotlight.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_spotlight.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_spotlight.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_spotlight.sl:9:light k3d_spotlight(float intensity = 1;
k3d/share/shaders/k3d_spotlight.sl:10:		    color lightcolor = 1;
k3d/share/shaders/k3d_spotlight.sl:11:		    point from = point "shader"(0, 0, 0);
k3d/share/shaders/k3d_spotlight.sl:12:		    point to = point "shader"(0, 0, 1);
k3d/share/shaders/k3d_spotlight.sl:22:    cosangle = (L.A) / length(L);
k3d/share/shaders/k3d_spotlight.sl:25:      smoothstep(cos(coneangle), cos(coneangle - conedeltaangle), cosangle);
k3d/share/shaders/k3d_spotlight.sl:26:    Cl = atten * intensity * lightcolor;
k3d/share/shaders/k3d_square_ridges.sl:2:// Copyright (c) 1995-2004, Timothy M. Shead
k3d/share/shaders/k3d_square_ridges.sl:4:// Contact: tshead@k-3d.com
k3d/share/shaders/k3d_square_ridges.sl:6:// This program is free software; you can redistribute it and/or
k3d/share/shaders/k3d_square_ridges.sl:7:// modify it under the terms of the GNU General Public
k3d/share/shaders/k3d_square_ridges.sl:8:// License as published by the Free Software Foundation; either
k3d/share/shaders/k3d_square_ridges.sl:9:// version 2 of the License, or (at your option) any later version.
k3d/share/shaders/k3d_square_ridges.sl:11:// This program is distributed in the hope that it will be useful,
k3d/share/shaders/k3d_square_ridges.sl:12:// but WITHOUT ANY WARRANTY; without even the implied warranty of
k3d/share/shaders/k3d_square_ridges.sl:13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
k3d/share/shaders/k3d_square_ridges.sl:16:// You should have received a copy of the GNU General Public
k3d/share/shaders/k3d_square_ridges.sl:17:// License along with this program; if not, write to the Free Software
k3d/share/shaders/k3d_square_ridges.sl:21:		\author Tim Shead (tshead@k-3d.com)
k3d/share/shaders/k3d_square_ridges.sl:24:/// Filtering code courtesy of the Advanced RenderMan book ... where else?
k3d/share/shaders/k3d_square_ridges.sl:27:#define filter_width(x) max(abs(Du(x)*du) + abs(Dv(x)*dv), MIN_FILTER_WIDTH)
k3d/share/shaders/k3d_square_ridges.sl:63:	float ridge_position = filtered_pulse_train(0.5 / Frequency, 1.0 / Frequency, t + (Offset / Frequency), filter_width(t));
k3d/share/shaders/k3d_square_ridges.sl:64://	float ridge_position = pulse_train(0.5 / Frequency, 1.0 / Frequency, u, filter_width(u));
k3d/share/shaders/k3d_square_ridges.sl:67:	P += Nn * ((Km * ridge_position) / length(vtransform("shader", Nn)));
k3d/share/shaders/k3d_srfdeformation.sl:1:/* renamed shader to SIG2k_srf_deformation to be consistent with RMR 
k3d/share/shaders/k3d_srfdeformation.sl:7:   deformation surface shader
k3d/share/shaders/k3d_srfdeformation.sl:9:   projects a texture through the camera onto the Pref
k3d/share/shaders/k3d_srfdeformation.sl:10:   object and deforms it to the P position
k3d/share/shaders/k3d_srfdeformation.sl:12:   additionally, calculates the changes to shading on the surface 
k3d/share/shaders/k3d_srfdeformation.sl:13:   measured by the change in diffuse lighting from the Pref to P.
k3d/share/shaders/k3d_srfdeformation.sl:16:   for the user.
k3d/share/shaders/k3d_srfdeformation.sl:50:				   1 = texture deformed with no lighting
k3d/share/shaders/k3d_srfdeformation.sl:51:				   2 = output lighting of the P object
k3d/share/shaders/k3d_srfdeformation.sl:52:				   3 = output lighting of the Pref object
k3d/share/shaders/k3d_srfdeformation.sl:54:    float Kd=1;                 /* Surface Kd for lighting calculations */
k3d/share/shaders/k3d_srfdeformation.sl:56:    varying point Pref = point "shader" (0,0,0);
k3d/share/shaders/k3d_srfdeformation.sl:62:    float illum_width = 180;
k3d/share/shaders/k3d_srfdeformation.sl:73:    /* Calculate shading difference between P and Porig*/
k3d/share/shaders/k3d_srfdeformation.sl:82:    /* These lighting loops can be enhanced to calculate
k3d/share/shaders/k3d_srfdeformation.sl:85:    illuminance(P, N1, radians(illum_width)) {
k3d/share/shaders/k3d_srfdeformation.sl:89:    illuminance(Porig, N2, radians(illum_width)) {
k3d/share/shaders/k3d_srfdeformation.sl:93:    /* Difference in lighting acts as brightness control*/
k3d/share/shaders/k3d_srfdeformation.sl:98:    if (debug == 1) {  /* output the texture - no lighting */
k3d/share/shaders/k3d_srfdeformation.sl:100:    } else if (debug == 2) { /* output texture with P's lighting */
k3d/share/shaders/k3d_srfdeformation.sl:102:    } else if (debug == 3) { /* output texture with Pref's lighting */
k3d/share/shaders/k3d_star.sl:1:/* I took wave's lead and renamed star to DPStar.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_star.sl:6: * AUTHOR: Darwyn Peachy
k3d/share/shaders/k3d_star.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_star.sl:10: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_star.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_star.sl:48:    /* diffuse ("matte") shading model */
k3d/share/shaders/k3d_starfield.sl:2:	Makes a star field.  Best when used as a surface shader for the inside	of a large sphere.
k3d/share/shaders/k3d_starfield.sl:4:	We partition space into a 1x1x1 grid, rendering one solid spherical "star" per cell.
k3d/share/shaders/k3d_starfield.sl:8:	AUTHOR: written by Timothy M. Shead
k3d/share/shaders/k3d_starfield.sl:16:	// Get the nearest star ...
k3d/share/shaders/k3d_starfield.sl:21:	// Calculate the distance to the nearest star ...
k3d/share/shaders/k3d_starfield.sl:24:	float inside_star = 1 - smoothstep(0.0, size, star_distance);
k3d/share/shaders/k3d_stones.sl:5: * Copyright (C) 2002, Rudy Cortes   rcortes@hntb.com
k3d/share/shaders/k3d_stones.sl:8: * This software is placed in the public domain and is provided as is 
k3d/share/shaders/k3d_stones.sl:9: * without express or implied warranty.
k3d/share/shaders/k3d_stones.sl:11: * Shader that creates a surface covered with stones of different sizes,
k3d/share/shaders/k3d_stones.sl:12: * trying to replicate the shader usr for the ground in "A BUGS LIFE".
k3d/share/shaders/k3d_stones.sl:13: * Uses st to create the rocks and "shader" space to create the grunge.
k3d/share/shaders/k3d_stones.sl:15: * Feel free to use this shader to create skin for any character, anywhere and
k3d/share/shaders/k3d_stones.sl:16: * everywhere, Just list me on the credits under "Shading Team" if you use the
k3d/share/shaders/k3d_stones.sl:17: *  hader as is, or under "shader info" if you do any minor modifications to
k3d/share/shaders/k3d_stones.sl:18: * this code.
k3d/share/shaders/k3d_stones.sl:21: * ka, Kd, Ks, roughness = the usual
k3d/share/shaders/k3d_stones.sl:23: * displace = should the surface be bumped(0) or displaced (1)?
k3d/share/shaders/k3d_stones.sl:24: * minfreq & maxfreq = limits to the rock loop excecution
k3d/share/shaders/k3d_stones.sl:25: * grungefreq, grunge_Pow, grunginess = freqeuncy, power and depth of grunge
k3d/share/shaders/k3d_stones.sl:26: * stonecolor, groundcolor = this is obvious, isn't it?
k3d/share/shaders/k3d_stones.sl:27: * varyhue, varysat,varylum  = how much will the color change?
k3d/share/shaders/k3d_stones.sl:31: * modified 10/17/02 Changed algorithms arround to make it render a little faster.
k3d/share/shaders/k3d_stones.sl:33: * NOTE .- This shader is VERY SLOW when you enable bumping, even SLOWER with
k3d/share/shaders/k3d_stones.sl:46:#define fuzzpulse(a,b,fuzz,x) (smoothstep((a)-(fuzz),(a),(x)) - \
k3d/share/shaders/k3d_stones.sl:47:         smoothstep((b)-(fuzz),(b),(x)))
k3d/share/shaders/k3d_stones.sl:51:#define whichtile(x,freq) (floor((x) * (freq)))
k3d/share/shaders/k3d_stones.sl:53:#define filterwidth_point(p) (max(sqrt(area(p)), MINFILTERWIDTH))
k3d/share/shaders/k3d_stones.sl:54:#define udn(x,lo,hi) (smoothstep(.25, .75, noise(x)) * ((hi) - (lo)) + (lo))
k3d/share/shaders/k3d_stones.sl:57:/* varyEach takes a computed color, then tweaks each indexed item
k3d/share/shaders/k3d_stones.sl:58: * separately to add some variation.  Hue, saturation, and lightness
k3d/share/shaders/k3d_stones.sl:60: * lightness multiply.
k3d/share/shaders/k3d_stones.sl:61: * Original by Larry Gritz. Modified to "hsv" by Rudy Cortes
k3d/share/shaders/k3d_stones.sl:63:color varyEach (color Cin; float index, varyhue, varysat, varyval;)
k3d/share/shaders/k3d_stones.sl:65:    /* Convert to "hsv" space, it's more convenient */
k3d/share/shaders/k3d_stones.sl:66:    color Chsv = ctransform ("hsv", Cin);
k3d/share/shaders/k3d_stones.sl:67:    float h = comp(Chsv,0), s = comp(Chsv,1), v = comp(Chsv,2);
k3d/share/shaders/k3d_stones.sl:68:    /* Modify Chsv by adding Cvary scaled by our separate h,s,v controls */
k3d/share/shaders/k3d_stones.sl:69:    h += varyhue * (cellnoise(index+3)-0.5);
k3d/share/shaders/k3d_stones.sl:72:    Chsv = color (mod(h,1), clamp(s,0,1), clamp(v,0,1));
k3d/share/shaders/k3d_stones.sl:73:    /* Clamp hsl and transform back to rgb space */
k3d/share/shaders/k3d_stones.sl:74:    return ctransform ("hsv", "rgb", clamp(Chsv,color 0, color 1));
k3d/share/shaders/k3d_stones.sl:84:          Ks = 0, roughness = 1,
k3d/share/shaders/k3d_stones.sl:93:   float varyhue = .03, varysat = .2, varylum = .25;)
k3d/share/shaders/k3d_stones.sl:100: float r,theta,angle;
k3d/share/shaders/k3d_stones.sl:119:   /*repeat tiles and find out in which tile we are at?*/
k3d/share/shaders/k3d_stones.sl:122:   stile = whichtile(cx,freq * tilefreq);
k3d/share/shaders/k3d_stones.sl:123:   ttile = whichtile(cy,freq * tilefreq);
k3d/share/shaders/k3d_stones.sl:125:   /*tile index to be use in vary each*/
k3d/share/shaders/k3d_stones.sl:128:   /*create buble shapes*/
k3d/share/shaders/k3d_stones.sl:144:   /*create a diferent color for each rock*/
k3d/share/shaders/k3d_stones.sl:145:   layer_color = varyEach(stonecolor, stoneindex,varyhue,varysat,varylum);
k3d/share/shaders/k3d_stones.sl:160:       point PP = transform("shader", P) * grungefreq;
k3d/share/shaders/k3d_stones.sl:161:       float width = filterwidth_point(PP);
k3d/share/shaders/k3d_stones.sl:162:       float cutoff = clamp(0.5 / width, 0, maxfreq);
k3d/share/shaders/k3d_stones.sl:183: /*compute normals and vectors for shading*/
k3d/share/shaders/k3d_stones.sl:191:      Ks * specular(Nf,V,roughness);
k3d/share/shaders/k3d_strata.sl:2: * strata.sl -- surface shader for sedimentary rock strata
k3d/share/shaders/k3d_strata.sl:8: *    Ka, Kd - the usual meaning
k3d/share/shaders/k3d_strata.sl:9: *    txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_strata.sl:10: *    zscale - scaling for the thickness of the layers
k3d/share/shaders/k3d_strata.sl:11: *    turbscale - how turbulent the layers are
k3d/share/shaders/k3d_strata.sl:12: *    offset - z offset for the pattern
k3d/share/shaders/k3d_strata.sl:13: *    octaves - number of octaves of noise to sum for the turbulence
k3d/share/shaders/k3d_strata.sl:21: *    Translation to Shading Language by Larry Gritz.
k3d/share/shaders/k3d_strata.sl:24: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_strata.sl:25: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_strata.sl:30: *    Apr 94 - translation to Shading Language by L. Gritz
k3d/share/shaders/k3d_strata.sl:32: * this file last updated 18 Apr 1994
k3d/share/shaders/k3d_strata.sl:47:  PP = txtscale * transform("shader", P);
k3d/share/shaders/k3d_strata.sl:82:  /* Shade like matte, but with color scaled by cloudcolor and opacity */
k3d/share/shaders/k3d_stucco.sl:2: * stucco.sl -- displacement shader for stucco
k3d/share/shaders/k3d_stucco.sl:8: *   Km 	   	the amplitude of the stucco pimples
k3d/share/shaders/k3d_stucco.sl:9: *   power	   	controls the shape of the pimples
k3d/share/shaders/k3d_stucco.sl:10: *   frequency  	the frequency of the pimples
k3d/share/shaders/k3d_stucco.sl:22:  PP = transform("shader", P);
k3d/share/shaders/k3d_superkagee.sl:13:float do_shadow6(
k3d/share/shaders/k3d_superkagee.sl:14:    uniform string      theName;
k3d/share/shaders/k3d_superkagee.sl:15:    varying point       thePoint;
k3d/share/shaders/k3d_superkagee.sl:16:    uniform ENUM        theFilt;
k3d/share/shaders/k3d_superkagee.sl:17:    uniform float       theBlur,
k3d/share/shaders/k3d_superkagee.sl:18:                        theSamples,
k3d/share/shaders/k3d_superkagee.sl:19:                        theBias;
k3d/share/shaders/k3d_superkagee.sl:22:    uniform string theFilterName = filtTypes[clamp(theFilt,0,1)];
k3d/share/shaders/k3d_superkagee.sl:23:    float inShadow;
k3d/share/shaders/k3d_superkagee.sl:24:#define SHADPOINT thePoint
k3d/share/shaders/k3d_superkagee.sl:25:    inShadow = shadow (theName,
k3d/share/shaders/k3d_superkagee.sl:27:                            "filter",   theFilterName,
k3d/share/shaders/k3d_superkagee.sl:28:                            "blur",     theBlur,
k3d/share/shaders/k3d_superkagee.sl:29:                            "samples",  theSamples,
k3d/share/shaders/k3d_superkagee.sl:30:                            "bias",     theBias);
k3d/share/shaders/k3d_superkagee.sl:31:return(inShadow);
k3d/share/shaders/k3d_superkagee.sl:40:    color shadColor = 0;
k3d/share/shaders/k3d_superkagee.sl:41:    string     shadownamea = "";
k3d/share/shaders/k3d_superkagee.sl:42:            ENUM        shadowfilta = FILT_BOX;
k3d/share/shaders/k3d_superkagee.sl:43:            float       shadowblura = 0,
k3d/share/shaders/k3d_superkagee.sl:44:                        shadowbiasa = 0,
k3d/share/shaders/k3d_superkagee.sl:45:                        shadowsamplesa = 16,
k3d/share/shaders/k3d_superkagee.sl:46:                        shadowdensitya = 1;
k3d/share/shaders/k3d_superkagee.sl:48:    string     shadownameb = "";
k3d/share/shaders/k3d_superkagee.sl:49:            ENUM        shadowfiltb = FILT_BOX;
k3d/share/shaders/k3d_superkagee.sl:50:            float       shadowblurb = 0,
k3d/share/shaders/k3d_superkagee.sl:51:                        shadowbiasb = 0,
k3d/share/shaders/k3d_superkagee.sl:52:                        shadowsamplesb = 16,
k3d/share/shaders/k3d_superkagee.sl:53:                        shadowdensityb = 1;
k3d/share/shaders/k3d_superkagee.sl:55:    string     shadownamec = "";
k3d/share/shaders/k3d_superkagee.sl:56:            ENUM        shadowfiltc = FILT_BOX;
k3d/share/shaders/k3d_superkagee.sl:57:            float       shadowblurc = 0,
k3d/share/shaders/k3d_superkagee.sl:58:                        shadowbiasc = 0,
k3d/share/shaders/k3d_superkagee.sl:59:                        shadowsamplesc = 16,
k3d/share/shaders/k3d_superkagee.sl:60:                        shadowdensityc = 1;
k3d/share/shaders/k3d_superkagee.sl:62:    string     shadownamed = "";
k3d/share/shaders/k3d_superkagee.sl:63:            ENUM        shadowfiltd = FILT_BOX;
k3d/share/shaders/k3d_superkagee.sl:64:            float       shadowblurd = 0,
k3d/share/shaders/k3d_superkagee.sl:65:                        shadowbiasd = 0,
k3d/share/shaders/k3d_superkagee.sl:66:                        shadowsamplesd = 16,
k3d/share/shaders/k3d_superkagee.sl:67:                        shadowdensityd = 1;
k3d/share/shaders/k3d_superkagee.sl:72:"$Id: k3d_superkagee.sl,v 1.1 2004/05/19 18:15:20 tshead Exp $";
k3d/share/shaders/k3d_superkagee.sl:73:    varying float fullShad = 0;
k3d/share/shaders/k3d_superkagee.sl:74:    varying float shadowed;
k3d/share/shaders/k3d_superkagee.sl:75:    if (shadownamea != "") {
k3d/share/shaders/k3d_superkagee.sl:77:        shadowed = clamp(shadowdensitya,0,1) * do_shadow6(shadownamea,P,
k3d/share/shaders/k3d_superkagee.sl:78:                    shadowfilta,shadowblura,shadowsamplesa,shadowbiasa
k3d/share/shaders/k3d_superkagee.sl:81:        fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_superkagee.sl:82:    }if (shadownameb != "") {
k3d/share/shaders/k3d_superkagee.sl:84:        shadowed = clamp(shadowdensityb,0,1) * do_shadow6(shadownameb,P,
k3d/share/shaders/k3d_superkagee.sl:85:                    shadowfiltb,shadowblurb,shadowsamplesb,shadowbiasb
k3d/share/shaders/k3d_superkagee.sl:88:        fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_superkagee.sl:89:    }if (shadownamec != "") {
k3d/share/shaders/k3d_superkagee.sl:91:        shadowed = clamp(shadowdensityc,0,1) * do_shadow6(shadownamec,P,
k3d/share/shaders/k3d_superkagee.sl:92:                    shadowfiltc,shadowblurc,shadowsamplesc,shadowbiasc
k3d/share/shaders/k3d_superkagee.sl:95:        fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_superkagee.sl:96:    }if (shadownamed != "") {
k3d/share/shaders/k3d_superkagee.sl:98:        shadowed = clamp(shadowdensityd,0,1) * do_shadow6(shadownamed,P,
k3d/share/shaders/k3d_superkagee.sl:99:                    shadowfiltd,shadowblurd,shadowsamplesd,shadowbiasd
k3d/share/shaders/k3d_superkagee.sl:102:        fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_superkagee.sl:105:    Ci = Oi * mix(Cs,shadColor,fullShad);
k3d/share/shaders/k3d_superplank.sl:2: * superplank.sl -- another surface shader for wood planks.
k3d/share/shaders/k3d_superplank.sl:5: *   Makes texture of wooden planks in s-t space.  This wood looks rather
k3d/share/shaders/k3d_superplank.sl:6: *   like varnished oak planks, with staggered planks, rings and grain,
k3d/share/shaders/k3d_superplank.sl:7: *   reflections (either traced or via reflection map), and bumps.
k3d/share/shaders/k3d_superplank.sl:8: *   It can make the plank pattern as either straight staggered planks
k3d/share/shaders/k3d_superplank.sl:12: *   Ka, Kd, Ks, specularcolor, roughness - work just like the plastic shader
k3d/share/shaders/k3d_superplank.sl:15: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_superplank.sl:17: *   lightwood - wood-like color from which the various shades are derived.
k3d/share/shaders/k3d_superplank.sl:18: *   plankwidth - width of each plank (in terms of s/t)
k3d/share/shaders/k3d_superplank.sl:19: *   planklength - length of each plank (in terms of s/t)
k3d/share/shaders/k3d_superplank.sl:20: *   groovewidth - width of the grooves between the planks (in terms of s/t)
k3d/share/shaders/k3d_superplank.sl:21: *   groovedepth - depth of the groove indentations (in shader space units)
k3d/share/shaders/k3d_superplank.sl:22: *   groovecolor - the color of the "grooves" between the planks
k3d/share/shaders/k3d_superplank.sl:23: *   plankpattern - plank orientation pattern  1=straight, 2=parquet
k3d/share/shaders/k3d_superplank.sl:25: *   plankstagger - for staggered, how much are the rows of planks staggered
k3d/share/shaders/k3d_superplank.sl:26: *   plankvary - controls how much wood color varies from plank to plank
k3d/share/shaders/k3d_superplank.sl:27: *   ringscale - scaling for the ring spacing
k3d/share/shaders/k3d_superplank.sl:28: *   ringwidth - relative width of the dark ring parts
k3d/share/shaders/k3d_superplank.sl:29: *   wavy - relative wavyness of the ring pattern
k3d/share/shaders/k3d_superplank.sl:31: *   grainscale - scaling for the fine grain
k3d/share/shaders/k3d_superplank.sl:32: *   graindepth - depth of grain and ring grooves
k3d/share/shaders/k3d_superplank.sl:33: *   varnishbumpfreq - frequency of bumps in the varnish coating
k3d/share/shaders/k3d_superplank.sl:34: *   varnishbumpamp - height of bumps in the varnish coating
k3d/share/shaders/k3d_superplank.sl:36: * Antialiasing: this shader does a pretty good job of antialiasing itself,
k3d/share/shaders/k3d_superplank.sl:37: *   even with low sampling densities.
k3d/share/shaders/k3d_superplank.sl:39: * Author: written by Larry Gritz
k3d/share/shaders/k3d_superplank.sl:46:#include "k3d_noises.h"
k3d/share/shaders/k3d_superplank.sl:47:#include "k3d_patterns.h"
k3d/share/shaders/k3d_superplank.sl:55:			float Ks = .75, roughness = .02;	/* Spec highlight control */
k3d/share/shaders/k3d_superplank.sl:63:			color lightwood = color(.5, .2, .067);	/* light wood color */
k3d/share/shaders/k3d_superplank.sl:65:			float plankpattern = 1;	/* 1=straight, 2=parquet */
k3d/share/shaders/k3d_superplank.sl:67:			float plankwidth = .05;	/* Width of a plank */
k3d/share/shaders/k3d_superplank.sl:68:			float planklength = .75;	/* Length of a plank */
k3d/share/shaders/k3d_superplank.sl:69:			float groovewidth = 0.001;	/* Width of the grooves between planks */
k3d/share/shaders/k3d_superplank.sl:70:			float groovedepth = .0004;	/* Depth of the groove */
k3d/share/shaders/k3d_superplank.sl:72:			float plankstagger = 1;	/* How much should rows be staggered */
k3d/share/shaders/k3d_superplank.sl:75:			float ringscale = 25;	/* Larger makes more, thinner rings */
k3d/share/shaders/k3d_superplank.sl:76:			float ringwidth = 1;	/* Relative ring width */
k3d/share/shaders/k3d_superplank.sl:80:			float graindepth = 0.0001;	/* Depth of divots where grains are */
k3d/share/shaders/k3d_superplank.sl:81:			float varnishbumpfreq = 30;	/* Bump freq of the varnish */
k3d/share/shaders/k3d_superplank.sl:82:			float varnishbumpamp = 0.0003;	/* How big are the varnish bumps? */
k3d/share/shaders/k3d_superplank.sl:89:  float swidth, twidth, fwidth;
k3d/share/shaders/k3d_superplank.sl:93:  float whichrow, whichplank;	/* Index for each row & plank within row */
k3d/share/shaders/k3d_superplank.sl:94:  float w, h;			/* temporaries */
k3d/share/shaders/k3d_superplank.sl:100:  float ring;			/* 1 in a ring darkening, 0 where not */
k3d/share/shaders/k3d_superplank.sl:101:  float grain;			/* 1 inside a grain bit, 0 elsewhere */
k3d/share/shaders/k3d_superplank.sl:109:  float shadlen;		/* length of a unit of shader space */
k3d/share/shaders/k3d_superplank.sl:110:  float disp;			/* accumulate displacement here */
k3d/share/shaders/k3d_superplank.sl:120:   * Determine the basic mapping, filter sizes for antialiasing, other
k3d/share/shaders/k3d_superplank.sl:121:   * values used throughout the shader.
k3d/share/shaders/k3d_superplank.sl:124:  /* First, determine the basic mapping */
k3d/share/shaders/k3d_superplank.sl:127:  /* Compute the basic filter size for antialiasing */
k3d/share/shaders/k3d_superplank.sl:128:  swidth = filterwidth(ss);
k3d/share/shaders/k3d_superplank.sl:129:  twidth = filterwidth(tt);
k3d/share/shaders/k3d_superplank.sl:130:  fwidth = max(swidth, twidth);
k3d/share/shaders/k3d_superplank.sl:132:  /* How much current space corresponds to a unit of s or t?
k3d/share/shaders/k3d_superplank.sl:133:   * We will use this later to help scale the displacement, this making
k3d/share/shaders/k3d_superplank.sl:134:   * the bumps scale relative to the overall pattern, rather than being
k3d/share/shaders/k3d_superplank.sl:135:   * strictly tied to the scale of the object.
k3d/share/shaders/k3d_superplank.sl:137:  overallscale = (length(Deriv(P, ss)));
k3d/share/shaders/k3d_superplank.sl:143:   * Determine which row and plank we're on, and come up with an
k3d/share/shaders/k3d_superplank.sl:144:   * antialiased term for whether we're in or out of a groove.
k3d/share/shaders/k3d_superplank.sl:148:      /* Straight, staggered planks */
k3d/share/shaders/k3d_superplank.sl:149:      PGWIDTH = plankwidth + groovewidth;
k3d/share/shaders/k3d_superplank.sl:150:      PGHEIGHT = planklength + groovewidth;
k3d/share/shaders/k3d_superplank.sl:152:      whichrow = floor(plank_s);
k3d/share/shaders/k3d_superplank.sl:153:      /* Jiggle each row */
k3d/share/shaders/k3d_superplank.sl:154:      plank_t = tt / PGHEIGHT + 20 * plankstagger * cellnoise(whichrow);
k3d/share/shaders/k3d_superplank.sl:155:      whichplank = floor(plank_t);
k3d/share/shaders/k3d_superplank.sl:160:      PGWIDTH = plankwidth + groovewidth;
k3d/share/shaders/k3d_superplank.sl:163:      whichrow = floor(plank_s);
k3d/share/shaders/k3d_superplank.sl:165:      whichplank = floor(plank_t);
k3d/share/shaders/k3d_superplank.sl:166:      if(mod((whichrow / plankspertile) + whichplank, 2) >= 1)
k3d/share/shaders/k3d_superplank.sl:170:	  whichrow = floor(plank_s);
k3d/share/shaders/k3d_superplank.sl:171:	  whichplank = floor(plank_t);
k3d/share/shaders/k3d_superplank.sl:175:	  tmp = swidth;
k3d/share/shaders/k3d_superplank.sl:176:	  swidth = twidth;
k3d/share/shaders/k3d_superplank.sl:177:	  twidth = tmp;
k3d/share/shaders/k3d_superplank.sl:180:  /* Now whichplank is a unique integer index for each plank */
k3d/share/shaders/k3d_superplank.sl:182:  /* Figure out where the grooves are.  The value groovy is 0 where there
k3d/share/shaders/k3d_superplank.sl:183:   * are grooves, 1 where the wood grain is visible.  Do some simple
k3d/share/shaders/k3d_superplank.sl:184:   * antialiasing by trying to box filter the edges of the grooves.
k3d/share/shaders/k3d_superplank.sl:187:  /* compute half width & length of groove as fraction of plank size */
k3d/share/shaders/k3d_superplank.sl:188:  GWF = groovewidth * 0.5 / PGWIDTH;
k3d/share/shaders/k3d_superplank.sl:189:  GHF = groovewidth * 0.5 / PGHEIGHT;
k3d/share/shaders/k3d_superplank.sl:190:  sw = swidth / PGWIDTH;
k3d/share/shaders/k3d_superplank.sl:191:  tw = twidth / PGHEIGHT;
k3d/share/shaders/k3d_superplank.sl:193:    w = 1 - 2 * GWF;		/* Filter width is wider than the plank itself */
k3d/share/shaders/k3d_superplank.sl:195:    w = filteredpulse(whichrow + GWF, whichrow + 1 - GWF, plank_s, sw);
k3d/share/shaders/k3d_superplank.sl:197:    h = 1 - 2 * GHF;		/* Filter width is longer than the plank itself */
k3d/share/shaders/k3d_superplank.sl:199:    h = filteredpulse(whichplank + GHF, whichplank + 1 - GHF, plank_t, tw);
k3d/share/shaders/k3d_superplank.sl:200:  groovy = w * h;
k3d/share/shaders/k3d_superplank.sl:205:   * The wood has rings at one scale, grain at a finer scale.  They
k3d/share/shaders/k3d_superplank.sl:209:  /* Compute the filter width first, so we don't bother with more if
k3d/share/shaders/k3d_superplank.sl:210:   * the rings are too small to see.
k3d/share/shaders/k3d_superplank.sl:212:  fwidth = max(swidth * ringscale, twidth * ringscale);
k3d/share/shaders/k3d_superplank.sl:213:  fade = smoothstep(.75, 4, fwidth);
k3d/share/shaders/k3d_superplank.sl:218:      ttt = ring_t + whichplank * 28.38 + wavy * noise(8 * ring_s, ring_t);
k3d/share/shaders/k3d_superplank.sl:219:      ring = ringscale * noise(ring_s - whichplank * 4.18, ttt / 20);
k3d/share/shaders/k3d_superplank.sl:222:	0.3 + 0.7 * smoothstep(.55 - .35 * ringwidth, 0.55,
k3d/share/shaders/k3d_superplank.sl:223:			       ring) * (1 - smoothstep(0.75, 0.8, ring));
k3d/share/shaders/k3d_superplank.sl:227:      fwidth = max(swidth * grainscale, twidth * grainscale);
k3d/share/shaders/k3d_superplank.sl:228:      fade = smoothstep(.75, 4, fwidth);
k3d/share/shaders/k3d_superplank.sl:247:  /* Start with the light wood color */
k3d/share/shaders/k3d_superplank.sl:248:  woodcolor = lightwood;
k3d/share/shaders/k3d_superplank.sl:251:    1 - plankvary / 2 + plankvary * float cellnoise(whichplank, whichrow);
k3d/share/shaders/k3d_superplank.sl:252:  /* Darken the wood according to the ring and grain patterns */
k3d/share/shaders/k3d_superplank.sl:254:  /* Combine the rings, grain, plank variation into one surface color */
k3d/share/shaders/k3d_superplank.sl:256:  /* Less specular in the grooves, more specular in the dark wood. */
k3d/share/shaders/k3d_superplank.sl:263:   * We do some bump mapping to make the grooves and grain depressed,
k3d/share/shaders/k3d_superplank.sl:264:   * and add some general lumpiness to the varnish layer.
k3d/share/shaders/k3d_superplank.sl:269:      disp = -groovedepth * (1 - groovy);
k3d/share/shaders/k3d_superplank.sl:270:      /* Random bumps on the varnish */
k3d/share/shaders/k3d_superplank.sl:271:      if(varnishbumpamp > 0)
k3d/share/shaders/k3d_superplank.sl:273:	  varnishbumpamp * (2 *
k3d/share/shaders/k3d_superplank.sl:274:			    noise(varnishbumpfreq * ss,
k3d/share/shaders/k3d_superplank.sl:275:				  varnishbumpfreq * tt) - 1);
k3d/share/shaders/k3d_superplank.sl:277:      disp -= graindepth * (.75 * grain + ring);
k3d/share/shaders/k3d_superplank.sl:278:      /* Find out how long a unit of shader space is, in current units */
k3d/share/shaders/k3d_superplank.sl:280:      shadlen = overallscale / length(ntransform("shader", NN));
k3d/share/shaders/k3d_superplank.sl:283:      N = calculatenormal(P + (Km * shadlen * disp) * NN);
k3d/share/shaders/k3d_superplank.sl:289:   * The wood itself behaves like plastic, the varnish overtop reflects
k3d/share/shaders/k3d_superplank.sl:290:   * using the fresnel formula (grazing angles reflect like mirrors).
k3d/share/shaders/k3d_superplank.sl:303:    lightsource("__nonspecular", nonspec);
k3d/share/shaders/k3d_superplank.sl:309:		smoothstep(.6, .85, pow(max(0, Nf.H), 8 / roughness)));
k3d/share/shaders/k3d_superpplastic.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_superpplastic.sl:4: * The RenderMan (R) Interface Procedures and RIB Protocol are:
k3d/share/shaders/k3d_superpplastic.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_superpplastic.sl:9: *    Apply a texture map to a plastic surface, indexing the texture
k3d/share/shaders/k3d_superpplastic.sl:10: *    by the s,t parameters of the surface.
k3d/share/shaders/k3d_superpplastic.sl:13: *    Ka, Kd, Ks, roughness, specularcolor - the usual meaning.
k3d/share/shaders/k3d_superpplastic.sl:14: *    texturename - the name of the texture file.
k3d/share/shaders/k3d_superpplastic.sl:21:surface k3d_superpplastic(float Ka = 1, Kd = .5, Ks = .5, roughness = .1;
k3d/share/shaders/k3d_superpplastic.sl:25:			  float Swidth = 1; float Twidth = 1;)
k3d/share/shaders/k3d_superpplastic.sl:48:		    "samples", samples, "swidth", Swidth, "twidth", Twidth,
k3d/share/shaders/k3d_superpplastic.sl:58:	  specularcolor * Ks * specular(Nf, V, roughness));
k3d/share/shaders/k3d_supertexmap.sl:5: *    Apply a texture map (possibly with associated alpha) 
k3d/share/shaders/k3d_supertexmap.sl:6: *    to a plastic surface.  This is essentially a replacement for the
k3d/share/shaders/k3d_supertexmap.sl:7: *    standard "paintedplastic", but with much more flexibility in the
k3d/share/shaders/k3d_supertexmap.sl:8: *    coordinate mapping of the texture.
k3d/share/shaders/k3d_supertexmap.sl:11: *    Ka, Kd, Ks, roughness, specularcolor - the usual meaning.
k3d/share/shaders/k3d_supertexmap.sl:12: *    texturename - the name of the texture file.
k3d/share/shaders/k3d_supertexmap.sl:13: *    projection - specifies the projection type, one of "st", "planar",
k3d/share/shaders/k3d_supertexmap.sl:14: *                 "perspective", "cylindrical", "spherical".
k3d/share/shaders/k3d_supertexmap.sl:15: *    textureprojspace - the space in which the texture projection is
k3d/share/shaders/k3d_supertexmap.sl:16: *                applied; either a standard space like "shader", or a
k3d/share/shaders/k3d_supertexmap.sl:18: *    mx - 16 floats giving an 3-D affine transformation to apply to the
k3d/share/shaders/k3d_supertexmap.sl:22: * Author: Larry Gritz (gritzl@acm.org)
k3d/share/shaders/k3d_supertexmap.sl:26: *   by Anthony A. Apodaca and Larry Gritz, Morgan Kaufmann, 1999.
k3d/share/shaders/k3d_supertexmap.sl:30:#include "k3d_filterwidth.h"
k3d/share/shaders/k3d_supertexmap.sl:31:#include "k3d_project.h"
k3d/share/shaders/k3d_supertexmap.sl:32:#include "k3d_displace.h"
k3d/share/shaders/k3d_supertexmap.sl:33:#include "k3d_material.h"
k3d/share/shaders/k3d_supertexmap.sl:36:surface k3d_supertexmap(float Ka = 1, Kd = .5, Ks = .5, roughness = .1;
k3d/share/shaders/k3d_supertexmap.sl:39:			"shader";
k3d/share/shaders/k3d_supertexmap.sl:46:			"shader";
k3d/share/shaders/k3d_supertexmap.sl:53:			"shader";
k3d/share/shaders/k3d_supertexmap.sl:60:			"shader";
k3d/share/shaders/k3d_supertexmap.sl:68:  /* Start out with the regular plastic parameters, unless overridden
k3d/share/shaders/k3d_supertexmap.sl:104:  Ci = MaterialPlastic(Nf, Ct, Ka, Kd, ks, roughness);
k3d/share/shaders/k3d_supertoon.sl:2: * <felipe@siggraph.org.mx>, abril 2002

k3d/share/shaders/k3d_supertoon.sl:4: * Toon shader con antialiasing. Modula diffuse mediante escaloneo de modo que

k3d/share/shaders/k3d_supertoon.sl:6: * hace en tres puntos definidos por lim2, lim3 y lim4. A falta de antialiasing

k3d/share/shaders/k3d_supertoon.sl:7: * analitico se utiliza delta para determinar el nivel de antialiasing del shader.

k3d/share/shaders/k3d_supertoon.sl:9: * Toon shader with non-analitic antialiasing (controlled by delta). Difusion is modulated with

k3d/share/shaders/k3d_supertoon.sl:10: * clamping, the inflection points are lim2, lim3 and lim4. This shader is very cheap, 

k3d/share/shaders/k3d_supertoon.sl:11: * reason why no border detection is allowed. Now with specular.

k3d/share/shaders/k3d_supertoon.sl:18:    C = smoothstep(lim2 - delta, lim2 + delta, comp(valor, 0))* lim2;

k3d/share/shaders/k3d_supertoon.sl:21:    C = lim2 + (smoothstep(lim3 - delta, lim3 + delta, comp(valor, 0))* lim3);

k3d/share/shaders/k3d_supertoon.sl:24:    C = lim3 + (smoothstep(lim4 - delta, lim4, comp(valor, 0))* lim4);

k3d/share/shaders/k3d_supertoon.sl:32:                        roughness = 0.5, /* specular roughness */

k3d/share/shaders/k3d_supertoon.sl:44:    if(Ks != 0){ /* Some optimization. If the multiplier is zero, why call an expensive function? */

k3d/share/shaders/k3d_supertoon.sl:45:      especular = specular(Nf, -NI, roughness);

k3d/share/shaders/k3d_terran.sl:2:mottle_limit, mottle_scale, moddle_dim, mottle_mag - control the
k3d/share/shaders/k3d_terran.sl:3:           mottling that adds detail to lower latitude regions.
k3d/share/shaders/k3d_terran.sl:10:/* This is because PRMAN's noise has less range than BMRT's */
k3d/share/shaders/k3d_terran.sl:30:		   float ice_caps = 0.9; float depth_scale = 1;
k3d/share/shaders/k3d_terran.sl:31:		   float depth_max = .5; float mottle_limit = 0.75;
k3d/share/shaders/k3d_terran.sl:37:  float chaos, latitude, purt;
k3d/share/shaders/k3d_terran.sl:40:  float l, o, a, i, weight;	/* Loop variables for fBm calc */
k3d/share/shaders/k3d_terran.sl:43:  /* Do all shading in shader space */
k3d/share/shaders/k3d_terran.sl:44:  Ptexture = transform("shader", P);
k3d/share/shaders/k3d_terran.sl:45:  PtN = normalize(Ptexture);	/* Version of Ptexture with radius 1 */
k3d/share/shaders/k3d_terran.sl:48:   * First, figure out where we are in relation to the oceans/mountains.
k3d/share/shaders/k3d_terran.sl:49:   * Note: this section of code must be identical to "terranbump" if you
k3d/share/shaders/k3d_terran.sl:50:   *       expect these two shaders to work well together.
k3d/share/shaders/k3d_terran.sl:67:      /* get "distortion" vector, as used with clouds */
k3d/share/shaders/k3d_terran.sl:69:      /* compute bump vector using MfBm with displaced point */
k3d/share/shaders/k3d_terran.sl:72:      weight = abs(VLNoise(tp, 1.5));
k3d/share/shaders/k3d_terran.sl:73:      bumpy = weight * snoise(tp);
k3d/share/shaders/k3d_terran.sl:74:      for(i = 1; i < octaves && weight >= VERY_SMALL; i += 1)
k3d/share/shaders/k3d_terran.sl:77:	  /* get subsequent values, weighted by previous value */
k3d/share/shaders/k3d_terran.sl:78:	  weight *= o * (N_OFFSET + snoise(tp));
k3d/share/shaders/k3d_terran.sl:79:	  weight = clamp(abs(weight), 0, 1);
k3d/share/shaders/k3d_terran.sl:80:	  bumpy += snoise(tp) * min(weight, spectral_exp);
k3d/share/shaders/k3d_terran.sl:85:  /* get the "height" of the bump, displacing by offset */
k3d/share/shaders/k3d_terran.sl:86:  chaos = bumpy + offset;
k3d/share/shaders/k3d_terran.sl:88:  if(chaos > sea_level)
k3d/share/shaders/k3d_terran.sl:90:      chaos *= mtn_scale;
k3d/share/shaders/k3d_terran.sl:96:   * Step 2: Assign a climite type, roughly by latitude.
k3d/share/shaders/k3d_terran.sl:99:  /* make climate symmetric about equator -- use the "v" parameter */
k3d/share/shaders/k3d_terran.sl:102:  /* fractally purturb color map offset using "chaos" */
k3d/share/shaders/k3d_terran.sl:105:  latitude += chaos * (nonlinear * (1 - latitude) + purt_scale);
k3d/share/shaders/k3d_terran.sl:112:  if(chaos > sea_level)
k3d/share/shaders/k3d_terran.sl:114:      /* Choose color of land based on the following spline.
k3d/share/shaders/k3d_terran.sl:115:       * Ken originally had a huge table.  I was too lazy to type it in,
k3d/share/shaders/k3d_terran.sl:116:       * so I used a scanned photo of the real Earth to select some
k3d/share/shaders/k3d_terran.sl:141:      /* mottle the color some */
k3d/share/shaders/k3d_terran.sl:165:	  chaos -= sea_level;
k3d/share/shaders/k3d_terran.sl:166:	  chaos *= depth_scale;
k3d/share/shaders/k3d_terran.sl:167:	  chaos = max(chaos, -depth_max);
k3d/share/shaders/k3d_terran.sl:168:	  Ct *= (1 + chaos);
k3d/share/shaders/k3d_terran.sl:172:  /* Shade using matte model */
k3d/share/shaders/k3d_terran2.sl:1:/* Was terran.sl -- changed color spline to not use white 
k3d/share/shaders/k3d_terran2.sl:2:  -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_terran2.sl:5: * terran.sl - surface for an Earth-like planet.
k3d/share/shaders/k3d_terran2.sl:9: *      When put on a sphere, sets the color to look like relatively
k3d/share/shaders/k3d_terran2.sl:10: *   Earth-like.  The shader works by using a variety of fractal 
k3d/share/shaders/k3d_terran2.sl:11: *   turbulence and mottling techniques.
k3d/share/shaders/k3d_terran2.sl:12: *      Note that there is a companion displacement shader "terranbump"
k3d/share/shaders/k3d_terran2.sl:13: *   which is necessary to get the best effect.  If you do this, it is
k3d/share/shaders/k3d_terran2.sl:14: *   important that the parameters common to "terran" and "terranbump"
k3d/share/shaders/k3d_terran2.sl:15: *   both be set to the same values.  Otherwise you get bumpy mountains
k3d/share/shaders/k3d_terran2.sl:16: *   in the middle of the ocean.
k3d/share/shaders/k3d_terran2.sl:20: *    Ka, Kd - the usual meaning
k3d/share/shaders/k3d_terran2.sl:21: *    spectral_exp, lacunarity, octaves - control the fractal characteristics
k3d/share/shaders/k3d_terran2.sl:22: *                of the bump pattern.
k3d/share/shaders/k3d_terran2.sl:23: *    bump_scale - scaling of the mountains
k3d/share/shaders/k3d_terran2.sl:31: *    ice_caps - latitude at which ice caps tend to form on the oceans
k3d/share/shaders/k3d_terran2.sl:32: *    depth_scale, depth_max - scaling factor and max depth of oceans
k3d/share/shaders/k3d_terran2.sl:33: *    mottle_limit, mottle_scale, moddle_dim, mottle_mag - control the
k3d/share/shaders/k3d_terran2.sl:34: *               mottling that adds detail to lower latitude regions.
k3d/share/shaders/k3d_terran2.sl:38: *       The default values for the shader assume that the planet is
k3d/share/shaders/k3d_terran2.sl:39: *    represented by a unit sphere.  The texture space and/or parameters
k3d/share/shaders/k3d_terran2.sl:40: *    to this shader will need to be altered if the size of your planet
k3d/share/shaders/k3d_terran2.sl:42: *       For best results, use with the "terranbump" displacement shader,
k3d/share/shaders/k3d_terran2.sl:43: *    and add a cloud layer using either "planetclouds" or "venusclouds".
k3d/share/shaders/k3d_terran2.sl:47: *    Conversion to Shading Language and minor modifications by Larry Gritz.
k3d/share/shaders/k3d_terran2.sl:55: *    Feb 1994 - Conversion to Shading Language by L. Gritz
k3d/share/shaders/k3d_terran2.sl:56: *    1 March 1994 by lg
k3d/share/shaders/k3d_terran2.sl:57: *    May 28 1995 Didn't want polar caps so removed white from color spline --
k3d/share/shaders/k3d_terran2.sl:58: *       tal@SpamSucks_cs.caltech.edu
k3d/share/shaders/k3d_terran2.sl:66:/* This is because PRMAN's noise has less range than BMRT's */
k3d/share/shaders/k3d_terran2.sl:91:	  float depth_scale = 1;
k3d/share/shaders/k3d_terran2.sl:92:	  float depth_max = .5;
k3d/share/shaders/k3d_terran2.sl:100:  float chaos, latitude, purt;
k3d/share/shaders/k3d_terran2.sl:103:  float l, o, a, i, weight;      /* Loop variables for fBm calc */
k3d/share/shaders/k3d_terran2.sl:106:  /* Do all shading in shader space */
k3d/share/shaders/k3d_terran2.sl:107:  Ptexture = transform ("shader", P);
k3d/share/shaders/k3d_terran2.sl:108:  PtN = normalize (Ptexture);      /* Version of Ptexture with radius 1 */
k3d/share/shaders/k3d_terran2.sl:111:   * First, figure out where we are in relation to the oceans/mountains.
k3d/share/shaders/k3d_terran2.sl:112:   * Note: this section of code must be identical to "terranbump" if you
k3d/share/shaders/k3d_terran2.sl:113:   *       expect these two shaders to work well together.
k3d/share/shaders/k3d_terran2.sl:125:      /* get "distortion" vector, as used with clouds */
k3d/share/shaders/k3d_terran2.sl:127:      /* compute bump vector using MfBm with displaced point */
k3d/share/shaders/k3d_terran2.sl:129:      weight = abs (VLNoise (tp, 1.5));
k3d/share/shaders/k3d_terran2.sl:130:      bumpy = weight * snoise (tp);
k3d/share/shaders/k3d_terran2.sl:131:      for (i = 1;  i < octaves  &&  weight >= VERY_SMALL;  i += 1) {
k3d/share/shaders/k3d_terran2.sl:133:	  /* get subsequent values, weighted by previous value */
k3d/share/shaders/k3d_terran2.sl:134:	  weight *= o * (N_OFFSET + snoise(tp));
k3d/share/shaders/k3d_terran2.sl:135:	  weight = clamp (abs(weight), 0, 1);
k3d/share/shaders/k3d_terran2.sl:136:	  bumpy += snoise(tp) * min (weight, spectral_exp);
k3d/share/shaders/k3d_terran2.sl:141:  /* get the "height" of the bump, displacing by offset */
k3d/share/shaders/k3d_terran2.sl:142:  chaos = bumpy + offset;
k3d/share/shaders/k3d_terran2.sl:144:  if (chaos > sea_level) {
k3d/share/shaders/k3d_terran2.sl:145:      chaos *= mtn_scale;
k3d/share/shaders/k3d_terran2.sl:151:   * Step 2: Assign a climite type, roughly by latitude.
k3d/share/shaders/k3d_terran2.sl:154:  /* make climate symmetric about equator -- use the "v" parameter */
k3d/share/shaders/k3d_terran2.sl:157:  /* fractally purturb color map offset using "chaos" */
k3d/share/shaders/k3d_terran2.sl:160:  latitude += chaos*(nonlinear*(1-latitude) + purt_scale);
k3d/share/shaders/k3d_terran2.sl:166:  if (chaos > sea_level) {
k3d/share/shaders/k3d_terran2.sl:167:      /* Choose color of land based on the following spline.
k3d/share/shaders/k3d_terran2.sl:168:       * Ken originally had a huge table.  I was too lazy to type it in,
k3d/share/shaders/k3d_terran2.sl:169:       * so I used a scanned photo of the real Earth to select some
k3d/share/shaders/k3d_terran2.sl:201:     /* mottle the color some */
k3d/share/shaders/k3d_terran2.sl:220:          chaos -= sea_level;
k3d/share/shaders/k3d_terran2.sl:221:	  chaos *= depth_scale;
k3d/share/shaders/k3d_terran2.sl:222:	  chaos = max (chaos, -depth_max);
k3d/share/shaders/k3d_terran2.sl:223:	  Ct *= (1+chaos);
k3d/share/shaders/k3d_terran2.sl:227:  /* Shade using matte model */
k3d/share/shaders/k3d_terranbump.sl:6:/* This is because PRMAN's noise has less range than BMRT's */
k3d/share/shaders/k3d_terranbump.sl:23:  float chaos;
k3d/share/shaders/k3d_terranbump.sl:25:  float l, o, a, i, weight;	/* Loop variables for fBm calc */
k3d/share/shaders/k3d_terranbump.sl:28:  /* Do all shading in shader space */
k3d/share/shaders/k3d_terranbump.sl:29:  Ptexture = transform("shader", P);
k3d/share/shaders/k3d_terranbump.sl:45:      /* get "distortion" vector, as used with clouds */
k3d/share/shaders/k3d_terranbump.sl:47:      /* compute bump vector using MfBm with displaced point */
k3d/share/shaders/k3d_terranbump.sl:50:      weight = abs(VLNoise(tp, 1.5));
k3d/share/shaders/k3d_terranbump.sl:51:      bumpy = weight * snoise(tp);
k3d/share/shaders/k3d_terranbump.sl:52:      for(i = 1; i < octaves && weight >= VERY_SMALL; i += 1)
k3d/share/shaders/k3d_terranbump.sl:55:	  /* get subsequent values, weighted by previous value */
k3d/share/shaders/k3d_terranbump.sl:56:	  weight *= o * (N_OFFSET + snoise(tp));
k3d/share/shaders/k3d_terranbump.sl:57:	  weight = clamp(abs(weight), 0, 1);
k3d/share/shaders/k3d_terranbump.sl:58:	  bumpy += snoise(tp) * min(weight, spectral_exp);
k3d/share/shaders/k3d_terranbump.sl:63:  /* get the "height" of the bump, displacing by offset */
k3d/share/shaders/k3d_terranbump.sl:64:  chaos = bumpy + offset;
k3d/share/shaders/k3d_terranbump.sl:67:  if(chaos > sea_level)
k3d/share/shaders/k3d_terranbump.sl:70:  /* Recalculate the surface normal (this is where all the real magic is!) */
k3d/share/shaders/k3d_texblender.sl:3:#include "k3d_filterwidth.h"
k3d/share/shaders/k3d_texblender.sl:4:#include "k3d_project.h"
k3d/share/shaders/k3d_texblender.sl:5:#include "k3d_displace.h"
k3d/share/shaders/k3d_texblender.sl:6:#include "k3d_material.h"
k3d/share/shaders/k3d_texblender.sl:7:#include "k3d_reflections.h"
k3d/share/shaders/k3d_texblender.sl:8:#include "k3d_locillum.h"
k3d/share/shaders/k3d_texblender.sl:9:#include "k3d_noises.h"
k3d/share/shaders/k3d_texblender.sl:12:                       float Ka, Kd, Ks, roughness,selft,Kr,Krfr;)
k3d/share/shaders/k3d_texblender.sl:17:     + Ks*specular(Nf,-normalize(I),roughness);
k3d/share/shaders/k3d_texblender.sl:24:    float alpha;
k3d/share/shaders/k3d_texblender.sl:27:            C = ReflMap (envname, P, blur, alpha);
k3d/share/shaders/k3d_texblender.sl:29:            C = Environment (envname, envspace, envrad, P, R, blur, alpha);
k3d/share/shaders/k3d_texblender.sl:34:    color Cray = RayTrace (P, R, Kr, sqrt(blur), rayjitter, raysamples, alpha);
k3d/share/shaders/k3d_texblender.sl:35:    C = Cray + (1-alpha) * C;
k3d/share/shaders/k3d_texblender.sl:43:	float x,hx;
k3d/share/shaders/k3d_texblender.sl:52:	hx=mod(x,1000000)/1000;
k3d/share/shaders/k3d_texblender.sl:53:	x=mod(x+hx+x*100,1000);
k3d/share/shaders/k3d_texblender.sl:57:float tex_clouds(point P;float depth)
k3d/share/shaders/k3d_texblender.sl:63:	for(i=0;i<depth;i=i+1)
k3d/share/shaders/k3d_texblender.sl:84:    r = 0.2 + 0.8 * smoothstep(0.2, 0.55, r) * (1 - smoothstep(0.75, 0.8, r));
k3d/share/shaders/k3d_texblender.sl:107:		newc=texture(mapname,s*scalex,t*scaley,"blur",blur,"fill",-1,"width",0);
k3d/share/shaders/k3d_texblender.sl:108:    if (comp(newc,1)==-1) newc=comp(newc,0); /* treat a 1-channel texture map as a greyscale */
k3d/share/shaders/k3d_texblender.sl:132:k3d_texblender (float Ka = 1, Kd = .5, Ks = .2, roughness = .3, Kr=0,selft=0;
k3d/share/shaders/k3d_texblender.sl:147:		float Depth[5]={3,3,3,3,3};
k3d/share/shaders/k3d_texblender.sl:158:    float disp = 0,i,Alpha=1;
k3d/share/shaders/k3d_texblender.sl:169:											Depth[i],Gblur[i]);
k3d/share/shaders/k3d_texblender.sl:170:    float MF=(comp(MC,0)+comp(MC,1)+comp(MC,2))/3; // when we want a float
k3d/share/shaders/k3d_texblender.sl:173:		if((Alpha*cKmap[i])!=0) Ct=BlendColor(mode,Alpha*cKmap[i],MC,Ct);
k3d/share/shaders/k3d_texblender.sl:174:		if((Alpha*oKmap[i])!=0) Ot=BlendColor(mode,Alpha*oKmap[i],MC,Ot);
k3d/share/shaders/k3d_texblender.sl:175:		if((Alpha*sKmap[i])!=0) ks=BlendFloat(mode,Alpha*sKmap[i],MF,ks);
k3d/share/shaders/k3d_texblender.sl:176:		if((Alpha*mKmap[i])!=0) kr=BlendFloat(mode,Alpha*mKmap[i],MF,kr);
k3d/share/shaders/k3d_texblender.sl:177:		if((Alpha*rKmap[i])!=0) roughness=BlendFloat(mode,Alpha*rKmap[i],
k3d/share/shaders/k3d_texblender.sl:178:                                                 MF,roughness);
k3d/share/shaders/k3d_texblender.sl:179:		if(aKmap[i]!=0) Alpha=BlendFloat("f",aKmap[i],MF,1);
k3d/share/shaders/k3d_texblender.sl:180:		if((Alpha*iKmap[i])!=0) selft=BlendFloat(mode,Alpha*iKmap[i],MF,selft);
k3d/share/shaders/k3d_texblender.sl:181:		if((Alpha*bKmap[i])!=0) disp=BlendFloat(mode,Alpha*bKmap[i],MF,disp);
k3d/share/shaders/k3d_texblender.sl:185:			ndir=normalize(corr+Displace(dispDir,"shader",disp,0));
k3d/share/shaders/k3d_texblender.sl:209:				Ka,Kd,ks,roughness,selft,kr,Krfr);
k3d/share/shaders/k3d_threads.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_threads.sl:2:/* From the RenderMan Companion p.367 */
k3d/share/shaders/k3d_threads.sl:3:/* Listing 16.24  Displacement shader providing light-bulb threads to cylinder */
k3d/share/shaders/k3d_threads.sl:6: * threads(): wrap threads around a cylinder 
k3d/share/shaders/k3d_threads.sl:9:k3d_threads ( 
k3d/share/shaders/k3d_threads.sl:12:		phase		=  .0,
k3d/share/shaders/k3d_threads.sl:18:	/* Calculate the undamped displacement */
k3d/share/shaders/k3d_threads.sl:19:	magnitude = (sin( PI*2*(t*frequency + s + phase))+offset) * Km;
k3d/share/shaders/k3d_threads.sl:21:	/* Damp the displacement to 0 at each end */
k3d/share/shaders/k3d_threads.sl:27:	/* Do the displacement */
k3d/share/shaders/k3d_tooledsteel.sl:3: *  feel free to copy, distribute, hack and/or abuse this code 
k3d/share/shaders/k3d_tooledsteel.sl:4: *  in any way you see fit, but please leave my name near the top
k3d/share/shaders/k3d_tooledsteel.sl:6: *  a combination of IDbrushedmetal.sl and the Worley-esque
k3d/share/shaders/k3d_tooledsteel.sl:7: *  F1 from bubbly.sl adapted to happen in parameter space.
k3d/share/shaders/k3d_tooledsteel.sl:8: *  A vector is computed from the gradient of the distance function,
k3d/share/shaders/k3d_tooledsteel.sl:9: *  and then used as the vector of anisotropy. works best on parametric
k3d/share/shaders/k3d_tooledsteel.sl:10: *  surfaces where you don't care about the seams. 
k3d/share/shaders/k3d_tooledsteel.sl:11: *  (like that'll ever happen...)
k3d/share/shaders/k3d_tooledsteel.sl:12: *  thanks to Jos Stam whose animated cube motivated this thing.
k3d/share/shaders/k3d_tooledsteel.sl:17: *  Nzscale 		- scale of the noise that randomizes the location of 
k3d/share/shaders/k3d_tooledsteel.sl:18: *          		  the swirls. set this to zero for a perfect grid.
k3d/share/shaders/k3d_tooledsteel.sl:23: *  specwidth		- the width of the specular stripe
k3d/share/shaders/k3d_tooledsteel.sl:25: *  specspread		- the spread of the specular stripe
k3d/share/shaders/k3d_tooledsteel.sl:27: *  mapspread		- the spread of the reflection map streaking
k3d/share/shaders/k3d_tooledsteel.sl:29: *  twist		- allows you to twist the direction of anisotropy
k3d/share/shaders/k3d_tooledsteel.sl:31: *  mapname		- name of the environment map
k3d/share/shaders/k3d_tooledsteel.sl:32: *  specularcolor	- color of the specular hilight
k3d/share/shaders/k3d_tooledsteel.sl:47:  float dist, shortest=10000;
k3d/share/shaders/k3d_tooledsteel.sl:56:  float chu, chv;
k3d/share/shaders/k3d_tooledsteel.sl:66:  /*what is the shortest distance to a noised cell center?*/
k3d/share/shaders/k3d_tooledsteel.sl:75:	if(dist<shortest){
k3d/share/shaders/k3d_tooledsteel.sl:76:	  shortest = dist;
k3d/share/shaders/k3d_tooledsteel.sl:82:  chu = valu - shortest;
k3d/share/shaders/k3d_tooledsteel.sl:83:  chv = valv - shortest;
k3d/share/shaders/k3d_tooledsteel.sl:84:  out  = normalize((udir*chu)+(vdir*chv));
k3d/share/shaders/k3d_tooledsteel.sl:89:anisospecular (vector VA; float specspread; float specwidth)
k3d/share/shaders/k3d_tooledsteel.sl:108:        lightsource ("__nonspecular", nonspec);
k3d/share/shaders/k3d_tooledsteel.sl:114:            C += Cl * pixbrdf * pow( 1-abs(VA.H), 1/specwidth );
k3d/share/shaders/k3d_tooledsteel.sl:129:		specwidth	= .5,
k3d/share/shaders/k3d_tooledsteel.sl:166:	specularcolor * Ks * anisospecular(VA, specspread*2, specwidth*.1)) +
k3d/share/shaders/k3d_toonmap.sl:8:float roughness=0.107; 
k3d/share/shaders/k3d_toonmap.sl:9:string Highlight_Map="";
k3d/share/shaders/k3d_toonmap.sl:10:color Highlight_Color=(1, 1, 1); 
k3d/share/shaders/k3d_toonmap.sl:11:float channel4=0; 
k3d/share/shaders/k3d_toonmap.sl:12:float swidth4=1; 
k3d/share/shaders/k3d_toonmap.sl:13:float twidth4=1; 
k3d/share/shaders/k3d_toonmap.sl:19:float channel3=0; 
k3d/share/shaders/k3d_toonmap.sl:20:float swidth3=1; 
k3d/share/shaders/k3d_toonmap.sl:21:float twidth3=1; 
k3d/share/shaders/k3d_toonmap.sl:28:float ink_thresh=0.389; 
k3d/share/shaders/k3d_toonmap.sl:32:float channel2=0; 
k3d/share/shaders/k3d_toonmap.sl:33:float swidth2=1; 
k3d/share/shaders/k3d_toonmap.sl:34:float twidth2=1; 
k3d/share/shaders/k3d_toonmap.sl:41:/** Texture_Highlight_Map **/
k3d/share/shaders/k3d_toonmap.sl:47:if ( Highlight_Map=="" ) 
k3d/share/shaders/k3d_toonmap.sl:49:temt_c4=Highlight_Color;
k3d/share/shaders/k3d_toonmap.sl:53:if (channel4 < 0 || channel4 > 3)
k3d/share/shaders/k3d_toonmap.sl:55:temt_c4=texture(Highlight_Map,temp_ss4,temp_tt4,"swidth",swidth4,"twidth",twidth4,"samples",samples4);
k3d/share/shaders/k3d_toonmap.sl:59:temt_c4=texture(Highlight_Map[channel4],temp_ss4,temp_tt4,"swidth",swidth4,"twidth",twidth4,"samples",samples4);
k3d/share/shaders/k3d_toonmap.sl:74:if (channel3 < 0 || channel3 > 3)
k3d/share/shaders/k3d_toonmap.sl:76:temt_c3=texture(Paint_Map,temp_ss3,temp_tt3,"swidth",swidth3,"twidth",twidth3,"samples",samples3);
k3d/share/shaders/k3d_toonmap.sl:80:temt_c3=texture(Paint_Map[channel3],temp_ss3,temp_tt3,"swidth",swidth3,"twidth",twidth3,"samples",samples3);
k3d/share/shaders/k3d_toonmap.sl:95:if (channel2 < 0 || channel2 > 3)
k3d/share/shaders/k3d_toonmap.sl:97:temt_c2=texture(Ink_Map,temp_ss2,temp_tt2,"swidth",swidth2,"twidth",twidth2,"samples",samples2);
k3d/share/shaders/k3d_toonmap.sl:101:temt_c2=texture(Ink_Map[channel2],temp_ss2,temp_tt2,"swidth",swidth2,"twidth",twidth2,"samples",samples2);
k3d/share/shaders/k3d_toonmap.sl:108:toonspec(vector N, V; float roughness)
k3d/share/shaders/k3d_toonmap.sl:115:C += pow(N.H, 1/roughness);
k3d/share/shaders/k3d_toonmap.sl:120:float cos_here;
k3d/share/shaders/k3d_toonmap.sl:123:vector normI, half;
k3d/share/shaders/k3d_toonmap.sl:142:/* antialias the transition */
k3d/share/shaders/k3d_toonmap.sl:143:diff = smoothstep(paint_trans - paint_fuzz/2, paint_trans + paint_fuzz/2, diff);
k3d/share/shaders/k3d_toonmap.sl:146:spec = toonspec(Nf, -normalize(I), roughness);
k3d/share/shaders/k3d_toonmap.sl:147:spec = smoothstep(paint_spec - paint_fuzz/2, paint_spec + paint_fuzz/2, spec);
k3d/share/shaders/k3d_toonmap.sl:157:cos_here = normalize(Nf).normI;
k3d/share/shaders/k3d_toonmap.sl:160:layer_opac = 1 - smoothstep(ink_thresh - ink_fuzz/2, ink_thresh + ink_fuzz/2, abs(cos_here));
k3d/share/shaders/k3d_toonmap.sl:162:if (abs(cos_here) < ink_thresh)
k3d/share/shaders/k3d_translucency.sl:4:* Shader: Double side translucency shader
k3d/share/shaders/k3d_translucency.sl:6:* Author: Xavier Matia Bernasconi - The Chimney Pot -
k3d/share/shaders/k3d_translucency.sl:12:*		translucency texture for each side of a flat object
k3d/share/shaders/k3d_translucency.sl:13:*		It also implement the Stephen H. Westin velvet
k3d/share/shaders/k3d_translucency.sl:17:* Tips & Tricks: The transTx and TransTx2 values can be used,
k3d/share/shaders/k3d_translucency.sl:18:*		 when a texture is present, as scale value for the texture.
k3d/share/shaders/k3d_translucency.sl:19:*		 Don't use white on the translucency texture.
k3d/share/shaders/k3d_translucency.sl:20:*		 It burns out the surface color.
k3d/share/shaders/k3d_translucency.sl:23:*	 If you use it in some production please email me the result.
k3d/share/shaders/k3d_translucency.sl:26:* Shader birthdate: 31-08-2000
k3d/share/shaders/k3d_translucency.sl:36:			float roughness = 0.1;
k3d/share/shaders/k3d_translucency.sl:38:			color sheen = 0.25;
k3d/share/shaders/k3d_translucency.sl:64:	color shiny;
k3d/share/shaders/k3d_translucency.sl:115:	shiny = 0;
k3d/share/shaders/k3d_translucency.sl:120:		shiny += pow (cosine, 1.0/roughness) / (ln.Nf) * Cl * sheen;
k3d/share/shaders/k3d_translucency.sl:123:		shiny += pow(sine, 10.0)*ln.Nf * Cl*sheen;
k3d/share/shaders/k3d_translucency.sl:127:	Ci = Ct * (Ka*ambient() + Kd*diffuse(Nf) + Kt*diffuse(-Nf)) + Ks*specular(Nf,V,roughness) + shiny;
k3d/share/shaders/k3d_uberlight.sl:2: * uberlight.sl - a light with many fun controls.
k3d/share/shaders/k3d_uberlight.sl:5: *   Based on Ronen Barzel's paper "Lighting Controls for Computer
k3d/share/shaders/k3d_uberlight.sl:6: *   Cinematography" (in Journal of Graphics Tools, vol. 2, no. 1: 1-20).
k3d/share/shaders/k3d_uberlight.sl:8: * Rather than explicitly pass "from" and "to" points to indicate the
k3d/share/shaders/k3d_uberlight.sl:9: * position and direction of the light (as spotlight does), this light
k3d/share/shaders/k3d_uberlight.sl:10: * emits from the origin of the local light shader space and points
k3d/share/shaders/k3d_uberlight.sl:11: * toward the +z axis (also in shader space).  Thus, to position and
k3d/share/shaders/k3d_uberlight.sl:12: * orient the light source, you must translate and rotate the
k3d/share/shaders/k3d_uberlight.sl:13: * coordinate system in effect when the light source is declared.
k3d/share/shaders/k3d_uberlight.sl:14: * Perhaps this is a new idea for some users, but it isn't really
k3d/share/shaders/k3d_uberlight.sl:15: * hard, and it vastly simplifies the math in the shader.
k3d/share/shaders/k3d_uberlight.sl:17: * Basic color/brightness controls:
k3d/share/shaders/k3d_uberlight.sl:18: *   intensity - overall intensity scaling of the light
k3d/share/shaders/k3d_uberlight.sl:19: *   lightcolor - overall color filtering for the light
k3d/share/shaders/k3d_uberlight.sl:21: * Light type:
k3d/share/shaders/k3d_uberlight.sl:22: *   lighttype - one of "spot", "omni", or "arealight".  Spot lights are
k3d/share/shaders/k3d_uberlight.sl:23: *       those that point in a particular direction (+z in local light
k3d/share/shaders/k3d_uberlight.sl:24: *       space, for this light).  Omni lights throw light in all directions.
k3d/share/shaders/k3d_uberlight.sl:25: *       Area lights are emitted from actual geometry (this only works on
k3d/share/shaders/k3d_uberlight.sl:26: *       BMRT area lights for the time being).
k3d/share/shaders/k3d_uberlight.sl:28: * Distance shaping and falloff controls:
k3d/share/shaders/k3d_uberlight.sl:29: *   cuton, cutoff - define the depth range (z range from the origin, in
k3d/share/shaders/k3d_uberlight.sl:30: *       light coordinates) over which the light is active.  Outside
k3d/share/shaders/k3d_uberlight.sl:31: *       this range, no energy is transmitted.
k3d/share/shaders/k3d_uberlight.sl:32: *   nearedge, faredge - define the width of the transition regions
k3d/share/shaders/k3d_uberlight.sl:33: *       for the cuton and cutoff.  The transitions will be smooth.
k3d/share/shaders/k3d_uberlight.sl:34: *   falloff - defines the exponent for falloff.  A falloff of 0 (the
k3d/share/shaders/k3d_uberlight.sl:35: *       default) indicates that the light is the same brightness
k3d/share/shaders/k3d_uberlight.sl:36: *       regardless of distance from the source.  Falloff==1 indicates
k3d/share/shaders/k3d_uberlight.sl:38: *       (which is physically correct for point-like sources, but
k3d/share/shaders/k3d_uberlight.sl:39: *       sometimes hard to use).
k3d/share/shaders/k3d_uberlight.sl:40: *   falloffdist - the distance at which the incident energy is actually
k3d/share/shaders/k3d_uberlight.sl:41: *       equal to intensity*lightcolor.  In other words, the intensity
k3d/share/shaders/k3d_uberlight.sl:43: *   maxintensity - to prevent the light from becoming unboundedly
k3d/share/shaders/k3d_uberlight.sl:44: *       large when the distance < falloffdist, the intensity is
k3d/share/shaders/k3d_uberlight.sl:45: *       smoothly clamped to this maximum value.
k3d/share/shaders/k3d_uberlight.sl:46: *   parallelrays - when 0 (the default), the light appears to emanate
k3d/share/shaders/k3d_uberlight.sl:47: *       from a single point (i.e., the rays diverge).  When nonzero, 
k3d/share/shaders/k3d_uberlight.sl:48: *       the light rays are parallel, as if from an infinitely distant
k3d/share/shaders/k3d_uberlight.sl:49: *       source (like the sun).
k3d/share/shaders/k3d_uberlight.sl:51: * Shaping of the cross-section.  The cross-section of the light cone
k3d/share/shaders/k3d_uberlight.sl:52: * is actually described by a superellipse with the following
k3d/share/shaders/k3d_uberlight.sl:54: *   shearx, sheary - define the amount of shear applied to the light
k3d/share/shaders/k3d_uberlight.sl:55: *       cone direction.  Default is 0, meaning that the center of the
k3d/share/shaders/k3d_uberlight.sl:56: *       light cone is aligned with the z-axis in local light space.
k3d/share/shaders/k3d_uberlight.sl:57: *   width, height - define the dimensions of the "barn door" opening.
k3d/share/shaders/k3d_uberlight.sl:58: *       They are the cross-sectional dimensions at a distance of 1
k3d/share/shaders/k3d_uberlight.sl:59: *       from the light.  In other words, width==height==1 indicates a
k3d/share/shaders/k3d_uberlight.sl:60: *       90 degree cone angle for the light.
k3d/share/shaders/k3d_uberlight.sl:61: *   wedge, hedge - the amount of width and height edge fuzz,
k3d/share/shaders/k3d_uberlight.sl:62: *       respectively.  Values of 0 will make a sharp cutoff, larger
k3d/share/shaders/k3d_uberlight.sl:63: *       values (up to 1) will make the edge softer.
k3d/share/shaders/k3d_uberlight.sl:64: *   roundness - controls how rounded the corners of the superellipse
k3d/share/shaders/k3d_uberlight.sl:65: *       are.  If this value is 0, the cross-section will be a perfect
k3d/share/shaders/k3d_uberlight.sl:66: *       rectangle.  If the value is 1, the cross-section will be a
k3d/share/shaders/k3d_uberlight.sl:67: *       perfect ellipse.  In-between values control the roundness of
k3d/share/shaders/k3d_uberlight.sl:68: *       the corners in a fairly obvious way.
k3d/share/shaders/k3d_uberlight.sl:70: *       A value of 0 (the default) means no angle falloff.  A value
k3d/share/shaders/k3d_uberlight.sl:71: *       of 1 is roughly physically correct for a spotlight and 
k3d/share/shaders/k3d_uberlight.sl:72: *       corresponds to a cosine falloff.  For a BMRT area light, the
k3d/share/shaders/k3d_uberlight.sl:73: *       cosine falloff happens automatically, so 0 is the right physical
k3d/share/shaders/k3d_uberlight.sl:74: *       value to use.  In either case, you may use larger values to
k3d/share/shaders/k3d_uberlight.sl:75: *       make the spot more bright in the center than the outskirts.
k3d/share/shaders/k3d_uberlight.sl:76: *       This parameter has no effect for omni lights.
k3d/share/shaders/k3d_uberlight.sl:80: *       done and the light emitted from the source will be filtered
k3d/share/shaders/k3d_uberlight.sl:81: *       by that color, much like a slide projector.  If you want to
k3d/share/shaders/k3d_uberlight.sl:82: *       make a texture map that simply blocks light, just make it
k3d/share/shaders/k3d_uberlight.sl:83: *       black-and-white, but store it as an RGB texture.  For
k3d/share/shaders/k3d_uberlight.sl:84: *       simplicity, the shader assumes that the texture file will
k3d/share/shaders/k3d_uberlight.sl:85: *       have at least three channels.
k3d/share/shaders/k3d_uberlight.sl:87: * Projected noise on the light:
k3d/share/shaders/k3d_uberlight.sl:88: *   noiseamp - amplitude of the noise.  A value of 0 (the default) 
k3d/share/shaders/k3d_uberlight.sl:89: *       means not to use noise.  Larger values increase the blotchiness
k3d/share/shaders/k3d_uberlight.sl:90: *       of the projected noise.
k3d/share/shaders/k3d_uberlight.sl:91: *   noisefreq - frequency of the noise.
k3d/share/shaders/k3d_uberlight.sl:92: *   noiseoffset - spatial offset of the noise.  This can be animated,
k3d/share/shaders/k3d_uberlight.sl:93: *       for example, you can use the noise to simulate the
k3d/share/shaders/k3d_uberlight.sl:94: *       attenuation of light as it passes through a window with 
k3d/share/shaders/k3d_uberlight.sl:97: * Shadow mapped shadows.  For PRMan (and perhaps other renderers),
k3d/share/shaders/k3d_uberlight.sl:98: * shadows are mainly computed by shadow maps.  Please consult the
k3d/share/shaders/k3d_uberlight.sl:99: * PRMan documentation for more information on the meanings of these
k3d/share/shaders/k3d_uberlight.sl:101: *   shadowmap - the name of the texture containing the shadow map.  If
k3d/share/shaders/k3d_uberlight.sl:102: *       this value is "" (the default), no shadow map will be used.
k3d/share/shaders/k3d_uberlight.sl:103: *   shadowblur - how soft to make the shadow edge, expressed as a
k3d/share/shaders/k3d_uberlight.sl:104: *       percentage of the width of the entire shadow map.
k3d/share/shaders/k3d_uberlight.sl:105: *   shadowbias - the amount of shadow bias to add to the lookup.
k3d/share/shaders/k3d_uberlight.sl:106: *   shadownsamps - the number of samples to use.
k3d/share/shaders/k3d_uberlight.sl:108: * Ray-traced shadows.  These options work only for BMRT:
k3d/share/shaders/k3d_uberlight.sl:109: *   raytraceshadow - if nonzero, cast rays to see if we are in shadow.
k3d/share/shaders/k3d_uberlight.sl:110: *       The default is zero, i.e., not to try raytracing.
k3d/share/shaders/k3d_uberlight.sl:111: *   nshadowrays - The number of rays to trace to determine shadowing.
k3d/share/shaders/k3d_uberlight.sl:112: *   shadowcheat - add this offset to the light source position.  This
k3d/share/shaders/k3d_uberlight.sl:113: *       allows you to cause the shadows to emanate as if the light
k3d/share/shaders/k3d_uberlight.sl:114: *       were someplace else, but without changing the area
k3d/share/shaders/k3d_uberlight.sl:115: *       illuminated or the appearance of highlights, etc.
k3d/share/shaders/k3d_uberlight.sl:117: * "Fake" shadows from a blocker object.  A blocker is a superellipse
k3d/share/shaders/k3d_uberlight.sl:118: * in 3-space which effectively blocks light.  But it's not really
k3d/share/shaders/k3d_uberlight.sl:119: * geometry, the shader just does the intersection with the
k3d/share/shaders/k3d_uberlight.sl:120: * superellipse.  The blocker is defined to lie on the x-y plane of
k3d/share/shaders/k3d_uberlight.sl:121: * its own coordinate system (which obviously needs to be defined in
k3d/share/shaders/k3d_uberlight.sl:122: * the RIB file using the CoordinateSystem command).
k3d/share/shaders/k3d_uberlight.sl:123: *   blockercoords - the name of the coordinate system that defines the
k3d/share/shaders/k3d_uberlight.sl:124: *       local coordinates of the blocker.  If this is "", it indicates 
k3d/share/shaders/k3d_uberlight.sl:125: *       that the shader should not use a blocker at all.
k3d/share/shaders/k3d_uberlight.sl:126: *   blockerwidth, blockerheight - define the dimensions of the blocker's
k3d/share/shaders/k3d_uberlight.sl:127: *       superellipse shape.
k3d/share/shaders/k3d_uberlight.sl:128: *   blockerwedge, blockerhedge - define the fuzzyness of the edges.
k3d/share/shaders/k3d_uberlight.sl:129: *   blockerround - how round the corners of the blocker are (same
k3d/share/shaders/k3d_uberlight.sl:130: *       control as the "roundness" parameter that affects the light
k3d/share/shaders/k3d_uberlight.sl:131: *       cone shape.
k3d/share/shaders/k3d_uberlight.sl:133: * Joint shadow controls:
k3d/share/shaders/k3d_uberlight.sl:134: *   shadowcolor - Shadows (i.e., those regions with "occlusion" as
k3d/share/shaders/k3d_uberlight.sl:135: *       defined by any or all of the shadow map, ray cast, or
k3d/share/shaders/k3d_uberlight.sl:136: *       blocker) don't actually have to block light.  In fact, in
k3d/share/shaders/k3d_uberlight.sl:137: *       this shader, shadowed regions actually just change the color
k3d/share/shaders/k3d_uberlight.sl:138: *       of the light to "shadowcolor".  If this color is set to
k3d/share/shaders/k3d_uberlight.sl:139: *       (0,0,0), it effectively blocks all light.  But if you set it
k3d/share/shaders/k3d_uberlight.sl:140: *       to, say (.25,.25,.25), it will make the shadowed regions lose
k3d/share/shaders/k3d_uberlight.sl:141: *       their full brightness but not go completely dark.  Another
k3d/share/shaders/k3d_uberlight.sl:142: *       use is if you are simulating sunlight: set the lightcolor to
k3d/share/shaders/k3d_uberlight.sl:143: *       something yellowish and make the shadowcolor dark but
k3d/share/shaders/k3d_uberlight.sl:144: *       somewhat bluish.  Another effect of shadows is to set the
k3d/share/shaders/k3d_uberlight.sl:145: *       __nonspecular flag so that the shadowed regions are lit only
k3d/share/shaders/k3d_uberlight.sl:146: *       diffusely, without highlights.
k3d/share/shaders/k3d_uberlight.sl:148: * Other controls:
k3d/share/shaders/k3d_uberlight.sl:149: *   nonspecular - when set to 1, this light does not create
k3d/share/shaders/k3d_uberlight.sl:150: *       specular highlights!  The default is 0, which means it makes
k3d/share/shaders/k3d_uberlight.sl:151: *       highlights just fine (except for regions in shadows, as
k3d/share/shaders/k3d_uberlight.sl:152: *       explained above).  This is very handy for lights that are
k3d/share/shaders/k3d_uberlight.sl:153: *       meant to be fill lights, rather than key lights.
k3d/share/shaders/k3d_uberlight.sl:154: *       NOTE: This depends on the surface shader looking for, and
k3d/share/shaders/k3d_uberlight.sl:155: *       correctly acting upon, this parameter.  The built-in functions
k3d/share/shaders/k3d_uberlight.sl:156: *       diffuse(), specular() and phong() all do this, for PRMan 3.5
k3d/share/shaders/k3d_uberlight.sl:158: *       your own illuminance loops in your surface shader, you've got
k3d/share/shaders/k3d_uberlight.sl:159: *       to account for it yourself.  The PRMan user manual explains how
k3d/share/shaders/k3d_uberlight.sl:160: *       to do this.
k3d/share/shaders/k3d_uberlight.sl:161: *   __nondiffuse - the analog to nonspecular; if this flag is set to
k3d/share/shaders/k3d_uberlight.sl:162: *       1, this light will only cast specular highlights but not
k3d/share/shaders/k3d_uberlight.sl:163: *       diffuse light.  This is useful for making a light that only
k3d/share/shaders/k3d_uberlight.sl:164: *       makes specular highlights, without affecting the rest of the
k3d/share/shaders/k3d_uberlight.sl:165: *       illumination in the scene.  All the same caveats apply with
k3d/share/shaders/k3d_uberlight.sl:166: *       respect to the surface shader, as described above for
k3d/share/shaders/k3d_uberlight.sl:168: *   __foglight - the "noisysmoke" shader distributed with BMRT will add
k3d/share/shaders/k3d_uberlight.sl:169: *       atmospheric scattering only for those lights that have this
k3d/share/shaders/k3d_uberlight.sl:170: *       parameter set to 1 (the default).  In other words, if you use
k3d/share/shaders/k3d_uberlight.sl:171: *       this light with noisysmoke, you can set this flag to 0 to
k3d/share/shaders/k3d_uberlight.sl:172: *       make a particular light *not* cause illumination in the fog.
k3d/share/shaders/k3d_uberlight.sl:173: *       Note that the noisysmoke shader is distributed with BMRT but
k3d/share/shaders/k3d_uberlight.sl:174: *       will also work just fine with PRMan (3.7 or later).
k3d/share/shaders/k3d_uberlight.sl:176: * NOTE: this shader has one each of: blocker, shadow map, slide, and
k3d/share/shaders/k3d_uberlight.sl:177: * noise texture.  Some advanced users may want more than one of some or
k3d/share/shaders/k3d_uberlight.sl:178: * all of these.  It is left as an exercise for the reader to make such
k3d/share/shaders/k3d_uberlight.sl:179: * extensions to the shader.
k3d/share/shaders/k3d_uberlight.sl:183: * This shader was written as part of the course notes for ACM
k3d/share/shaders/k3d_uberlight.sl:184: * SIGGRAPH '98, course 11, "Advanced RenderMan: Beyond the Companion"
k3d/share/shaders/k3d_uberlight.sl:185: * (co-chaired by Tony Apodaca and Larry Gritz).  Feel free to use and
k3d/share/shaders/k3d_uberlight.sl:186: * distribute the source code of this shader, but please leave the
k3d/share/shaders/k3d_uberlight.sl:189: * This shader was tested using Pixar's PhotoRealistic RenderMan 3.7
k3d/share/shaders/k3d_uberlight.sl:190: * and the Blue Moon Rendering Tools (BMRT) release 2.3.6.  I have
k3d/share/shaders/k3d_uberlight.sl:191: * tried to avoid Shading Language constructs which wouldn't work on
k3d/share/shaders/k3d_uberlight.sl:192: * older versions of these renderers, but I do make liberal use of the
k3d/share/shaders/k3d_uberlight.sl:193: * "vector" type and I often declare variables where they are used,
k3d/share/shaders/k3d_uberlight.sl:194: * rather than only at the beginning of blocks.  If you are using a
k3d/share/shaders/k3d_uberlight.sl:195: * renderer which does not support these new language features, just
k3d/share/shaders/k3d_uberlight.sl:196: * substitute "point" for all occurrances of "vector", and move the
k3d/share/shaders/k3d_uberlight.sl:197: * variable declarations to the top of the shader.
k3d/share/shaders/k3d_uberlight.sl:199: * Author: coded by Larry Gritz, 1998
k3d/share/shaders/k3d_uberlight.sl:209:/* Comment out the following line if you do *not* wish to use BMRT and
k3d/share/shaders/k3d_uberlight.sl:210: * PRMan together.
k3d/share/shaders/k3d_uberlight.sl:212://#include "k3d_rayserver.h"
k3d/share/shaders/k3d_uberlight.sl:218: *   - point Q on the x-y plane
k3d/share/shaders/k3d_uberlight.sl:219: *   - the equations of two superellipses (with major/minor axes given by
k3d/share/shaders/k3d_uberlight.sl:220: *        a,b and A,B for the inner and outer ellipses, respectively)
k3d/share/shaders/k3d_uberlight.sl:222: *   - 0 if Q was inside the inner ellipse
k3d/share/shaders/k3d_uberlight.sl:223: *   - 1 if Q was outside the outer ellipse
k3d/share/shaders/k3d_uberlight.sl:224: *   - smoothly varying from 0 to 1 in between
k3d/share/shaders/k3d_uberlight.sl:226:float clipSuperellipse(point Q;	/* Test point on the x-y plane */
k3d/share/shaders/k3d_uberlight.sl:229:		       float roundness;	/* Same roundness for both ellipses */
k3d/share/shaders/k3d_uberlight.sl:239:	  result = 1 - (1 - smoothstep(a, A, x)) * (1 - smoothstep(b, B, y));
k3d/share/shaders/k3d_uberlight.sl:250:	  result = smoothstep(q, r, 1);
k3d/share/shaders/k3d_uberlight.sl:258:	  result = smoothstep(q, r, 1);
k3d/share/shaders/k3d_uberlight.sl:268:/* Volumetric light shaping
k3d/share/shaders/k3d_uberlight.sl:270: *   - the point being shaded, in the local light space
k3d/share/shaders/k3d_uberlight.sl:271: *   - all information about the light shaping, including z smooth depth
k3d/share/shaders/k3d_uberlight.sl:272: *     clipping, superellipse x-y shaping, and distance falloff.
k3d/share/shaders/k3d_uberlight.sl:274: *   - attenuation factor based on the falloff and shaping
k3d/share/shaders/k3d_uberlight.sl:276:float ShapeLightVolume(point PL;	/* Point in light space */
k3d/share/shaders/k3d_uberlight.sl:277:		       string lighttype;	/* what kind of light */
k3d/share/shaders/k3d_uberlight.sl:278:		       vector axis;	/* light axis */
k3d/share/shaders/k3d_uberlight.sl:283:		       float shearx, sheary;	/* shear the direction */
k3d/share/shaders/k3d_uberlight.sl:284:		       float width, height;	/* xy superellipse */
k3d/share/shaders/k3d_uberlight.sl:285:		       float hedge, wedge, roundness;
k3d/share/shaders/k3d_uberlight.sl:289:  /* Examine the z depth of PL to apply the (possibly smooth) cuton and
k3d/share/shaders/k3d_uberlight.sl:293:  float PLlen = length(PL);
k3d/share/shaders/k3d_uberlight.sl:295:  if(lighttype == "spot")
k3d/share/shaders/k3d_uberlight.sl:301:      /* For omni or area lights, use distance from the light */
k3d/share/shaders/k3d_uberlight.sl:304:  atten *= smoothstep(znear - nearedge, znear, Pz);
k3d/share/shaders/k3d_uberlight.sl:305:  atten *= 1 - smoothstep(zfar, zfar + faredge, Pz);
k3d/share/shaders/k3d_uberlight.sl:323:  if(lighttype != "omni" && beamdistribution > 0)
k3d/share/shaders/k3d_uberlight.sl:325:  if(lighttype == "spot")
k3d/share/shaders/k3d_uberlight.sl:328:	1 - clipSuperellipse(PL / Pz - point(shearx, sheary, 0), width,
k3d/share/shaders/k3d_uberlight.sl:329:			     height, width + wedge, height + hedge,
k3d/share/shaders/k3d_uberlight.sl:338:/* Evaluate the occlusion between two points, P1 and P2, due to a fake
k3d/share/shaders/k3d_uberlight.sl:339: * blocker.  Return 0 if the light is totally blocked, 1 if it totally
k3d/share/shaders/k3d_uberlight.sl:340: * gets through.
k3d/share/shaders/k3d_uberlight.sl:344:			  float blockerwidth, blockerheight;
k3d/share/shaders/k3d_uberlight.sl:345:			  float blockerwedge, blockerhedge;
k3d/share/shaders/k3d_uberlight.sl:350:  /* Get the surface and light positions in blocker coords */
k3d/share/shaders/k3d_uberlight.sl:356:      vector Vlight = (Pb1 - Pb2);
k3d/share/shaders/k3d_uberlight.sl:357:      point Pplane = Pb1 - Vlight * (zcomp(Pb1) / zcomp(Vlight));
k3d/share/shaders/k3d_uberlight.sl:359:	clipSuperellipse(Pplane, blockerwidth, blockerheight,
k3d/share/shaders/k3d_uberlight.sl:360:			 blockerwidth + blockerwedge,
k3d/share/shaders/k3d_uberlight.sl:361:			 blockerheight + blockerhedge, blockerround);
k3d/share/shaders/k3d_uberlight.sl:369:light k3d_uberlight(
k3d/share/shaders/k3d_uberlight.sl:370:		     /* Basic intensity and color of the light */
k3d/share/shaders/k3d_uberlight.sl:371:		     string lighttype = "spot"; float intensity = 1;
k3d/share/shaders/k3d_uberlight.sl:372:		     color lightcolor = color(1, 1, 1);
k3d/share/shaders/k3d_uberlight.sl:373:		     /* Z shaping and distance falloff */
k3d/share/shaders/k3d_uberlight.sl:378:		     /* xy shaping of the cross-section and angle falloff */
k3d/share/shaders/k3d_uberlight.sl:379:		     float shearx = 0, sheary = 0;
k3d/share/shaders/k3d_uberlight.sl:380:		     float width = 1, height = 1, wedge = .1, hedge = .1;
k3d/share/shaders/k3d_uberlight.sl:383:		     /* Cookie or slide to control light cross-sectional color */
k3d/share/shaders/k3d_uberlight.sl:385:		     /* Noisy light */
k3d/share/shaders/k3d_uberlight.sl:388:		     /* Shadow mapped shadows */
k3d/share/shaders/k3d_uberlight.sl:389:		     string shadowmap = "";
k3d/share/shaders/k3d_uberlight.sl:390:		     float shadowblur = 0.01, shadowbias = .01, shadownsamps =
k3d/share/shaders/k3d_uberlight.sl:392:		     color shadowcolor = 0;
k3d/share/shaders/k3d_uberlight.sl:393:		     /* Ray traced shadows */
k3d/share/shaders/k3d_uberlight.sl:394:		     float raytraceshadow = 0, nshadowrays = 1;
k3d/share/shaders/k3d_uberlight.sl:395:		     vector shadowcheat = vector "shader"(0, 0, 0);
k3d/share/shaders/k3d_uberlight.sl:396:		     /* Fake blocker shadow */
k3d/share/shaders/k3d_uberlight.sl:398:		     float blockerwidth = 1, blockerheight = 1;
k3d/share/shaders/k3d_uberlight.sl:399:		     float blockerwedge = .1, blockerhedge =
k3d/share/shaders/k3d_uberlight.sl:405:		     output float __foglight = 1;)
k3d/share/shaders/k3d_uberlight.sl:407:  /* For simplicity, assume that the light is at the origin of shader
k3d/share/shaders/k3d_uberlight.sl:408:   * space and aimed in the +z direction.  So to move or orient the
k3d/share/shaders/k3d_uberlight.sl:409:   * light, you transform the coordinate system in the RIB stream, prior
k3d/share/shaders/k3d_uberlight.sl:410:   * to instancing the light shader.  But that sure simplifies the
k3d/share/shaders/k3d_uberlight.sl:411:   * internals of the light shader!  Anyway, let PL be the position of
k3d/share/shaders/k3d_uberlight.sl:412:   * the surface point we're shading, expressed in the local light
k3d/share/shaders/k3d_uberlight.sl:413:   * shader coordinates.
k3d/share/shaders/k3d_uberlight.sl:415:  point PL = transform("shader", Ps);
k3d/share/shaders/k3d_uberlight.sl:417:  /* If it's an area light, we want the point and normal of the light
k3d/share/shaders/k3d_uberlight.sl:418:   * geometry.  If not an area light, BMRT guarantees P,N will be the
k3d/share/shaders/k3d_uberlight.sl:419:   * origin and z-axis of shader space.
k3d/share/shaders/k3d_uberlight.sl:424:  /* For PRMan, we've gotta do it the hard way */
k3d/share/shaders/k3d_uberlight.sl:425:  point from = point "shader"(0, 0, 0);
k3d/share/shaders/k3d_uberlight.sl:426:  vector axis = normalize(vector "shader"(0, 0, 1));
k3d/share/shaders/k3d_uberlight.sl:429:  if(lighttype == "spot")
k3d/share/shaders/k3d_uberlight.sl:430:    {				/* Spot light */
k3d/share/shaders/k3d_uberlight.sl:431:      uniform float maxradius = 1.4142136 * max(height + hedge + abs(sheary),
k3d/share/shaders/k3d_uberlight.sl:432:						width + wedge + abs(shearx));
k3d/share/shaders/k3d_uberlight.sl:435:  else if(lighttype == "arealight")
k3d/share/shaders/k3d_uberlight.sl:436:    {				/* BMRT area light */
k3d/share/shaders/k3d_uberlight.sl:440:    {				/* Omnidirectional light */
k3d/share/shaders/k3d_uberlight.sl:447:    /* Accumulate attenuation of the light as it is affected by various
k3d/share/shaders/k3d_uberlight.sl:448:     * blockers and whatnot.  Start with no attenuation (i.e., a 
k3d/share/shaders/k3d_uberlight.sl:452:    color lcol = lightcolor;
k3d/share/shaders/k3d_uberlight.sl:454:    /* Basic light shaping - the volumetric shaping is all encapsulated
k3d/share/shaders/k3d_uberlight.sl:455:     * in the ShapeLightVolume function.
k3d/share/shaders/k3d_uberlight.sl:458:      ShapeLightVolume(PL, lighttype, axis, cuton, cutoff, nearedge, faredge,
k3d/share/shaders/k3d_uberlight.sl:459:		       falloff, falloffdist, maxintensity / intensity, shearx,
k3d/share/shaders/k3d_uberlight.sl:460:		       sheary, width, height, hedge, wedge, roundness,
k3d/share/shaders/k3d_uberlight.sl:466:	point Pslide = PL / point(width + wedge, height + hedge, 1);
k3d/share/shaders/k3d_uberlight.sl:473:    /* If the volume says we aren't being lit, skip the remaining tests */
k3d/share/shaders/k3d_uberlight.sl:481:	    n = smoothstep(0, 1, 0.5 + noiseamp * (n - 0.5));
k3d/share/shaders/k3d_uberlight.sl:485:	/* Apply shadow mapped shadows */
k3d/share/shaders/k3d_uberlight.sl:487:	if(shadowmap != "")
k3d/share/shaders/k3d_uberlight.sl:489:	    1 - shadow(shadowmap, Ps, "blur", shadowblur, "samples",
k3d/share/shaders/k3d_uberlight.sl:490:		       shadownsamps, "bias", shadowbias);
k3d/share/shaders/k3d_uberlight.sl:491:	point shadoworigin;
k3d/share/shaders/k3d_uberlight.sl:493:	  shadoworigin = from;
k3d/share/shaders/k3d_uberlight.sl:495:	  shadoworigin = point "shader"(xcomp(PL), ycomp(PL), cuton);
k3d/share/shaders/k3d_uberlight.sl:497:	/* If we can, apply ray cast shadows.  Force a ray trace if
k3d/share/shaders/k3d_uberlight.sl:498:	 * we're in BMRT and the user wanted a shadow map.
k3d/share/shaders/k3d_uberlight.sl:500:	if(raytraceshadow != 0)
k3d/share/shaders/k3d_uberlight.sl:504:	    for(i = 0; i < nshadowrays; i += 1)
k3d/share/shaders/k3d_uberlight.sl:505:	      vis += visibility(Ps, shadoworigin + shadowcheat);
k3d/share/shaders/k3d_uberlight.sl:506:	    vis /= nshadowrays;
k3d/share/shaders/k3d_uberlight.sl:510:	/* Apply blocker fake shadows */
k3d/share/shaders/k3d_uberlight.sl:514:	      BlockerContribution(Ps, shadoworigin, blockercoords,
k3d/share/shaders/k3d_uberlight.sl:515:				  blockerwidth, blockerheight, blockerwedge,
k3d/share/shaders/k3d_uberlight.sl:516:				  blockerhedge, blockerround);
k3d/share/shaders/k3d_uberlight.sl:518:	lcol = mix(shadowcolor, lcol, unoccluded);
k3d/share/shaders/k3d_uberlight.sl:523:      L = axis * length(Ps - from);
k3d/share/shaders/k3d_urbermap.sl:7:float abUseColorMapAlpha=0; 
k3d/share/shaders/k3d_urbermap.sl:15:string abSpecularColorMap="I:/ArtWorks/Textures/Native_1.2.highlight.tif"; 
k3d/share/shaders/k3d_urbermap.sl:17:float abRoughness=0.3; 
k3d/share/shaders/k3d_urbermap.sl:18:string abRoughnessMap="I:/ArtWorks/Textures/Native_1.2.shadow.tif"; 
k3d/share/shaders/k3d_urbermap.sl:19:float abRoughnessMapBlur=1; 
k3d/share/shaders/k3d_urbermap.sl:44:float ss, tt, roughness, diff, spec, bmp;
k3d/share/shaders/k3d_urbermap.sl:47:ss = vector(s, t, 1) . vector(transform("shader", STMatrix0));
k3d/share/shaders/k3d_urbermap.sl:48:tt = vector(s, t, 1) . vector(transform("shader", STMatrix1));
k3d/share/shaders/k3d_urbermap.sl:54:"swidth", abColorMapBlur,
k3d/share/shaders/k3d_urbermap.sl:55:"twidth", abColorMapBlur );
k3d/share/shaders/k3d_urbermap.sl:56:if(abUseColorMapAlpha != 0)
k3d/share/shaders/k3d_urbermap.sl:59:"swidth", abColorMapBlur,
k3d/share/shaders/k3d_urbermap.sl:60:"twidth", abColorMapBlur );
k3d/share/shaders/k3d_urbermap.sl:79:"swidth", abDiffuseMapBlur,
k3d/share/shaders/k3d_urbermap.sl:80:"twidth", abDiffuseMapBlur );
k3d/share/shaders/k3d_urbermap.sl:91:"swidth", abSpecularMapBlur,
k3d/share/shaders/k3d_urbermap.sl:92:"twidth", abSpecularMapBlur );
k3d/share/shaders/k3d_urbermap.sl:103:"swidth", abSpecularColorMapBlur,
k3d/share/shaders/k3d_urbermap.sl:104:"twidth", abSpecularColorMapBlur );
k3d/share/shaders/k3d_urbermap.sl:112:if(abRoughnessMap != "")
k3d/share/shaders/k3d_urbermap.sl:114:roughness = abRoughness * float texture(abRoughnessMap, ss, tt,
k3d/share/shaders/k3d_urbermap.sl:115:"swidth", abRoughnessMapBlur,
k3d/share/shaders/k3d_urbermap.sl:116:"twidth", abRoughnessMapBlur );
k3d/share/shaders/k3d_urbermap.sl:120:roughness = abRoughness;
k3d/share/shaders/k3d_urbermap.sl:129:"swidth", abTransparencyMapBlur,
k3d/share/shaders/k3d_urbermap.sl:130:"twidth", abTransparencyMapBlur );
k3d/share/shaders/k3d_urbermap.sl:135:"swidth", abTransparencyMapBlur,
k3d/share/shaders/k3d_urbermap.sl:136:"twidth", abTransparencyMapBlur ));
k3d/share/shaders/k3d_urbermap.sl:144:"swidth", abIncandescenseMapBlur,
k3d/share/shaders/k3d_urbermap.sl:145:"twidth", abIncandescenseMapBlur );
k3d/share/shaders/k3d_urbermap.sl:157:"swidth", abBumpMapBlur,
k3d/share/shaders/k3d_urbermap.sl:158:"twidth", abBumpMapBlur );
k3d/share/shaders/k3d_urbermap.sl:159:PP = transform("shader", P);
k3d/share/shaders/k3d_urbermap.sl:160:Nf = normalize( ntransform("shader", N) );
k3d/share/shaders/k3d_urbermap.sl:162:PP = transform("shader", "current", PP);
k3d/share/shaders/k3d_urbermap.sl:193:"swidth", abReflectionMapBlur,
k3d/share/shaders/k3d_urbermap.sl:194:"twidth", abReflectionMapBlur );
k3d/share/shaders/k3d_urbermap.sl:201:Ci = Csurf * (Cincand + ambient() + diff * diffuse(Nf)) + (spec * Cspec * (specular(Nf, V, roughness) + Crefl));
k3d/share/shaders/k3d_veinedmarble.sl:2: * veinedmarble.sl -- surface shader for a nice veined marble.
k3d/share/shaders/k3d_veinedmarble.sl:5: *   Makes solid marble texture with strong veins.  The "veincolor" parameter
k3d/share/shaders/k3d_veinedmarble.sl:6: *   controls the color of the veins.  The background color is given by the
k3d/share/shaders/k3d_veinedmarble.sl:10: *   Ka, Kd, Ks, roughness, specularcolor - same as plastic
k3d/share/shaders/k3d_veinedmarble.sl:11: *   veinfreq - controls fhe lowest frequency of the color veins
k3d/share/shaders/k3d_veinedmarble.sl:12: *   veinlevels - how many "levels" of vein tendrills it has
k3d/share/shaders/k3d_veinedmarble.sl:13: *   warpfreq - lowest frequency of the turbulent warping in the marble
k3d/share/shaders/k3d_veinedmarble.sl:14: *   warping - controls how much turbulent warping there will be
k3d/share/shaders/k3d_veinedmarble.sl:15: *   veincolor - the color of the veins
k3d/share/shaders/k3d_veinedmarble.sl:16: *   sharpness - controls how sharp or fuzzy the veins are (higher = sharper)
k3d/share/shaders/k3d_veinedmarble.sl:19: * AUTHOR: Larry Gritz, the George Washington University
k3d/share/shaders/k3d_veinedmarble.sl:27:#include "k3d_noises.h"
k3d/share/shaders/k3d_veinedmarble.sl:28:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_veinedmarble.sl:29:#include "k3d_material.h"
k3d/share/shaders/k3d_veinedmarble.sl:35:			 float roughness = .075;
k3d/share/shaders/k3d_veinedmarble.sl:42:			 float sharpness = 8;
k3d/share/shaders/k3d_veinedmarble.sl:50:  point PP = transform("shader", P);
k3d/share/shaders/k3d_veinedmarble.sl:51:  float dPP = filterwidthp(PP);
k3d/share/shaders/k3d_veinedmarble.sl:55:  /* Now calculate the veining function for the lookup area */
k3d/share/shaders/k3d_veinedmarble.sl:62:      turb = pow(smoothstep(0.8, 1, 1 - turb), sharpness) / freq;
k3d/share/shaders/k3d_veinedmarble.sl:71:  Ci = MaterialPlastic(Nf, Ct, Ka, Kd, Ks, roughness);
k3d/share/shaders/k3d_velvet.sl:1:/* Renamed to SHW_velvet.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_velvet.sl:8: *   This phenomenological model contains three compnents:
k3d/share/shaders/k3d_velvet.sl:9: *   - A retroreflective lobe (back toward the light source)
k3d/share/shaders/k3d_velvet.sl:10: *   - Scattering near the horizon, regardless of incident direction
k3d/share/shaders/k3d_velvet.sl:17: *   sheen:	color of retroreflective lobe and horizon scattering
k3d/share/shaders/k3d_velvet.sl:18: *   roughness: shininess of fabric (controls retroreflection only)
k3d/share/shaders/k3d_velvet.sl:20: * ANTIALIASING: should antialias itself fairly well
k3d/share/shaders/k3d_velvet.sl:22: * AUTHOR: written by Stephen H. Westin, Ford Motor Company
k3d/share/shaders/k3d_velvet.sl:25: * 	2001.02.01	westin@SpamSucks_graphics.cornell.edu
k3d/share/shaders/k3d_velvet.sl:28: *			"edginess" parameter to control horizon scatter;
k3d/share/shaders/k3d_velvet.sl:42:        color sheen = .25;
k3d/share/shaders/k3d_velvet.sl:43:        float roughness = .1;
k3d/share/shaders/k3d_velvet.sl:48:  vector H;                      /* Bisector vector for Phong/Blinn */
k3d/share/shaders/k3d_velvet.sl:49:  vector Ln;                     /* Normalized vector to light */
k3d/share/shaders/k3d_velvet.sl:50:  color shiny;                   /* Non-diffuse components */
k3d/share/shaders/k3d_velvet.sl:51:  float cosine, sine;            /* Components for horizon scatter */
k3d/share/shaders/k3d_velvet.sl:56:  shiny = 0;
k3d/share/shaders/k3d_velvet.sl:57:  illuminance ( P, Nf, 1.57079632679489661923 /* Hemisphere */ ) {
k3d/share/shaders/k3d_velvet.sl:61:    shiny += pow ( cosine, 1.0/roughness ) * backscatter
k3d/share/shaders/k3d_velvet.sl:62:      * Cl * sheen;
k3d/share/shaders/k3d_velvet.sl:66:    shiny += pow ( sine, edginess ) * Ln.Nf * Cl * sheen;
k3d/share/shaders/k3d_velvet.sl:71:  Ci = Os * (Ka*ambient() + Kd*diffuse(Nf)) * Cs + shiny;
k3d/share/shaders/k3d_venus.sl:6: *      When put on a sphere, sets the color to look like a densely
k3d/share/shaders/k3d_venus.sl:7: *   clouded planet, very much like the real Venus appears in UV.
k3d/share/shaders/k3d_venus.sl:8: *      The shader works by creating a fractal turbulence function over
k3d/share/shaders/k3d_venus.sl:9: *   the surface to simulate the clouds.  Strong Coriolis forces are
k3d/share/shaders/k3d_venus.sl:10: *   simulated to give the twisting of clouds that is typically seen
k3d/share/shaders/k3d_venus.sl:15: *    Ka, Kd - the usual meaning
k3d/share/shaders/k3d_venus.sl:16: *    offset, scale - control the linear scaling of the cloud value.
k3d/share/shaders/k3d_venus.sl:17: *    twist - controls the twisting of the clouds due to Coriolis forces.
k3d/share/shaders/k3d_venus.sl:18: *    omega - controls the fractal characteristics of the clouds
k3d/share/shaders/k3d_venus.sl:19: *    octaves - the number of octaves of noise to sum for the clouds.
k3d/share/shaders/k3d_venus.sl:23: *    The default values for the shader assume that the planet is
k3d/share/shaders/k3d_venus.sl:24: *    represented by a unit sphere.  The texture space and/or parameters
k3d/share/shaders/k3d_venus.sl:25: *    to this shader will need to be altered if the size of your planet
k3d/share/shaders/k3d_venus.sl:30: *    Conversion to Shading Language and minor modifications by Larry Gritz.
k3d/share/shaders/k3d_venus.sl:34: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_venus.sl:35: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_venus.sl:41: *    Feb 1994 - Conversion to Shading Language by L. Gritz
k3d/share/shaders/k3d_venus.sl:43: * last modified 1 March 1994 by lg
k3d/share/shaders/k3d_venus.sl:59:  point Ptexture;		/* the shade point in texture space */
k3d/share/shaders/k3d_venus.sl:66:  float value;			/* Fractal sum is stored here */
k3d/share/shaders/k3d_venus.sl:69:  Ptexture = transform("shader", P);
k3d/share/shaders/k3d_venus.sl:94:  /* Shade like matte, but with color scaled by cloud color */
k3d/share/shaders/k3d_venus2.sl:1:/* I renamed the shader to MBVenus.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_venus2.sl:8: *      When put on a sphere, sets the color to look like a densely
k3d/share/shaders/k3d_venus2.sl:9: *   clouded planet, very much like the real Venus appears in UV.
k3d/share/shaders/k3d_venus2.sl:10: *      The shader works by creating a fractal turbulence function over
k3d/share/shaders/k3d_venus2.sl:11: *   the surface to simulate the clouds.  Strong Coriolis forces are
k3d/share/shaders/k3d_venus2.sl:12: *   simulated to give the twisting of clouds that is typically seen
k3d/share/shaders/k3d_venus2.sl:17: *    Ka, Kd - the usual meaning
k3d/share/shaders/k3d_venus2.sl:18: *    offset, scale - control the linear scaling of the cloud value.
k3d/share/shaders/k3d_venus2.sl:19: *    twist - controls the twisting of the clouds due to Coriolis forces.
k3d/share/shaders/k3d_venus2.sl:20: *    omega - controls the fractal characteristics of the clouds
k3d/share/shaders/k3d_venus2.sl:21: *    octaves - the number of octaves of noise to sum for the clouds.
k3d/share/shaders/k3d_venus2.sl:26: *    Conversion to Shading Language and minor modifications by Larry Gritz.
k3d/share/shaders/k3d_venus2.sl:27: *    Planet radius param added by Mark Beckwith.
k3d/share/shaders/k3d_venus2.sl:30: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_venus2.sl:31: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_venus2.sl:37: *    Feb 1994 - Conversion to Shading Language by L. Gritz
k3d/share/shaders/k3d_venus2.sl:38: *    Dec 1996 - Added radius of planet as a parameter by Mark Beckwith
k3d/share/shaders/k3d_venus2.sl:61:  point Ptexture;           /* the shade point in texture space */
k3d/share/shaders/k3d_venus2.sl:68:  float value;              /* Fractal sum is stored here */
k3d/share/shaders/k3d_venus2.sl:70:  /* Transform to texture coordinates and map to nit sphere */
k3d/share/shaders/k3d_venus2.sl:71:  Ptexture = transform ("shader", P) / radius;
k3d/share/shaders/k3d_venus2.sl:93:  /* Shade like matte, but with color scaled by cloud color */
k3d/share/shaders/k3d_volcube.sl:3:   This shader raytraces a box that is one unit in size,
k3d/share/shaders/k3d_volcube.sl:4:   and then ray marches through the volume
k3d/share/shaders/k3d_volcube.sl:6:   StepJitter          - 0-1 jitter the sample position.
k3d/share/shaders/k3d_volcube.sl:7:   Density             - volume thickes per unit.
k3d/share/shaders/k3d_volcube.sl:10:   Do_Shading          - if 1, shading will be calculated.
k3d/share/shaders/k3d_volcube.sl:11:   SurfNormalDepth     - the mixing depth from surface
k3d/share/shaders/k3d_volcube.sl:14:   ShowActiveVol       - if 1 show the active volume instead of density.
k3d/share/shaders/k3d_volcube.sl:15:   RunShadowPass       - set to 1 if running a shadow pass.
k3d/share/shaders/k3d_volcube.sl:102:/* active_volume - controls animation in the volume */
k3d/share/shaders/k3d_volcube.sl:112:/* density function will return the final volume density */
k3d/share/shaders/k3d_volcube.sl:128:/* normal calculation inside the volume */
k3d/share/shaders/k3d_volcube.sl:146:/* shading function returns diffuse ans specular */
k3d/share/shaders/k3d_volcube.sl:147:void get_shading (point Pos;
k3d/share/shaders/k3d_volcube.sl:150:		  float Roughness;
k3d/share/shaders/k3d_volcube.sl:160:	spec += Cl * specularbrdf(L, Nf, V, Roughness);
k3d/share/shaders/k3d_volcube.sl:185:/* main ray marching shader  */
k3d/share/shaders/k3d_volcube.sl:193:	     float  Do_Shading     = 1;
k3d/share/shaders/k3d_volcube.sl:194:	     float  SurfNormalDepth = .05;
k3d/share/shaders/k3d_volcube.sl:196:	     float  ShowActiveVol  = 0;
k3d/share/shaders/k3d_volcube.sl:197:	     float  RunShadowPass  = 0;
k3d/share/shaders/k3d_volcube.sl:204:    float  Roughness    = .21;
k3d/share/shaders/k3d_volcube.sl:207:    float  vol_length   = length(outPoint_obj-inPoint_obj);
k3d/share/shaders/k3d_volcube.sl:208:    float  numOfSteps   = vol_length/StepSize;
k3d/share/shaders/k3d_volcube.sl:214:    float  shad_sum     = 0;
k3d/share/shaders/k3d_volcube.sl:220:    float  cur_depth    = 0;
k3d/share/shaders/k3d_volcube.sl:229:    while(curStep < numOfSteps && density_sum < 1){
k3d/share/shaders/k3d_volcube.sl:234:	if(ShowActiveVol == 1)
k3d/share/shaders/k3d_volcube.sl:239:	/*--- If Density > 0 Run The Rest Of The Loop ---*/
k3d/share/shaders/k3d_volcube.sl:240:	if(cur_density > 0 && RunShadowPass == 0){
k3d/share/shaders/k3d_volcube.sl:243:	    if(Do_Shading > 0){
k3d/share/shaders/k3d_volcube.sl:244:		if(cur_depth > 0){
k3d/share/shaders/k3d_volcube.sl:248:		    Nf = fnc_normalMix(Nf,Vol_Nf,clamp(cur_depth/SurfNormalDepth,0,1));
k3d/share/shaders/k3d_volcube.sl:250:		get_shading(Pcur,Nf,V,Roughness,diff,spec);
k3d/share/shaders/k3d_volcube.sl:278:            /* if Shadow Pass */
k3d/share/shaders/k3d_volcube.sl:280:		shad_sum += max(0,cur_density);
k3d/share/shaders/k3d_volcube.sl:284:		shad_sum = (cur_density) * (1-shad_sum) + shad_sum;
k3d/share/shaders/k3d_volcube.sl:286:	    if(shad_sum >= .5){
k3d/share/shaders/k3d_volcube.sl:294:	/* jump to the next sample point */
k3d/share/shaders/k3d_volcube.sl:298:	cur_depth += StepSize;
k3d/share/shaders/k3d_wallpaper.sl:1:/* I took wave's lead and renamed wallpaper to DPWallpaper.sl -- tal@SpamSucks_cs.caltech.edu */
k3d/share/shaders/k3d_wallpaper.sl:6: * AUTHOR: Darwyn Peachy
k3d/share/shaders/k3d_wallpaper.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_wallpaper.sl:10: *    F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and Steven Worley.
k3d/share/shaders/k3d_wallpaper_2stripe.sl:2: * wallpaper_2stripe.sl -- surface shader for double striped wall paper
k3d/share/shaders/k3d_wallpaper_2stripe.sl:6: *   are shaded in s-t space, and the stripes are parallel to lines of
k3d/share/shaders/k3d_wallpaper_2stripe.sl:7: *   equal s.  The background color is given by the surface color.
k3d/share/shaders/k3d_wallpaper_2stripe.sl:11: *   Ka, Kd, Ks, roughness	the usual
k3d/share/shaders/k3d_wallpaper_2stripe.sl:14: *   stripewidth                width of stripes, in s coordinates
k3d/share/shaders/k3d_wallpaper_2stripe.sl:18: * ANTIALIASING:  should analytically antialias itself quite well.
k3d/share/shaders/k3d_wallpaper_2stripe.sl:26:#include "k3d_patterns.h"
k3d/share/shaders/k3d_wallpaper_2stripe.sl:27:#include "k3d_material.h"
k3d/share/shaders/k3d_wallpaper_2stripe.sl:30:			      float roughness = 0.1;
k3d/share/shaders/k3d_wallpaper_2stripe.sl:32:			      float stripewidth = 0.05;
k3d/share/shaders/k3d_wallpaper_2stripe.sl:36:  float ds = filterwidth(ss);
k3d/share/shaders/k3d_wallpaper_2stripe.sl:37:  float edge = (1 - stripewidth);
k3d/share/shaders/k3d_wallpaper_2stripe.sl:41:     filteredpulsetrain(edge, 1, ss + 2 * stripewidth, ds));
k3d/share/shaders/k3d_wallpaper_2stripe.sl:46:  Ci = MaterialPlastic(Nf, Ct, Ka, Kd, Ks, roughness);
k3d/share/shaders/k3d_warningstripes.sl:2:// Copyright (c) 1995-2004, Timothy M. Shead
k3d/share/shaders/k3d_warningstripes.sl:4:// Contact: tshead@k-3d.com
k3d/share/shaders/k3d_warningstripes.sl:6:// This program is free software; you can redistribute it and/or
k3d/share/shaders/k3d_warningstripes.sl:7:// modify it under the terms of the GNU General Public
k3d/share/shaders/k3d_warningstripes.sl:8:// License as published by the Free Software Foundation; either
k3d/share/shaders/k3d_warningstripes.sl:9:// version 2 of the License, or (at your option) any later version.
k3d/share/shaders/k3d_warningstripes.sl:11:// This program is distributed in the hope that it will be useful,
k3d/share/shaders/k3d_warningstripes.sl:12:// but WITHOUT ANY WARRANTY; without even the implied warranty of
k3d/share/shaders/k3d_warningstripes.sl:13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
k3d/share/shaders/k3d_warningstripes.sl:16:// You should have received a copy of the GNU General Public
k3d/share/shaders/k3d_warningstripes.sl:17:// License along with this program; if not, write to the Free Software
k3d/share/shaders/k3d_warningstripes.sl:21:		\author Tim Shead (tshead@k-3d.com)
k3d/share/shaders/k3d_warningstripes.sl:24:/// Filtering code courtesy of the Advanced RenderMan book ... where else?
k3d/share/shaders/k3d_warningstripes.sl:27:#define filter_width(x) max(abs(Du(x)*du) + abs(Dv(x)*dv), MIN_FILTER_WIDTH)
k3d/share/shaders/k3d_warningstripes.sl:50:	float stripe_position = filtered_pulse_train(0.5 / Frequency, 1.0 / Frequency, u+v, filter_width(u+v));
k3d/share/shaders/k3d_water.sl:3: * This was originally shiny.sl, but I change it to make it transparant.  The interesting part colors that

k3d/share/shaders/k3d_water.sl:4: * are not blue will pass thru the water.

k3d/share/shaders/k3d_water.sl:6: * note : This is very similar to shiny.sl with a slight modification to give it a

k3d/share/shaders/k3d_water.sl:9: * modified by Lawrence D. Chin, cs184-bo

k3d/share/shaders/k3d_water.sl:13: *   Makes a smoothly polished metal, using ray tracing to calculate

k3d/share/shaders/k3d_water.sl:14: *   reflections of the environment.

k3d/share/shaders/k3d_water.sl:17: *    Ka, Kd, Ks, roughness, specularcolor - The usual meaning

k3d/share/shaders/k3d_water.sl:19: *    blur - how blurry are the reflections? (0 = perfectly sharp)

k3d/share/shaders/k3d_water.sl:20: *    samples - set to higher than 1 for oversampling of blur

k3d/share/shaders/k3d_water.sl:25: *      25 Jan 1994 -- recoded by lg in correct shading language.

k3d/share/shaders/k3d_water.sl:30:#define pulse(a,b,fuzz,x) (smoothstep((a)-(fuzz),(a),(x)) - \

k3d/share/shaders/k3d_water.sl:31:                           smoothstep((b)-(fuzz),(b),(x)))

k3d/share/shaders/k3d_water.sl:37:	float Kr = 1, roughness = 0, blur = 0;

k3d/share/shaders/k3d_water.sl:41:        half_width = 0.1;      /* half width of ring */

k3d/share/shaders/k3d_water.sl:50:          ev;                /* Color of the reflections */

k3d/share/shaders/k3d_water.sl:51:    vector R, Rdir;          /* Direction to cast the ray */

k3d/share/shaders/k3d_water.sl:59:    /* Calculate the reflection color */

k3d/share/shaders/k3d_water.sl:61:	/* Rdir gets the perfect reflection direction */

k3d/share/shaders/k3d_water.sl:64:	    /* Construct orthogonal components to Rdir */

k3d/share/shaders/k3d_water.sl:71:		    /* Add a random offset to the smooth reflection vector */

k3d/share/shaders/k3d_water.sl:86:		specularcolor * (ev + Ks*specular(Nf,-IN,roughness)));

k3d/share/shaders/k3d_water.sl:88:    /* I added some current.  Note, it doesn't apppear horizontally. */

k3d/share/shaders/k3d_water.sl:99:    layer_opac = pulse(radius - half_width, radius + half_width, fuzz, d);

k3d/share/shaders/k3d_water.sl:104:    /* This gives the water a somewhat transparant look. 

k3d/share/shaders/k3d_water.sl:105:     *   Note: This does works with radiosity.

k3d/share/shaders/k3d_watercolor.sl:2: *	The shader exploits that fact that the Renderman interface already

k3d/share/shaders/k3d_watercolor.sl:3: *	provides a built-in Fresnel quantity calculator, which provides

k3d/share/shaders/k3d_watercolor.sl:4: *	R, T, ^nr, and ^nt using the surface normal, incident direction

k3d/share/shaders/k3d_watercolor.sl:5: *	vector, and index of refraction. The shader for the air-to-water 

k3d/share/shaders/k3d_watercolor.sl:22:	float costhetai = abs(nI . nN);

k3d/share/shaders/k3d_watercolor.sl:23:	float thetai = acos(costhetai);

k3d/share/shaders/k3d_watercolor.sl:24:	float sinthetat = sin(thetai)/nSnell;

k3d/share/shaders/k3d_watercolor.sl:25:	float thetat = asin(sinthetat);

k3d/share/shaders/k3d_watercolor.sl:26:	if(thetai == 0.0)

k3d/share/shaders/k3d_watercolor.sl:33:		float fs = sin(thetat - thetai) / sin(thetat + thetai);

k3d/share/shaders/k3d_watercolor.sl:34:		float ts = tan(thetat - thetai) / tan(thetat + thetai);

k3d/share/shaders/k3d_watercolor.sl:38:	float dist = length(dPE) * Kdiffuse;

k3d/share/shaders/k3d_waterdisplacement.sl:7: *	du, dv		change in u, v across the surface

k3d/share/shaders/k3d_waterdisplacement.sl:8: *	dPdu,dPdv	change in position with u and v

k3d/share/shaders/k3d_waterdisplacement.sl:9: *	I			direction of ray stricking a surface point (from the camera)

k3d/share/shaders/k3d_waterdisplacement.sl:10: *	E			position of the camera

k3d/share/shaders/k3d_waterdisplacement.sl:15:	float	hump;

k3d/share/shaders/k3d_waterdisplacement.sl:18:	/* STEP 1 - Make a copy of the surface normal */

k3d/share/shaders/k3d_waterdisplacement.sl:21:	/* STEP 2 - Calculate an appropriate value for the displacement */

k3d/share/shaders/k3d_waterdisplacement.sl:23:		hump = texture(bumpmap, s, t);	

k3d/share/shaders/k3d_waterdisplacement.sl:25:	/* STEP 3 - Calculate a new position of the surface point, "P" */

k3d/share/shaders/k3d_waterdisplacement.sl:26:	P = P - norm * hump * Km;

k3d/share/shaders/k3d_waterdisplacement.sl:28:	/* STEP 4 - Recalculate the surface normal */

k3d/share/shaders/k3d_waterlight.sl:1:/** k3d_waterlight
k3d/share/shaders/k3d_waterlight.sl:3:Copyright (c) 1995-2004, Timothy M. Shead
k3d/share/shaders/k3d_waterlight.sl:5:A cheap trick to simulate underwater caustics - best used for deep-sea effects
k3d/share/shaders/k3d_waterlight.sl:10:light k3d_waterlight(
k3d/share/shaders/k3d_waterlight.sl:14:	float phase = 0;
k3d/share/shaders/k3d_waterlight.sl:15:	color lightcolor = 1;
k3d/share/shaders/k3d_waterlight.sl:16:	string shadowname="";
k3d/share/shaders/k3d_waterlight.sl:22:	solar(vector "shader" (0, -1, 0), 0)
k3d/share/shaders/k3d_waterlight.sl:24:			Cl = mix(minimum_intensity, maximum_intensity, float noise(frequency * Ps)) * lightcolor;
k3d/share/shaders/k3d_waterlight.sl:27:	if(shadowname != "")
k3d/share/shaders/k3d_waterlight.sl:29:			Cl *= 1 - shadow(shadowname, Ps, "samples", samples, "blur", blur, "bias", bias);
k3d/share/shaders/k3d_windowlight.sl:2: * windowlight.sl - make a window light (with crossbars)
k3d/share/shaders/k3d_windowlight.sl:5: *   Simulates light coming through a window.  The light doesn't
k3d/share/shaders/k3d_windowlight.sl:9: *   intensity - overall intensity scaling of the light
k3d/share/shaders/k3d_windowlight.sl:10: *   lightcolor - overall color filtering for the light
k3d/share/shaders/k3d_windowlight.sl:11: *   center - the spatial position of the center of the window
k3d/share/shaders/k3d_windowlight.sl:12: *   up, in - vectors which define the orientation of the window
k3d/share/shaders/k3d_windowlight.sl:13: *   from, to - the direction that the light falls
k3d/share/shaders/k3d_windowlight.sl:14: *   hpanes, vpanes - number of horizontal and vertical panes
k3d/share/shaders/k3d_windowlight.sl:15: *   panewidth, paneheight - width/height of the individual panes
k3d/share/shaders/k3d_windowlight.sl:16: *   fuzz - controls the fading out near the edges
k3d/share/shaders/k3d_windowlight.sl:17: *   framewidth, frameheight - how thick are the window frame "bars",
k3d/share/shaders/k3d_windowlight.sl:18: *               as percentage of panewidth/paneheight
k3d/share/shaders/k3d_windowlight.sl:20: * Author:  Larry Gritz, with inspiration from [Upstill]
k3d/share/shaders/k3d_windowlight.sl:26:#include "k3d_patterns.h"
k3d/share/shaders/k3d_windowlight.sl:28:light k3d_windowlight(float intensity = 1;
k3d/share/shaders/k3d_windowlight.sl:29:		      color lightcolor = color(1, 0.9, 0.6);
k3d/share/shaders/k3d_windowlight.sl:31:		      point from = point "shader"(0, 0, 0);
k3d/share/shaders/k3d_windowlight.sl:32:		      point to = point "shader"(0, 1, 0);
k3d/share/shaders/k3d_windowlight.sl:33:		      point center = point "shader"(0, 0, 0);
k3d/share/shaders/k3d_windowlight.sl:34:		      vector up = vector "shader"(0, 0, 1);
k3d/share/shaders/k3d_windowlight.sl:35:		      vector in = vector "shader"(0, 1, 0);
k3d/share/shaders/k3d_windowlight.sl:36:		      float hpanes = 2, vpanes = 3;
k3d/share/shaders/k3d_windowlight.sl:37:		      float panewidth = 6, paneheight = 6;
k3d/share/shaders/k3d_windowlight.sl:38:		      float framewidth = .1, frameheight = .1;
k3d/share/shaders/k3d_windowlight.sl:42:  uniform vector inv, right, upv;
k3d/share/shaders/k3d_windowlight.sl:43:  uniform vector path;
k3d/share/shaders/k3d_windowlight.sl:46:  point PL;			/* point on the light */
k3d/share/shaders/k3d_windowlight.sl:48:  path = normalize(from - to);
k3d/share/shaders/k3d_windowlight.sl:50:  right = (up) ^ inv;
k3d/share/shaders/k3d_windowlight.sl:51:  upv = normalize(inv ^ right);
k3d/share/shaders/k3d_windowlight.sl:52:  right = upv ^ inv;
k3d/share/shaders/k3d_windowlight.sl:54:  /* d is the depth "into" the room perpendicular to the pane plane */
k3d/share/shaders/k3d_windowlight.sl:56:  PL = Ps - path * (d / (path.inv));
k3d/share/shaders/k3d_windowlight.sl:58:  illuminate(PL, -path, .01)
k3d/share/shaders/k3d_windowlight.sl:60:    offset = (PL - center).upv + paneheight * (vpanes / 2);
k3d/share/shaders/k3d_windowlight.sl:61:    if(offset > 0 && (offset / paneheight) < vpanes)
k3d/share/shaders/k3d_windowlight.sl:63:	modulus = mod(offset, paneheight);
k3d/share/shaders/k3d_windowlight.sl:65:	  filteredpulse(frameheight / 2, paneheight - frameheight / 2,
k3d/share/shaders/k3d_windowlight.sl:71:    offset = (PL - center).right + panewidth * (hpanes / 2);
k3d/share/shaders/k3d_windowlight.sl:72:    if(offset > 0 && (offset / panewidth) < hpanes)
k3d/share/shaders/k3d_windowlight.sl:74:	modulus = mod(offset, panewidth);
k3d/share/shaders/k3d_windowlight.sl:76:	  filteredpulse(framewidth / 2, panewidth - framewidth / 2, modulus,
k3d/share/shaders/k3d_windowlight.sl:81:    Cl = intensity * mix(darkcolor, lightcolor, yfract * xfract);
k3d/share/shaders/k3d_windywave.sl:12:  PP = txtscale * windfreq * transform("shader", P);
k3d/share/shaders/k3d_wood2.sl:2: * wood2.sl -- another surface shader for wood.
k3d/share/shaders/k3d_wood2.sl:8: *   Ka, Kd, Ks, specular, roughness - work just like the plastic shader
k3d/share/shaders/k3d_wood2.sl:9: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_wood2.sl:10: *   ringscale - scaling for the ring spacing
k3d/share/shaders/k3d_wood2.sl:11: *   lightwood, darkwood - surface colors for the wood itself
k3d/share/shaders/k3d_wood2.sl:22:		  float roughness = .1;
k3d/share/shaders/k3d_wood2.sl:26:		  color lightwood = color(0.69, 0.44, 0.25);
k3d/share/shaders/k3d_wood2.sl:29:  point PP, PQ;			/* shading space point to be computed */
k3d/share/shaders/k3d_wood2.sl:31:  color Ct;			/* surface color of the wood */
k3d/share/shaders/k3d_wood2.sl:35:  /* Calculate in shader space */
k3d/share/shaders/k3d_wood2.sl:36:  PP = txtscale * transform("shader", P);
k3d/share/shaders/k3d_wood2.sl:45:  r = 0.2 + 0.8 * smoothstep(0.2, 0.55, r) * (1 - smoothstep(0.75, 0.8, r));
k3d/share/shaders/k3d_wood2.sl:51:  Ct = mix(lightwood, darkwood, r * r2 * r2);
k3d/share/shaders/k3d_wood2.sl:55:   * Use the plastic illumination model
k3d/share/shaders/k3d_wood2.sl:61:	  specularcolor * Ks * specular(Nf, -normalize(I), roughness));
k3d/share/shaders/k3d_woodcut.sl:6:float brightness=0.75; 
k3d/share/shaders/k3d_woodcut.sl:10:#define pulse(a,b,fuzz,x) (smoothstep((a)-(fuzz),(a),(x)) - smoothstep((b)-(fuzz),(b),(x)))
k3d/share/shaders/k3d_woodcut.sl:26:point Psh;
k3d/share/shaders/k3d_woodcut.sl:27:float roughness = 0.2;
k3d/share/shaders/k3d_woodcut.sl:29:Psh = transform("shader", P);
k3d/share/shaders/k3d_woodcut.sl:35:z = zcomp(Psh);
k3d/share/shaders/k3d_woodcut.sl:40:y = ycomp(Psh);
k3d/share/shaders/k3d_woodcut.sl:45:illumcolor = (Ka*ambient() + Kd*diffuse(Nf) + Ks*specular(Nf,V,roughness));
k3d/share/shaders/k3d_woodcut.sl:52:n += snoise(Psh * ns) / ns;
k3d/share/shaders/k3d_woodcut.sl:57:(brightness - 1.0) + n*random;
k3d/share/shaders/k3d_woodcut.sl:74:stripemin = 0.5 - smoothstep(0.0, 1.0, illumination)/2.0;
k3d/share/shaders/k3d_woodcut.sl:75:stripemax = 0.5 + smoothstep(0.0, 1.0, illumination)/2.0;
k3d/share/shaders/k3d_woodcut.sl:87: float spacescale = length(vtransform("shader", normalize(N)));
