k3d/share/shaders/k3d_altitude_fog.sl:8:	float fog = 1 - smoothstep(min_height, max_height, ycomp(PP));
k3d/share/shaders/k3d_ambientlight.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_ambientlight.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_ambientlight.sl:10:float intensity = 1;
k3d/share/shaders/k3d_ambientlight.sl:14:  Cl = intensity * lightcolor;
k3d/share/shaders/k3d_antialiasedchecks.sl:5: *   Makes a checkered surface, fully antialiased!  This sucker should
k3d/share/shaders/k3d_antialiasedchecks.sl:6: *   look great even at only one sample per pixel.
k3d/share/shaders/k3d_antialiasedchecks.sl:11: *   frequency		determines the frequency (in s-t space) of the checks
k3d/share/shaders/k3d_antialiasedchecks.sl:14: * AUTHOR: written by Larry Gritz
k3d/share/shaders/k3d_antialiasedchecks.sl:17: *      27 Jan 1994 -- written by lg
k3d/share/shaders/k3d_antialiasedchecks.sl:19: * last modified 27 Jan 1994 by Larry Gritz
k3d/share/shaders/k3d_antialiasedchecks.sl:26:float Ka = 1, Kd = 1, frequency = 10;
k3d/share/shaders/k3d_antialiasedchecks.sl:33:  float x, y;           /* Used to determine pattern */
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:51:  smod = mod (s*frequency, 1);
k3d/share/shaders/k3d_antialiasedchecks.sl:52:  tmod = mod (t*frequency, 1);
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:62:  else { /* otherwise, only use the average color */
k3d/share/shaders/k3d_arealight.sl:9: *   intensity, lightcolor - same meanings as pointlight
k3d/share/shaders/k3d_arealight.sl:14:float intensity = 1; 
k3d/share/shaders/k3d_arealight.sl:21:    Cl = (intensity / (L.L)) * lightcolor;
k3d/share/shaders/k3d_arealight.sl:25:   * approximately work for a flat light source whose normal points
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: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:12:// but WITHOUT ANY WARRANTY; without even the implied warranty of
k3d/share/shaders/k3d_background.sl:16:// You should have received a copy of the GNU General Public
k3d/share/shaders/k3d_background.sl:24:/// Simplified from the original by Larry Gritz
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_bluescreen.sl:16:float lenx, leny;
k3d/share/shaders/k3d_bluescreen.sl:21:       leny = ycomp(P)/ resolution[1];
k3d/share/shaders/k3d_bluescreen.sl:25:	tex = texture(texturename, lenx, leny);
k3d/share/shaders/k3d_brick.sl:6: *   looking staggered brick masonry.  It is especially convincing when
k3d/share/shaders/k3d_brick.sl:8: *   identical parameters).  Every other row of bricks is staggered.
k3d/share/shaders/k3d_brick.sl:10: *   by the "rowvary" parameter.
k3d/share/shaders/k3d_brick.sl:14: *    brickcolor, mortarcolor	Pretty obvious (default is red bricks)
k3d/share/shaders/k3d_brick.sl:15: *    brickvary                 How much does the brick color vary from
k3d/share/shaders/k3d_brick.sl:20: *    rowvary                   How much does each row shift?
k3d/share/shaders/k3d_brick.sl:23: * AUTHOR: written by Larry Gritz, gritzl@acm.org
k3d/share/shaders/k3d_brick.sl:34:		  float jagged = 0.006, brickvary = 0.3;
k3d/share/shaders/k3d_brick.sl:37:		  float rowvary = .5;
k3d/share/shaders/k3d_brick.sl:39:		  float pockfrequency = 10, groovedepth = 0.01;
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:69:    raggedamp * snoisexy((s + tbrick * 5.15) * raggedfreq,
k3d/share/shaders/k3d_brick.sl:72:    raggedamp * snoisexy((s + tbrick * 11.4) * raggedfreq,
k3d/share/shaders/k3d_brick.sl:75:    raggedamp / 2 * snoisexy((s + tbrick * 5.15) * raggedfreq * 2,
k3d/share/shaders/k3d_brick.sl:78:    raggedamp / 2 * snoisexy((s + tbrick * 11.4) * raggedfreq * 2,
k3d/share/shaders/k3d_brick.sl:122:	((ss + sbrick) * pockfrequency / BMHEIGHT,
k3d/share/shaders/k3d_brick.sl:123:	 (tt + tbrick) * pockfrequency / BMWIDTH), 0.25);
k3d/share/shaders/k3d_brick.sl:131:  bcolor = brickcolor * (1 + (brickvary * snoise(whichbrick + 0.5)));
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_brick3.sl:6: *   looking staggered brick masonry.  It is especially convincing when
k3d/share/shaders/k3d_brick3.sl:8: *   identical parameters).  Every other row of bricks is staggered.
k3d/share/shaders/k3d_brick3.sl:10: *   by the "rowvary" parameter.
k3d/share/shaders/k3d_brick3.sl:14: *    brickcolor, mortarcolor	Pretty obvious (default is red bricks)
k3d/share/shaders/k3d_brick3.sl:15: *    brickvary                 How much does the brick color vary from
k3d/share/shaders/k3d_brick3.sl:20: *    rowvary                   How much does each row shift?
k3d/share/shaders/k3d_brick3.sl:23: * AUTHOR: written by Larry Gritz, 1992
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:32: * last modified  12 Jan 1994 by Larry Gritz
k3d/share/shaders/k3d_brick3.sl:42:        float jagged = 0.006, brickvary = 0.3;
k3d/share/shaders/k3d_brick3.sl:45:        float rowvary = .25; 
k3d/share/shaders/k3d_brick3.sl:68:  /* Make the shapes of the bricks vary just a bit */
k3d/share/shaders/k3d_brick3.sl:71:  tcoord = t + jagged * ycomp (PP2);
k3d/share/shaders/k3d_brick3.sl:83:  /* Shift the columns randomly by row */
k3d/share/shaders/k3d_brick3.sl:84:  ss += rowvary * (noise (tbrick+0.5) - 0.5);
k3d/share/shaders/k3d_brick3.sl:102:  bcolor = brickcolor * (1 + (brickvary * snoise (tbrick+(100*sbrick)+0.5)));
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_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:9: *   However, if you do use it with "brick", the parameters MUST match,
k3d/share/shaders/k3d_brickbump.sl:10: *   or your bricks will look very strange.
k3d/share/shaders/k3d_brickbump.sl:16: *    rowvary                   How much does each row shift?
k3d/share/shaders/k3d_brickbump.sl:20: *    pockfrequency             The st frequency of the pits.
k3d/share/shaders/k3d_brickbump.sl:23: * AUTHOR: written by Larry Gritz, 1992 (and subsequently modified)
k3d/share/shaders/k3d_brickbump.sl:33:			   float rowvary = .25, pitting = 0.01;
k3d/share/shaders/k3d_brickbump.sl:34:			   float pockfrequency = 10, groovedepth = 0.01;
k3d/share/shaders/k3d_brickbump.sl:76:	((ss + sbrick) * pockfrequency / BMHEIGHT,
k3d/share/shaders/k3d_brickbump.sl:77:	 (tt + tbrick) * pockfrequency / BMWIDTH), 0.25);
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_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:9: *   However, if you do use it with "brick", the parameters MUST match,
k3d/share/shaders/k3d_brickbump3.sl:10: *   or your bricks will look very strange.
k3d/share/shaders/k3d_brickbump3.sl:16: *    rowvary                   How much does each row shift?
k3d/share/shaders/k3d_brickbump3.sl:20: *    pockfrequency             The st frequency of the pits.
k3d/share/shaders/k3d_brickbump3.sl:23: * AUTHOR: written by Larry Gritz, 1992
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:29: * last modified  12 Jan 1994 by Larry Gritz
k3d/share/shaders/k3d_brickbump3.sl:32:/* note from Larry:
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:38:  parameters, it looks *exactly* like those painted cinderblock walls
k3d/share/shaders/k3d_brickbump3.sl:45:	       "mortarthickness" 0.02 "pitting" 0.015 "pockfrequency" 12
k3d/share/shaders/k3d_brickbump3.sl:54:	    float rowvary = .25, pitting = 0.01;
k3d/share/shaders/k3d_brickbump3.sl:55:	    float pockfrequency = 10, groovedepth = 0.01; 
k3d/share/shaders/k3d_brickbump3.sl:72:  /* Make the shapes of the bricks vary just a bit */
k3d/share/shaders/k3d_brickbump3.sl:75:  tcoord = t + jagged * ycomp (PP2);
k3d/share/shaders/k3d_brickbump3.sl:85:  /* Shift the columns randomly by row */
k3d/share/shaders/k3d_brickbump3.sl:86:  ss += rowvary * (noise (tbrick+0.5) - 0.5);
k3d/share/shaders/k3d_brickbump3.sl:112:  disp -= fact * pow(noise ((ss+sbrick)*pockfrequency/BMHEIGHT,
k3d/share/shaders/k3d_brickbump3.sl:113:		            (tt+tbrick)*pockfrequency/BMWIDTH), 0.25);
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_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_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:8: *  stochasticly spreads the map, so it looks a little grainy.
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:13: *  very similar to plastic.sl...
k3d/share/shaders/k3d_brushedmetal2.sl:19: *  Kr			- coefficient of reflectivity
k3d/share/shaders/k3d_brushedmetal2.sl:26: *  twist		- allows you to twist the direction of anisotropy
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:12: *          direction for the anisotropy.
k3d/share/shaders/k3d_brushedmetal3.sl:14: *   yroughness - the roughness for the direction of the surface
k3d/share/shaders/k3d_brushedmetal3.sl:19:                         vector xdir;  float xroughness, yroughness;)
k3d/share/shaders/k3d_brushedmetal3.sl:25:    vector Y = (N ^ xdir) / yroughness;
k3d/share/shaders/k3d_brushedmetal3.sl:45:    return C / (4 * xroughness * yroughness);
k3d/share/shaders/k3d_bubbles.sl:12:	float frequency = 1; /* number of bubbles per linear surface */
k3d/share/shaders/k3d_bubbles.sl:16: point myCenter = (0, 0, 0);
k3d/share/shaders/k3d_bubbles.sl:19: float smod = mod((s) * frequency, 1) - 0.5;
k3d/share/shaders/k3d_bubbles.sl:20: float tmod = mod((t) * frequency, 1) - 0.5;
k3d/share/shaders/k3d_bubbles.sl:21: point myPoint = (smod, 0, tmod);
k3d/share/shaders/k3d_bubbles.sl:22: distance2point = distance(myPoint, myCenter);
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:6: *  basicly it's F1 squared as described in 
k3d/share/shaders/k3d_bubbly.sl:7: *  "a cellular texture basis function" by Steven Worley in the 
k3d/share/shaders/k3d_bubbly.sl:10: *  not as elegant, but hey, it works.
k3d/share/shaders/k3d_bubbly.sl:13: *  try lowering bubsize for pimples.
k3d/share/shaders/k3d_bubbly.sl:14: *  try negative values for Kd.
k3d/share/shaders/k3d_bubbly.sl:15: *  try anything you feel like.
k3d/share/shaders/k3d_bubbly.sl:24: *  bubsize - basicly the radius of the bubbles. distance in rVu's.
k3d/share/shaders/k3d_bubbly.sl:28:k3d_bubbly(
k3d/share/shaders/k3d_bubbly.sl:44:  setycomp(trucell,floor(ycomp(Po))+.5);
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:7: *   but in CA it's truly ubiquitous.
k3d/share/shaders/k3d_castucco.sl:10: *   freq - basic frequency of the texture
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_causticlight.sl:2:k3d_causticlight ( float intensity = 1;
k3d/share/shaders/k3d_causticlight.sl:24:	Cl = atten * intensity * lightcolor;
k3d/share/shaders/k3d_celld.sl:9: * History
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_ceramictiles.sl:4: * Description: Ceramic tiles (like you'd find in a bathroom)
k3d/share/shaders/k3d_ceramictiles.sl:8: *     establish a basic 2-D coordinate system for the pattern.
k3d/share/shaders/k3d_ceramictiles.sl:19: *   mottlefreq - frequency of the mottling between Cbase & Cmottle
k3d/share/shaders/k3d_ceramictiles.sl:22: *   edgevary, mottling, speckly - individual scalar controls over
k3d/share/shaders/k3d_ceramictiles.sl:23: *      edge variation, mottling, and speckles.  Setting any to zero will
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:34: *   Ks, roughness, specsharpness - glossy specular controls of the tile
k3d/share/shaders/k3d_ceramictiles.sl:37: *   rayjitter, raysamples - ray tracing controls
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:52:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_ceramictiles.sl:92:		  float edgevary, mottling, speckly; float mottlefreq;
k3d/share/shaders/k3d_ceramictiles.sl:104:  if(edgevary > 0)
k3d/share/shaders/k3d_ceramictiles.sl:112:      float edgy =
k3d/share/shaders/k3d_ceramictiles.sl:116:      C = mix(C, Cedge, edgevary * edgy);
k3d/share/shaders/k3d_ceramictiles.sl:118:  if(speckly > 0)
k3d/share/shaders/k3d_ceramictiles.sl:123:      float specky = filteredsnoise(noisep, speckfreq * dst);
k3d/share/shaders/k3d_ceramictiles.sl:124:      specky = smoothstep(0.55, 0.7, specky);
k3d/share/shaders/k3d_ceramictiles.sl:125:      C = mix(C, Cspeck, speckly * specky);
k3d/share/shaders/k3d_ceramictiles.sl:134: * "glossy" specular term.  We're actually blending between a purely
k3d/share/shaders/k3d_ceramictiles.sl:158:    ks * LocIllumGlossy(Nf, V, roughness / 10,
k3d/share/shaders/k3d_ceramictiles.sl:180:			 float edgevary = 1, mottling = 1, speckly = 1;
k3d/share/shaders/k3d_ceramictiles.sl:186:			 float varyhue = 0.025, varysat = 0.4, varylum = 0.5;)
k3d/share/shaders/k3d_ceramictiles.sl:190:   * Normalize everything so that the tiles are 1x1 units
k3d/share/shaders/k3d_ceramictiles.sl:193:    ProjectTo2D (projection, P, textureprojspace, array_to_mx(mx),ss, tt, dss, dtt);
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:226:   * so every tile looks a little different.
k3d/share/shaders/k3d_ceramictiles.sl:229:			    edgevary, mottling, speckly,
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_checkerboard_solid.sl:17:	float x, y, z, sum;
k3d/share/shaders/k3d_checkerboard_solid.sl:22:	y = mod(floor(ycomp(Pshad) / TileY), 2.0);
k3d/share/shaders/k3d_checkerboard_solid.sl:25:	sum = mod(x + y + z, 2.0);
k3d/share/shaders/k3d_clay.sl:2: * clay.sl -- simple clay surface using MaterialClay
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: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: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:27:    float y, fy, yfreq, yphase;
k3d/share/shaders/k3d_cloudplane.sl:30:    uniform float yoffset = 96;
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:39:    yfreq = 2 * PI * 0.021;
k3d/share/shaders/k3d_cloudplane.sl:45:        fy = amplitude *
k3d/share/shaders/k3d_cloudplane.sl:46:            (offset + cos(yfreq * (y + yphase)));
k3d/share/shaders/k3d_cloudplane.sl:47:        f += fx * fy;
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_cloudplane.sl:51:        xfreq *= 1.9 + i * 0.1; /* approximately 2 */
k3d/share/shaders/k3d_cloudplane.sl:52:        yfreq *= 2.2 - i * 0.08; /* approximately 2 */
k3d/share/shaders/k3d_constant.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_constant.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_constant.sl:9:surface k3d_constant(float intensity = 1.0)
k3d/share/shaders/k3d_constant.sl:12:  Ci = Os * Cs * intensity;
k3d/share/shaders/k3d_contacshadow.sl:10:** by Rob Engle and Jim Berney  
k3d/share/shaders/k3d_contacshadow.sl:16:    float samples = 10;         /* how many samples to take per Z lookup */  
k3d/share/shaders/k3d_contacshadow.sl:19:    float maxdist = 10000;      /* how far is considered infinity */  
k3d/share/shaders/k3d_contacshadow.sl:36:    float tt = (1 - ycomp(screenP)) * 0.5;  
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: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:15: *	 (this means the number of tiles actually seen is the square of txtscale * tiles)
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:69:		/* Overlay the dark markings */
k3d/share/shaders/k3d_craters.sl:4: * Voronoi/Worley noise is combined using 1/f scaling to put craters on a surface.
k3d/share/shaders/k3d_craters.sl:19:   float octaves=9;      /* number of scales used - use lower numbers for cartoony effects */
k3d/share/shaders/k3d_craters.sl:22:   float jitter=1.0;     /* irregularity of crater spacing */
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: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: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: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:23:	color topcolor, basecolor - the color of the crayon strokes and the color of the ground
k3d/share/shaders/k3d_crayon.sl:26:	Peter Quint - Revised Monday, January 10, 2000 
k3d/share/shaders/k3d_crayon.sl:32:#define snoise(x,y) ((noise(x,y) - 0.5) * 2)
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:55:k3d_crayon (	float Ka = 1;
k3d/share/shaders/k3d_crayon.sl:64:			float density0 = .5;
k3d/share/shaders/k3d_crayon.sl:65:			float density1 = .5;
k3d/share/shaders/k3d_crayon.sl:71:    float density = density0 + t * (density1 - density0);
k3d/share/shaders/k3d_crayon.sl:72:	/* work out the density for the current t */
k3d/share/shaders/k3d_crayon.sl:73:	float trs = spline(1 - density, 0 , -0.195997, -0.128361, -0.0738346,	-0.0316483,
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:80:	float fw = max(filterwidth(s), filterwidth(t)); /* the size of the micropolygon */
k3d/share/shaders/k3d_crayontoon.sl:1:/* crayonToon.sl Ver. 1.0 Felipe Esquivel

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

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

k3d/share/shaders/k3d_crayontoon.sl:14:surface k3d_crayontoon(color colorBase = color(1, .92, .44),

k3d/share/shaders/k3d_cyclone.sl:10:surface k3d_cyclone(float Ka = 0.5, Kd = 0.75; float max_radius = 1;
k3d/share/shaders/k3d_cyclone.sl:15:  float radius, dist, angle, sine, cosine, eye_weight, value;
k3d/share/shaders/k3d_cyclone.sl:24:  /* Rotate hit point to "cyclone space" */
k3d/share/shaders/k3d_cyclone.sl:26:  radius = sqrt(xcomp(PN) * xcomp(PN) + ycomp(PN) * ycomp(PN));
k3d/share/shaders/k3d_cyclone.sl:29:    {				/* inside of cyclone */
k3d/share/shaders/k3d_cyclone.sl:36:	point(xcomp(Pt) * cosine - ycomp(Pt) * sine,
k3d/share/shaders/k3d_cyclone.sl:37:	      xcomp(Pt) * sine + ycomp(Pt) * cosine, zcomp(Pt));
k3d/share/shaders/k3d_cyclone.sl:38:      /* Subtract out "eye" of storm */
k3d/share/shaders/k3d_cyclone.sl:40:	{			/* if in "eye" */
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: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:12:// but WITHOUT ANY WARRANTY; without even the implied warranty of
k3d/share/shaders/k3d_decalplastic.sl:16:// You should have received a copy of the GNU General Public
k3d/share/shaders/k3d_defaultsurface.sl:4: *     Copyright 1988, 1989, Pixar.  All rights reserved.
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:19: *      Dec 1992 -- written by lg for "Timbre Trees Examples" (jingle)
k3d/share/shaders/k3d_dented.sl:21: * last modified  12 Jan 1994 by Larry Gritz
k3d/share/shaders/k3d_dented.sl:24: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_dented.sl:30:displacement k3d_dented( float Km = 1; float power = 3; float frequency = 1; float maxoctaves = 6; )
k3d/share/shaders/k3d_dented.sl:38:	size = frequency;
k3d/share/shaders/k3d_depthcue.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_depthcue.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
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:9:string debug="y";
k3d/share/shaders/k3d_depthcue_surf.sl:16:	if (debug=="y")
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:2:	float  intensity=1 ;
k3d/share/shaders/k3d_distant_shadow.sl:13:			Cl = intensity * lightcolor;
k3d/share/shaders/k3d_distantlight.sl:2: * (c) Copyright 1988, Pixar.
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:14:  solar(to - from, 0) Cl = intensity * lightcolor;
k3d/share/shaders/k3d_droop.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_droop.sl:3:/* Listing 16.27  Displacement shader with catenary droop in y*/
k3d/share/shaders/k3d_droop.sl:14:	float droop, yDel;
k3d/share/shaders/k3d_droop.sl:18:	yDel = -Km * ( M_E + (1/M_E) - (exp(droop)+exp(-droop)) );
k3d/share/shaders/k3d_droop.sl:19:	setycomp(P, ycomp(P) + yDel);
k3d/share/shaders/k3d_dturb.sl:10:  float magnitude, layer_mag;
k3d/share/shaders/k3d_easysurface.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_easysurface.sl:6: * easysurface(): orientation-sensitive surface shading without a light source
k3d/share/shaders/k3d_easysurface.sl:9:k3d_easysurface(
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:7: * dim and fade as they die.
k3d/share/shaders/k3d_ember.sl:37:	// angle for edge opacity falloff
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:63:	//only back face shade...
k3d/share/shaders/k3d_emboss.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_eroded.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_eroded.sl:6: * eroded(): Simulate a metallic surface eaten away with acid
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:8: *   part (eyeball), and blood vessels can be set individually.  Fractal
k3d/share/shaders/k3d_eyeball.sl:14: *   eyeballcolor - color of the white part of the eyeball
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:21: *   index - set between 0 and 1, lets you use this shader to generate
k3d/share/shaders/k3d_eyeball.sl:22: *           non-identical eyeballs.
k3d/share/shaders/k3d_eyeball.sl:24: * ANTIALIASING: basic antialiasing of the boundaries between tissue types
k3d/share/shaders/k3d_eyeball.sl:27: * AUTHOR: written by Larry Gritz
k3d/share/shaders/k3d_eyeball.sl:30: *      Nov 1991 - crude written of "eye" by lg for Herman's eyes for
k3d/share/shaders/k3d_eyeball.sl:32: *      Dec 1993 - "eye" modified by lg to clean up a bit.
k3d/share/shaders/k3d_eyeball.sl:33: *      10 Jan 1994 - recoded by lg in correct shading language.
k3d/share/shaders/k3d_eyeball.sl:35: *                       "eyeball"
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:51:	 color eyeballcolor = color(1,1,1);
k3d/share/shaders/k3d_eyeball.sl:66:  float displayed, newdisp;
k3d/share/shaders/k3d_eyeball.sl:69:  float bloody, tt;
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: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:89:   * of the whites.  The veining pattern is essentially summed zero sets
k3d/share/shaders/k3d_eyeball.sl:93:  if (irisstat * bloody > 0.001) {
k3d/share/shaders/k3d_eyeball.sl:94:      turb = bloody;  freq = veinfreq;
k3d/share/shaders/k3d_eyeball.sl:95:      displayed = 0;
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:105:  else Cball = eyeballcolor;
k3d/share/shaders/k3d_eyeball.sl:126:  /* Make the eye a little glossier on the iris and pupil */
k3d/share/shaders/k3d_fakesky.sl:2: * fakesky.sl

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_fakesky.sl:6: * clear sky.

k3d/share/shaders/k3d_fakesky.sl:9:surface k3d_fakesky(vector up = (0,0,1); color skycolor = (.5, .6, 1.)) {

k3d/share/shaders/k3d_fakesky.sl:11:    Ci = Os * (.5 + .5 * max(0., (up . normalize(N)))) * 1.8 * skycolor;

k3d/share/shaders/k3d_filament.sl:1:/* Copyrighted Pixar 1989 */
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:10:	float	frequency	= 5.0,
k3d/share/shaders/k3d_filament.sl:15:	float offset = mod((t*frequency + s + phase), 1.0);
k3d/share/shaders/k3d_fill.sl:1:/*IDfill written by Ivan DeWolf
k3d/share/shaders/k3d_fire.sl:3: * animated fire -- adpated from shader by Flip Phillips
k3d/share/shaders/k3d_fire.sl:11:  color layer_color, surface_color;
k3d/share/shaders/k3d_fire.sl:12:  color surface_opac, layer_opac;
k3d/share/shaders/k3d_fire.sl:18:  color yellow = color (.95, .95, .1);
k3d/share/shaders/k3d_fire.sl:24:  /* compress ss & offset both by factor of current frame */
k3d/share/shaders/k3d_fire.sl:44:  layer_opac = flame;
k3d/share/shaders/k3d_fire.sl:45:  layer_color = spline(flame, red, red, red, red, orange, yellow, hot, hot);
k3d/share/shaders/k3d_fire.sl:46:  surface_color = blend(surface_color, layer_color, layer_opac);
k3d/share/shaders/k3d_fire.sl:47:  surface_opac = union(surface_opac, layer_opac);
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:17: *    C language version by F. Kenton Musgrave
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:26: *    ??? - original C language version by Ken Musgrave
k3d/share/shaders/k3d_flame.sl:27: *    Apr 94 - translation to Shading Language by L. Gritz
k3d/share/shaders/k3d_flame.sl:47:  PQ *= point(1, 1, exp(-ycomp(PP)));
k3d/share/shaders/k3d_flame.sl:57:  cmap = 0.85 * chaos + flameoffset + (flameamplitude * ycomp(PP));
k3d/share/shaders/k3d_fog.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_fog.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
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: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:35:          		exponent = pow( lacunarity, (-i*H) );

k3d/share/shaders/k3d_fractal.sl:37:          		PP.x *= lacunarity;

k3d/share/shaders/k3d_fractal.sl:38:          		PP.y *= lacunarity;

k3d/share/shaders/k3d_fractal.sl:39:          		PP.z *= lacunarity;

k3d/share/shaders/k3d_fractal.sl:41:			PP = PP * lacunarity;

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

k3d/share/shaders/k3d_fresnelplastic.sl:28:			 not over-written by "colorMap } */
k3d/share/shaders/k3d_fresnelplastic.sl:34:      0: turns off fresnel and gives plastic look. Typical values
k3d/share/shaders/k3d_fresnelplastic.sl:43:   /* cat Reflection desc {Name of reflection map. } type texture */
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:55:			  desc {Swap S/T access to overcome Maya/MtoR
k3d/share/shaders/k3d_fresnelplastic.sl:102:    float reflOpacity = 1;
k3d/share/shaders/k3d_fresnelplastic.sl:105:			P, R, reflectBlur, reflOpacity);
k3d/share/shaders/k3d_funkyglass.sl:1:/* funkyglass.sl - randomly colored "glass" (transparent, but no refl/refr).
k3d/share/shaders/k3d_funkyglass.sl:2: * (c) Copyright 1994, Larry Gritz
k3d/share/shaders/k3d_funkyglass.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_funkyglass.sl:9:surface k3d_funkyglass(float Ka = .2;
k3d/share/shaders/k3d_fur1.sl:5: *     by Lawrence D. Chin, cs184-bo

k3d/share/shaders/k3d_fur2.sl:9:   by Clint Hanson and Armin Bruderlin
k3d/share/shaders/k3d_fur2.sl:65:	 varying vector clump_vect  = vector 0;
k3d/share/shaders/k3d_fur2.sl:75:    varying normal nSN = normalize( 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:85:    float Kajiya = 0;
k3d/share/shaders/k3d_fur2.sl:87:    varying color final_c;
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:101:    /* Make the specular only hit in certain parts of the hair--v is
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:123:	Kajiya = T_Dot_nL * T_Dot_e + sin(Alpha) * sin(Beta);
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_glass.sl:2: * glass.sl -- Shiny reflective & refractive glass, using ray tracing.
k3d/share/shaders/k3d_glass.sl:5: *   Makes semi-transparent glass, using ray tracing to calculate
k3d/share/shaders/k3d_glass.sl:11: *    blur - how blurry are the reflections? (0 = perfectly sharp)
k3d/share/shaders/k3d_glass.sl:13: *    rayjitter, raysamples - ray tracing controls for reflection
k3d/share/shaders/k3d_glass.sl:16: *    refrblur - how blurry are the refractions? (0 = perfectly sharp)
k3d/share/shaders/k3d_glass.sl:18: *    reflrayjitter, refrraysamples - ray tracing controls for refraction
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:41:		  float refrrayjitter = 0, refrraysamples = 1;)
k3d/share/shaders/k3d_glass.sl:46:		  eta, transmitcolor, refrrayjitter, refrraysamples,
k3d/share/shaders/k3d_gloop.sl:1:/*  IDGloop.sl written 8/99 by Ivan DeWolf
k3d/share/shaders/k3d_gloop.sl:2: *  courtesy of Rhythm & Hues  (thanks!)
k3d/share/shaders/k3d_gloop.sl:11: * freq - the frequency of the noise. Lower values
k3d/share/shaders/k3d_gloop.sl:12: *        will cause a larger displacement so you will 
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:19: * wildly complex formula:
k3d/share/shaders/k3d_gloop.sl:62:  /* wash your hands after displacing P*/
k3d/share/shaders/k3d_glow.sl:19:      // Calculate final color and opacity - we set Oi near zero
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:6: *   traced reflections) and cut into tiles (divided in xy texture space).
k3d/share/shaders/k3d_gmarbtile_polish.sl:10: *   Kr - reflectivity (shininess) of the surface
k3d/share/shaders/k3d_gmarbtile_polish.sl:12: *   darkcolor, lightcolor - colors of the underlying substrate
k3d/share/shaders/k3d_gmarbtile_polish.sl:14: *   veinfreq - controls the frequency of the veining effects
k3d/share/shaders/k3d_gmarbtile_polish.sl:20: * AUTHOR: written by Larry Gritz
k3d/share/shaders/k3d_gmarbtile_polish.sl:24:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_gmarbtile_polish.sl:41:			     uniform float envrad = 100, rayjitter =
k3d/share/shaders/k3d_gmarbtile_polish.sl:42:			     0, raysamples = 1;
k3d/share/shaders/k3d_gmarbtile_polish.sl:58:  float tt = ycomp(PP) / tilesize;
k3d/share/shaders/k3d_gmarbtile_polish.sl:61:  float groovy = tilepattern(ss, tt, dss, dtt, groovewidth, groovewidth,
k3d/share/shaders/k3d_gmarbtile_polish.sl:68:   * First calculate the underlying color of the substrate
k3d/share/shaders/k3d_gmarbtile_polish.sl:74:   * Now we layer on the veins
k3d/share/shaders/k3d_gmarbtile_polish.sl:98:  Ct = mix(groovecolor, Ct, groovy);
k3d/share/shaders/k3d_gmarbtile_polish.sl:105:  env *= groovy * specularcolor;
k3d/share/shaders/k3d_gooch.sl:18: *  y            : used to construct the warm color
k3d/share/shaders/k3d_gooch.sl:22: * AUTHOR: written by Mike King
k3d/share/shaders/k3d_gooch.sl:33:         float y = .3;
k3d/share/shaders/k3d_gooch.sl:39:    color yellow = color(y,y,0);
k3d/share/shaders/k3d_gooch.sl:46:    kwarm = yellow + (Cs * beta);
k3d/share/shaders/k3d_gouge.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_gouge.sl:14:	float	y = ycomp(transform("object",P));	/* convert to object space	 */
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_gouge.sl:23:   {  P += (-Km * texture(texturename,s+spin,y/15.0)) * normalize(N);
k3d/share/shaders/k3d_granite.sl:1:/* Copyrighted Pixar 1989 */
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:37:        string up_paint="y";
k3d/share/shaders/k3d_graphic_lines.sl:94:	color layer_color_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:96:	color layer_opac_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:101:	float y_highlight;
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:140:		layer_color_highlight=0.0;
k3d/share/shaders/k3d_graphic_lines.sl:144:		layer_color_highlight=1.0;
k3d/share/shaders/k3d_graphic_lines.sl:147:		layer_color_highlight=1.0;
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:172:	color layer_color_paint;
k3d/share/shaders/k3d_graphic_lines.sl:174:	color layer_opac_paint;
k3d/share/shaders/k3d_graphic_lines.sl:179:	float y_paint;
k3d/share/shaders/k3d_graphic_lines.sl:195:	else if (up_paint == "y")
k3d/share/shaders/k3d_graphic_lines.sl:196:	{y_paint=ycomp(Psh_paint);
k3d/share/shaders/k3d_graphic_lines.sl:197:		y_paint*=line_scale_paint*line_scale_master;
k3d/share/shaders/k3d_graphic_lines.sl:198:		tt_paint=mod(y_paint,1);
k3d/share/shaders/k3d_graphic_lines.sl:214:		layer_color_paint=0.0;
k3d/share/shaders/k3d_graphic_lines.sl:218:		layer_color_paint=1.0;
k3d/share/shaders/k3d_graphic_lines.sl:221:		layer_color_paint=1.0;
k3d/share/shaders/k3d_graphic_lines.sl:225:	layer_opac_paint=color(val1);
k3d/share/shaders/k3d_graphic_lines.sl:226:	surface_color_paint=((surface_color_paint)*(1-(layer_opac_paint))+(layer_color_paint)*(layer_opac_paint));
k3d/share/shaders/k3d_graphic_lines.sl:244:	color layer_color_ink;
k3d/share/shaders/k3d_graphic_lines.sl:246:	color layer_opac_ink;
k3d/share/shaders/k3d_graphic_lines.sl:251:	float y_ink;
k3d/share/shaders/k3d_graphic_lines.sl:267:	else if (up_ink == "y")
k3d/share/shaders/k3d_graphic_lines.sl:268:	{y_ink=ycomp(Psh_ink);
k3d/share/shaders/k3d_graphic_lines.sl:269:		y_ink*=line_scale_ink*line_scale_master;
k3d/share/shaders/k3d_graphic_lines.sl:270:		tt_ink=mod(y_ink,1);
k3d/share/shaders/k3d_graphic_lines.sl:286:		layer_color_ink=0.0;
k3d/share/shaders/k3d_graphic_lines.sl:290:		layer_color_ink=1.0;
k3d/share/shaders/k3d_graphic_lines.sl:293:		layer_color_ink=1.0;
k3d/share/shaders/k3d_graphic_lines.sl:297:	layer_opac_ink=color(val2);
k3d/share/shaders/k3d_graphic_lines.sl:298:	surface_color_ink=((surface_color_ink)*(1-(layer_opac_ink))+(layer_color_ink)*(layer_opac_ink));
k3d/share/shaders/k3d_graphic_lines.sl:308:	/** blend 3 layers **/
k3d/share/shaders/k3d_graphic_lines.sl:331:	color gline_color, layer_color;
k3d/share/shaders/k3d_graphic_lines.sl:332:	color gline_opac, layer_opac;
k3d/share/shaders/k3d_graphic_lines.sl:337:	/* background layer  */
k3d/share/shaders/k3d_graphic_lines.sl:341:	/* gline paint layer ) */
k3d/share/shaders/k3d_graphic_lines.sl:343:	/* only care about percentage illumination */
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:356:	layer_opac = Oi_paint;
k3d/share/shaders/k3d_graphic_lines.sl:358:	gline_color = blend(gline_color, layer_color, layer_opac);
k3d/share/shaders/k3d_graphic_lines.sl:359:	gline_opac = union(gline_opac, layer_opac);
k3d/share/shaders/k3d_graphic_lines.sl:361:	/* gline ink layer ) */
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:369:		layer_color = Ci_ink;
k3d/share/shaders/k3d_graphic_lines.sl:371:		layer_color = 0;
k3d/share/shaders/k3d_graphic_lines.sl:373:	gline_color = blend(gline_color, layer_color, layer_opac);
k3d/share/shaders/k3d_graphic_lines.sl:374:	gline_opac = union(gline_opac, layer_opac);
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:10: *   by Lawrence D. Chin, cs184-bo

k3d/share/shaders/k3d_grass_displace.sl:32:        x,y,z;

k3d/share/shaders/k3d_grass_displace.sl:38:      y = (tmod - 0.5)*10;

k3d/share/shaders/k3d_grass_displace.sl:41:      y = abs(y - 2.5);

k3d/share/shaders/k3d_grass_displace.sl:42:      z = sqrt(pow(x,2) + pow(y,2));

k3d/share/shaders/k3d_grass_displace.sl:51:      y = tmod*10; 

k3d/share/shaders/k3d_grass_displace.sl:53:      y = abs(y - 2.5);

k3d/share/shaders/k3d_grass_displace.sl:54:      z = sqrt(pow(x,2) + pow(y,2));

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

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

k3d/share/shaders/k3d_grass_surface.sl:37:      Ci = blend(color1, color2, layer_opac);

k3d/share/shaders/k3d_greenmarble.sl:10: *   darkcolor, lightcolor - colors of the underlying substrate
k3d/share/shaders/k3d_greenmarble.sl:12: *   veinfreq - controls the frequency of the veining effects
k3d/share/shaders/k3d_greenmarble.sl:16: * AUTHOR: Larry Gritz, 1994
k3d/share/shaders/k3d_greenmarble.sl:21:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_greenmarble.sl:42:   * First calculate the underlying color of the substrate
k3d/share/shaders/k3d_greenmarble.sl:43:   *    Use turbulence - use frequency clamping
k3d/share/shaders/k3d_greenmarble.sl:49:   * Now we layer on the veins
k3d/share/shaders/k3d_grids.sl:1:/** Grid shader copyright 2005 Daniel Scott Matthews dan@3-e.net **/
k3d/share/shaders/k3d_grids.sl:49:#define rotate2d(x,y,rad,ox,oy,rx,ry) rx = ((x) - (ox)) * cos(rad) - ((y) - (oy)) * sin(rad) + (ox); ry = ((x) - (ox)) * sin(rad) + ((y) - (oy)) * cos(rad) + (oy)
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:66:color G1L1_Ct = blend(G1L1_SurfaceColor, G1L1_GridColor, G1L1_layer_opac);
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:74:color G1L2_Ct = blend(G1L2_SurfaceColor, G1L2_GridColor, G1L2_layer_opac);
k3d/share/shaders/k3d_grids.sl:78:/** Grid 2 Opacity **/
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:85:color G2L1_Ct = blend(G2L1_SurfaceColor, G2L1_GridColor, G2L1_layer_opac);
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:93:color G2L2_Ct = blend(G2L2_SurfaceColor, G2L2_GridColor, G2L2_layer_opac);
k3d/share/shaders/k3d_grids_disp.sl:28:#define rotate2d(x,y,rad,ox,oy,rx,ry) rx = ((x) - (ox)) * cos(rad) - ((y) - (oy)) * sin(rad) + (ox); ry = ((x) - (ox)) * sin(rad) + ((y) - (oy)) * cos(rad) + (oy)
k3d/share/shaders/k3d_grids_disp.sl:37:color layer_opac0 = pulse(linewidth0, 1-linewidth0, fuzz0, tt0);
k3d/share/shaders/k3d_grids_disp.sl:38:color Ct0 = blend(SurfaceColor, GridColor, layer_opac0);
k3d/share/shaders/k3d_grids_disp.sl:41:#define rotate2d(x,y,rad,ox,oy,rx,ry) rx = ((x) - (ox)) * cos(rad) - ((y) - (oy)) * sin(rad) + (ox); ry = ((x) - (ox)) * sin(rad) + ((y) - (oy)) * cos(rad) + (oy)
k3d/share/shaders/k3d_grids_disp.sl:50:color layer_opac1 = pulse(linewidth1, 1-linewidth1, fuzz1, tt1);
k3d/share/shaders/k3d_grids_disp.sl:51:color Ct1 = blend(SurfaceColor, GridColor, layer_opac1);
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: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:3:* dynamic range and more realistic colours.

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

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:10:*post links back to the above address*or get in contact if you have any queries

k3d/share/shaders/k3d_hdr_light.sl:23:	float Dy = ycomp(D);

k3d/share/shaders/k3d_hdr_light.sl:26:	float r = 0.159154943 * acos(Dz) / sqrt((Dx * Dx) + (Dy * Dy));

k3d/share/shaders/k3d_hdr_light.sl:29:	float tt = 0.5 + (Dy * r);

k3d/share/shaders/k3d_hdr_light.sl:41:	float intensity =1.0;

k3d/share/shaders/k3d_hdr_light.sl:45:	string mappingtype = "probe";

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

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:70:		if (mappingtype == ""){

k3d/share/shaders/k3d_hdr_light.sl:72:			printf("Please select mapping type probe,environment or planar");

k3d/share/shaders/k3d_hdr_light.sl:75:		if (mappingtype == "probe"){

k3d/share/shaders/k3d_hdr_light.sl:80:		else if (mappingtype == "environment"){

k3d/share/shaders/k3d_hdr_light.sl:85:		else if (mappingtype == "planar"){

k3d/share/shaders/k3d_hdr_light.sl:99:		Cl = Ct * intensity * exposure;

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:3:* dynamic range 

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

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:10:*post links back to the above address*or get in contact if you have any queries

k3d/share/shaders/k3d_hdr_surface.sl:22:	float Dy = ycomp(D);

k3d/share/shaders/k3d_hdr_surface.sl:25:	float r = 0.159154943 * acos(Dz) / sqrt((Dx * Dx) + (Dy * Dy));

k3d/share/shaders/k3d_hdr_surface.sl:28:	float tt = 0.5 + (Dy * r);

k3d/share/shaders/k3d_hdr_surface.sl:40:	float intensity =1.0;

k3d/share/shaders/k3d_hdr_surface.sl:44:	string mappingtype = "probe";

k3d/share/shaders/k3d_hdr_surface.sl:54:	if (mappingtype == "probe"){

k3d/share/shaders/k3d_hdr_surface.sl:59:	else if (mappingtype == "environment"){

k3d/share/shaders/k3d_hdr_surface.sl:64:	else if (mappingtype == "planar"){

k3d/share/shaders/k3d_hdr_surface.sl:73:	Ci = Cs * Oi * Ct * intensity * exposure;

k3d/share/shaders/k3d_hdri2.sl:2:k3d_hdri2 (float intensity = 1;
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: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:31:* Larry Gritz "noises.h", "project.h", "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:97:ProjectTo2D (Projection,rotate(P,radians(Rotate),P1,P2),Space,array_to_mx(mx),SS,TT,Ds,Dt);
k3d/share/shaders/k3d_hexatile_bump.sl:104:Worley2D_f1f2 (scale1,scale2,/* Jitter */ 0,/* Seed */ 0,C1,C2,/* Hexagon */ 1,/* TileScaleSS */ 1,
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: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:29: *    the floors in the public areas of the Washington DC subway system.
k3d/share/shaders/k3d_hextile.sl:31: * AUTHOR: written by Larry Gritz, 1994
k3d/share/shaders/k3d_hextile.sl:34: *    15 Feb 1994 -- written by lg
k3d/share/shaders/k3d_hextile.sl:36: * last modified 15 Feb 94 by Larry Gritz
k3d/share/shaders/k3d_hextile.sl:41:#define snoise2(x,y) (2*noise((x),(y))-1)
k3d/share/shaders/k3d_hextile.sl:54:	 float tilevary = 0.15;
k3d/share/shaders/k3d_hextile.sl:57:         float stainfrequency = 2;
k3d/share/shaders/k3d_hextile.sl:58:         float scufffrequency = 4;
k3d/share/shaders/k3d_hextile.sl:66:  float x, y;
k3d/share/shaders/k3d_hextile.sl:97:      y = 1.7320508 * (tt - tileradius);
k3d/share/shaders/k3d_hextile.sl:98:      if (y > x) {
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:110:  Ctile = tilecolor * (1 + tilevary * snoise(tileindex+0.5));
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:115:					     s*scufffrequency+123.82));
k3d/share/shaders/k3d_imagelayerclouds.sl:5:surface k3d_imagelayerclouds(float txtscale = 1;
k3d/share/shaders/k3d_imagelayerclouds.sl:6:			     color skycolor = color(.15, .15, .6);
k3d/share/shaders/k3d_imagelayerclouds.sl:33:  Ct = mix(skycolor, cloudcolor, smoothstep(threshold, 1, value));
k3d/share/shaders/k3d_imagelayergradient.sl:1:surface k3d_imagelayergradient(color zenith = color(0, 0, 1);
k3d/share/shaders/k3d_imagelayergradient.sl:2:			       color sky = color(.5, .5, 1);
k3d/share/shaders/k3d_imagelayergradient.sl:10:      Ci = Cs * mix(zenith, sky, v * 2.0);
k3d/share/shaders/k3d_incandplastic.sl:12:	      color SurfaceOpacity = 1;

k3d/share/shaders/k3d_incandplastic.sl:25:  Ci = SurfaceOpacity * (SurfaceColor * (Ka * ambient() + Kd * diffuse(Nf)) +

k3d/share/shaders/k3d_incandplastic.sl:28:  Oi = SurfaceOpacity;

k3d/share/shaders/k3d_indirect.sl:1:/* indirect.sl - retrieve radiosity data from the "ray server"
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: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: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:36:	float txtscale = .05;     	/* Ugly kludge (see above...)    */

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

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:107:	 * The blotch color is finally determined by mixing,

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

k3d/share/shaders/k3d_leather.sl:110:	 * really simple noise routine.

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

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

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

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:167:	 * also dented a bit (alas, no real apples are perfectly

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:197:		reflect = RayTrace(P, Rdir, 0, 1, 1);

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

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: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:10: *   liberties but looks pretty good.
k3d/share/shaders/k3d_lensflare.sl:13: *   intensity - overall scale of intensity of all lens flare effects
k3d/share/shaders/k3d_lensflare.sl:14: *   bloomintensity - overall intensity of the "bloom" effect.  Setting
k3d/share/shaders/k3d_lensflare.sl:17: *   bloomstarry, bloomnpoints - control the "starry" appearance of the 
k3d/share/shaders/k3d_lensflare.sl:18: *          bloom effect (bloomstarry=0 means perfectly round bloom)
k3d/share/shaders/k3d_lensflare.sl:19: *   starburstintensity - overall intensity of starburst effect (0=none)
k3d/share/shaders/k3d_lensflare.sl:22: *   rainbowintensity - intensity of rainbow effect (0=none)
k3d/share/shaders/k3d_lensflare.sl:24: *   nspots - number of "spots" splayed out on the axis joining the
k3d/share/shaders/k3d_lensflare.sl:26: *   disky, ringy, blotty, bloony - give the relative proportions of
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:37: * Author: Larry Gritz & Tony Apodaca, 1999
k3d/share/shaders/k3d_lensflare.sl:54:  return (xcomp(Pcorner1) - xcomp(Pcorner0)) / (ycomp(Pcorner1) -
k3d/share/shaders/k3d_lensflare.sl:55:						ycomp(Pcorner0));
k3d/share/shaders/k3d_lensflare.sl:84:surface k3d_lensflare(float intensity = 1.0;
k3d/share/shaders/k3d_lensflare.sl:85:		      float bloomintensity = 1;
k3d/share/shaders/k3d_lensflare.sl:87:		      float bloomstarry = 0.75;
k3d/share/shaders/k3d_lensflare.sl:90:		      float starburstintensity = 0.075;
k3d/share/shaders/k3d_lensflare.sl:94:		      float rainbowintensity = 0.03;
k3d/share/shaders/k3d_lensflare.sl:96:		      float nspots = 50; float disky = 3; float ringy = 1;
k3d/share/shaders/k3d_lensflare.sl:97:		      float blotty = 1;
k3d/share/shaders/k3d_lensflare.sl:98:		      float bloony = 1; float spotintensity = 0.08;
k3d/share/shaders/k3d_lensflare.sl:99:		      float spotvarycolor = 0.5; float seed = 143;
k3d/share/shaders/k3d_lensflare.sl:127:      atten * intensity * (comp(Cl, 0) + comp(Cl, 1) + comp(Cl, 2)) / 3;
k3d/share/shaders/k3d_lensflare.sl:136:    float angle = atan(ycomp(Lvec), xcomp(Lvec)) + PI;
k3d/share/shaders/k3d_lensflare.sl:144:    if(bloomintensity > 0)
k3d/share/shaders/k3d_lensflare.sl:148:	bloom = mix(0.5, bloom, bloomstarry);
k3d/share/shaders/k3d_lensflare.sl:151:	Cflare += bloom * (bloomintensity / intensity) / brightness;
k3d/share/shaders/k3d_lensflare.sl:155:    if(starburstintensity > 0)
k3d/share/shaders/k3d_lensflare.sl:163:	Cflare += star * (starburstintensity / intensity) / brightness;
k3d/share/shaders/k3d_lensflare.sl:167:    if(rainbowintensity > 0)
k3d/share/shaders/k3d_lensflare.sl:170:	  brightness * (rainbowintensity / intensity) *
k3d/share/shaders/k3d_lensflare.sl:189:	clr *= 1 + spotvarycolor * (color cellnoise(i) - 0.5);
k3d/share/shaders/k3d_lensflare.sl:193:	uniform float alltypes = (disky + ringy + blotty + bloony);
k3d/share/shaders/k3d_lensflare.sl:194:	uniform float type = urand() * alltypes;
k3d/share/shaders/k3d_lensflare.sl:198:	if(type < disky)
k3d/share/shaders/k3d_lensflare.sl:203:	else if(type < (disky + ringy))
k3d/share/shaders/k3d_lensflare.sl:208:	else if(type < (disky + ringy + blotty))
k3d/share/shaders/k3d_lensflare.sl:220:	Cflare += spotintensity * bright * clr * Cs * int;
k3d/share/shaders/k3d_lensflare.sl:226:  Ci *= intensity;
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:10: *    C language version by F. Kenton Musgrave
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:19: *    ??? - original C language version by Ken Musgrave
k3d/share/shaders/k3d_luna.sl:20: *    Apr 94 - translation to Shading Language by L. Gritz
k3d/share/shaders/k3d_luna.sl:34:		 float lacunarity = 2;
k3d/share/shaders/k3d_luna.sl:44:		 float numrays = 8;	/* arg10 */
k3d/share/shaders/k3d_luna.sl:45:		 float rayfade = 1;	/* arg11 */
k3d/share/shaders/k3d_luna.sl:59:  float raydist;
k3d/share/shaders/k3d_luna.sl:64:  radial_dist = sqrt(xcomp(PP) * xcomp(PP) + ycomp(PP) * ycomp(PP));
k3d/share/shaders/k3d_luna.sl:65:  omega = pow(lacunarity, (-.5) - H);
k3d/share/shaders/k3d_luna.sl:67:  /* bumpy = fBm (PP, omega, lacunarity, octaves); */
k3d/share/shaders/k3d_luna.sl:74:      l *= lacunarity;
k3d/share/shaders/k3d_luna.sl:170:  /* Make crater rays (PP, arg10, arg11, arg12, arg15, arg24, arg25, radial_dist);, yielding temp1 */
k3d/share/shaders/k3d_luna.sl:175:      raydist = 0.2 + 0.2 * snoise(20 * mod(u + 0.022, 1));
k3d/share/shaders/k3d_luna.sl:176:      lighten *= (1 - smoothstep(raydist - .2, raydist, pd));
k3d/share/shaders/k3d_lunette.sl:4: * lunette.sl -- A pretty surface shader ideal for "ground planes".
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:13: *   name, anyway.  The pattern is calculated in 2D u,v coordinates.
k3d/share/shaders/k3d_lunette.sl:22: *   gridDensity - effective opacity of the grid lines
k3d/share/shaders/k3d_lunette.sl:25: *   maxOctaves, lunacrity, gain - work as in the fBm function
k3d/share/shaders/k3d_lunette.sl:31: * Author: written by Jonathan Merritt (jmerritt@warpax.com), 5th October 2002
k3d/share/shaders/k3d_lunette.sl:50: *                           directions appropriately.
k3d/share/shaders/k3d_lunette.sl:52: *                              respectively; expressed as a fraction of the
k3d/share/shaders/k3d_lunette.sl:60: *   lunacrity - Lunacrity of the fBm noise.
k3d/share/shaders/k3d_lunette.sl:63: *                   possibility to increase the amount of colorB present in
k3d/share/shaders/k3d_lunette.sl:67: *   gridDensity - Effective opacity of the grid pattern over the underlying
k3d/share/shaders/k3d_lunette.sl:83:	uniform float lunacrity;	/* lunacrity of the noise */
k3d/share/shaders/k3d_lunette.sl:86:	float gridDensity;	/* density of the grid pattern */
k3d/share/shaders/k3d_lunette.sl:94:	 * pulsegrid varies smoothly between the two values to cope with
k3d/share/shaders/k3d_lunette.sl:114:		noisePt, noisefilterwidth, maxOctaves, lunacrity, gain
k3d/share/shaders/k3d_lunette.sl:122:	color linecolor = mix(basecolor, baselinecolor, gridDensity);
k3d/share/shaders/k3d_lunette.sl:148:	float gridDensity = .5;		/* Effective opacity of the grid */
k3d/share/shaders/k3d_lunette.sl:153:	float lunacrity = 1.3;
k3d/share/shaders/k3d_lunette.sl:162:		lunacrity, gain, colorBenhance, gridDensity, baselinecolor
k3d/share/shaders/k3d_lunette.sl:166:	 * apply a plastic illumination model
k3d/share/shaders/k3d_map_pattern_1.sl:12:float grainy=1; 
k3d/share/shaders/k3d_map_pattern_1.sl:48:float my_t;
k3d/share/shaders/k3d_map_pattern_1.sl:53:my_t = zcomp(PP) / temp_f_3;
k3d/share/shaders/k3d_map_pattern_1.sl:54:PQ = point (xcomp(PP)*8, ycomp(PP)*8, zcomp(PP));
k3d/share/shaders/k3d_map_pattern_1.sl:55:my_t += noise (PQ) / 16;
k3d/share/shaders/k3d_map_pattern_1.sl:57:PQ = point (xcomp(PP), my_t, ycomp(PP)+12.93);
k3d/share/shaders/k3d_map_pattern_1.sl:62:PQ = point (xcomp(PP)*128+5, zcomp(PP)*8-3, ycomp(PP)*128+1);
k3d/share/shaders/k3d_map_pattern_1.sl:63:r2 = grainy * (1.3 - noise (PQ)) + (1-grainy);
k3d/share/shaders/k3d_matte.sl:2: * (c) Copyright 1988, Pixar.
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:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_mondometal.sl:1:/* MondoMetal.sl   Felipe Esquivel, july 2001

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:7: * las partes blancas producen un efecto metalico y donde lo oscuro 

k3d/share/shaders/k3d_mondometal.sl:28:    string abTransparencyMap = "";

k3d/share/shaders/k3d_mondometal.sl:29:    float abInvertTransparencyMap = 0;

k3d/share/shaders/k3d_mondometal.sl:30:    float abTransparencyMapBlur = 1;

k3d/share/shaders/k3d_mondometal.sl:36:    float abReflectivity = .1;

k3d/share/shaders/k3d_mondometal.sl:66:    /* apply STMatrix to texture coordinates **/

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

k3d/share/shaders/k3d_mondometal.sl:143:    /* determine opacity */

k3d/share/shaders/k3d_mondometal.sl:144:    if(abTransparencyMap != "")

k3d/share/shaders/k3d_mondometal.sl:146:        if(abInvertTransparencyMap != 0)

k3d/share/shaders/k3d_mondometal.sl:148:            Copac = Copac * color texture(abTransparencyMap, ss, tt,

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

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

k3d/share/shaders/k3d_mondometal.sl:154:            Copac = Copac * (color(1) - color texture(abTransparencyMap, ss, tt,

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

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

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:209:            D = vector(-zcomp(D), xcomp(D), ycomp(D));

k3d/share/shaders/k3d_mondometal.sl:211:        Crefl = abReflectivity * 

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: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:28: *    C language version by F. Kenton Musgrave

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:37: *    ??? - original C language version by Ken Musgrave

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

k3d/share/shaders/k3d_mysky.sl:51:k3d_mysky (float Ka = 0, Kd = 0;

k3d/share/shaders/k3d_mysky.sl:53:	     color skycolor = color(.15, .15, .6);

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

k3d/share/shaders/k3d_noisysmoke.sl:13:             /* Optimize: one octave only if not lit */                     \
k3d/share/shaders/k3d_noisysmoke.sl:21:             g = density * smoothstep(-1,1,smokevary*smoke);                \
k3d/share/shaders/k3d_noisysmoke.sl:22:         } else g = density;                                                \
k3d/share/shaders/k3d_noisysmoke.sl:30:volume k3d_noisysmoke(float density = 60;
k3d/share/shaders/k3d_noisysmoke.sl:34:		      color scatter = 1;	/* for sky, try (1, 2.25, 21) */
k3d/share/shaders/k3d_noisysmoke.sl:35:		      float octaves = 3, freq = 1, smokevary = 1;
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:51:  color Cv = 0, Ov = 0;		/* net color & opacity of volume */
k3d/share/shaders/k3d_noisysmoke.sl:52:  color dC, dO;			/* differential color & opacity */
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:104:  /* Ci & Oi are the color (premultiplied by opacity) and opacity of 
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_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: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:18: *   ringfreq - mean frequency of ring spacing
k3d/share/shaders/k3d_oak.sl:19: *   ringunevenness - 0=equally spaced rings, larger is unequally spaced
k3d/share/shaders/k3d_oak.sl:20: *   grainfreq - frequency of the fine grain
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:24: *   angularwobble, angularwobblefreq - warping indexed by angle about
k3d/share/shaders/k3d_oak.sl:26: *   ringy, grainy - overall scale on the degree to which rings and
k3d/share/shaders/k3d_oak.sl:37: * Author: Larry Gritz, 1999
k3d/share/shaders/k3d_oak.sl:64:		float ringy = 1, grainy = 1;
k3d/share/shaders/k3d_oak.sl:75:	       angularwobblefreq, ringy, grainy);
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:20: *   varyhue, varysat, varylum - control plank-to-plank color variation
k3d/share/shaders/k3d_oakplank.sl:25: *   ringfreq - mean frequency of ring spacing
k3d/share/shaders/k3d_oakplank.sl:26: *   ringunevenness - 0=equally spaced rings, larger is unequally spaced
k3d/share/shaders/k3d_oakplank.sl:27: *   grainfreq - frequency of the fine grain
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:31: *   angularwobble, angularwobblefreq - warping indexed by angle about
k3d/share/shaders/k3d_oakplank.sl:33: *   ringy, grainy - overall scale on the degree to which rings and
k3d/share/shaders/k3d_oakplank.sl:43: *   rayjitter, raysamples - ray tracing controls
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:59:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_oakplank.sl:90:  /* Calculate our "in-plank" value by multiplying two perpendicular
k3d/share/shaders/k3d_oakplank.sl:115:		     float ringy = 1, grainy = 1;
k3d/share/shaders/k3d_oakplank.sl:118:		     float varyhue = 0.015, varysat = 0.1, varylum = 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:144:			  angularwobblefreq, ringy, grainy);
k3d/share/shaders/k3d_oakplank.sl:147:  Cwood = varyEach(Cwood, plankindex, varyhue, varysat, varylum);
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:19: * History:
k3d/share/shaders/k3d_orange.sl:39:	setycomp (p2, 2*t);
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:9: *   Lambert.  Based on Oren & Nayar's model (see Proc. SIGGRAPH 94).
k3d/share/shaders/k3d_orennayar.sl:12: *   an especially accurate one for rough surfaces.  Truly rough surfacs
k3d/share/shaders/k3d_orennayar.sl:19: * AUTHOR:  Larry Gritz
k3d/share/shaders/k3d_orennayar.sl:22: *   Oren, Michael and Shree K. Nayar.  "Generalization of Lambert's
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:35: *   14 June 1994 -- written by Larry Gritz
k3d/share/shaders/k3d_orennayar.sl:41:k3d_orennayar (float Ka = 1;
k3d/share/shaders/k3d_orennayar.sl:45:    point Nf, IN, Eye, LN;
k3d/share/shaders/k3d_orennayar.sl:54:    Eye = -IN;
k3d/share/shaders/k3d_orennayar.sl:55:    theta_r = acos (Eye . 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_outlet.sl:7: *   twice as high as it is wide.  *Totally* cheesy if you see it from
k3d/share/shaders/k3d_outlet.sl:9: *   I should probably add some bump mapping or other variation, but
k3d/share/shaders/k3d_outlet.sl:10: *   I'm lazy, okay?
k3d/share/shaders/k3d_outlet.sl:17: * AUTHOR: written by Larry Gritz
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:23: * last modified  17 Jan 1994 by Larry Gritz
k3d/share/shaders/k3d_outlet.sl:33:  float x, y;
k3d/share/shaders/k3d_outlet.sl:44:  y = 2 * v;
k3d/share/shaders/k3d_outlet.sl:46:  if ((x*x + (y-1)*(y-1)) < 0.0025) {
k3d/share/shaders/k3d_outlet.sl:52:	   ((y > 0.42 && y < 0.62) || (y > 1.22 && y < 1.42)))
k3d/share/shaders/k3d_outlet.sl:56:  else if (x < 0.25  &&  ((y > 0.35 && y < 0.85) || (y > 1.15 && y < 1.65))) {
k3d/share/shaders/k3d_outlet.sl:57:      if (((x*x + (y-0.75)*(y-0.75)) < 0.0025) ||
k3d/share/shaders/k3d_outlet.sl:58:	  ((x*x + (y-1.55)*(y-1.55)) < 0.0025)) {
k3d/share/shaders/k3d_outline.sl:1:/* IDoutline written by Ivan DeWolf
k3d/share/shaders/k3d_paintedplastic.sl:2: * (c) Copyright 1988, Pixar.
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_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:20: *   plankvary - controls how much wood color varies from plank to plank
k3d/share/shaders/k3d_parquet_plank.sl:21: *   grainy - relative graininess (0 = no fine grain)
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:27: * AUTHOR: Larry Gritz, email: lg@bmrt.org
k3d/share/shaders/k3d_parquet_plank.sl:40:			  float plankvary = 0.8;
k3d/share/shaders/k3d_parquet_plank.sl:41:			  float grainy = 1, wavy = 0.08;)
k3d/share/shaders/k3d_parquet_plank.sl:52:  float groovy;
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:114:  groovy = w * h;
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:131:       * Multiply the ring pattern by the fine grain
k3d/share/shaders/k3d_parquet_plank.sl:137:	  r2 = grainy * r2 * r2 + (1 - grainy);
k3d/share/shaders/k3d_parquet_plank.sl:152:    (1 - plankvary / 2 + plankvary * (float noise(whichplank + 0.5)));
k3d/share/shaders/k3d_parquet_plank.sl:154:  Ct = mix(groovecolor, woodcolor, groovy);
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:21: *   plankvary - controls how much wood color varies from plank to plank
k3d/share/shaders/k3d_parquet_plank2.sl:22: *   grainy - relative graininess (0 = no fine grain)
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:28: * AUTHOR: written by Larry Gritz, the George Washington University
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:38: * last modified 10 Feb 1995 by wave
k3d/share/shaders/k3d_parquet_plank2.sl:54:	       float plankvary = 0.8;
k3d/share/shaders/k3d_parquet_plank2.sl:55:	       float grainy = 1, wavy = 0.08; )
k3d/share/shaders/k3d_parquet_plank2.sl:66:  float groovy;
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:115:  groovy = w*h;
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:130:       * Multiply the ring pattern by the fine grain
k3d/share/shaders/k3d_parquet_plank2.sl:135:	  r2 = grainy * r2*r2 + (1-grainy);
k3d/share/shaders/k3d_parquet_plank2.sl:147:  woodcolor *= (1-plankvary/2 + plankvary * noise (whichplank+0.5));
k3d/share/shaders/k3d_parquet_plank2.sl:149:  Ct = mix (groovecolor, woodcolor, groovy);
k3d/share/shaders/k3d_parquet_tile.sl:2: * DWParquetTile.sl -- yet another surface shader for wood
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:22: *   plankvary - controls how much wood color varies from plank to plank
k3d/share/shaders/k3d_parquet_tile.sl:23: *   grainy - relative graininess (0 = no fine grain)
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:29: * AUTHOR: written by Larry Gritz, the George Washington University
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:39: * last modified 10 Feb 1995 by wave
k3d/share/shaders/k3d_parquet_tile.sl:42: * modified again by Dan Weeks <dan@SpamSucks_mango.sfasu.edu> on 08 Dec 1996
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:69:	       float plankvary = 0.8;
k3d/share/shaders/k3d_parquet_tile.sl:70:	       float grainy = 1, wavy = 0.08; )
k3d/share/shaders/k3d_parquet_tile.sl:81:  float groovy;
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:130:  groovy = w*h;
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:145:       * Multiply the ring pattern by the fine grain
k3d/share/shaders/k3d_parquet_tile.sl:150:	  r2 = grainy * r2*r2 + (1-grainy);
k3d/share/shaders/k3d_parquet_tile.sl:162:  woodcolor *= (1-plankvary/2 + plankvary * noise (whichplank+0.5));
k3d/share/shaders/k3d_parquet_tile.sl:164:  Ct = mix (groovecolor, woodcolor, groovy);
k3d/share/shaders/k3d_planetclouds.sl:2: * planetclouds.sl - surface for a semi-opaque cloud layer to be put on
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: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:22: *   1. The way this shader is typically used is to have two concentric
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: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:38: *      is radically different.
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:50: *    ???? - original texture developed by Ken Musgrave.
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:102:  /* Scale density */
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:18: *   plankvary - controls how much wood color varies from plank to plank
k3d/share/shaders/k3d_plank.sl:19: *   grainy - relative graininess (0 = no fine grain)
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:25: * AUTHOR: Larry Gritz, lg@bmrt.org
k3d/share/shaders/k3d_plank.sl:37:		  0.001; float plankvary = 0.8;
k3d/share/shaders/k3d_plank.sl:38:		  float grainy = 1, wavy = 0.08;)
k3d/share/shaders/k3d_plank.sl:49:  float groovy;
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:100:  groovy = w * h;
k3d/share/shaders/k3d_plank.sl:109:      ttt = tt + whichplank / 28.38 + wavy * noise(8 * ss, tt);
k3d/share/shaders/k3d_plank.sl:117:       * Multiply the ring pattern by the fine grain
k3d/share/shaders/k3d_plank.sl:123:	  r2 = grainy * r2 * r2 + (1 - grainy);
k3d/share/shaders/k3d_plank.sl:138:    (1 - plankvary / 2 + plankvary * (float noise(whichplank + 0.5)));
k3d/share/shaders/k3d_plank.sl:140:  Ct = mix(groovecolor, woodcolor, groovy);
k3d/share/shaders/k3d_plastic.sl:2: * (c) Copyright 1988, Pixar.
k3d/share/shaders/k3d_plastic.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
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_pointlight.sl:2: * (c) Copyright 1988, Pixar.
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: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: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:12:// but WITHOUT ANY WARRANTY; without even the implied warranty of
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:37:	float yfreq = 1.0;
k3d/share/shaders/k3d_projectionmap_plastic.sl:39:	float yoffset = 0.0;
k3d/share/shaders/k3d_projectionmap_plastic.sl:50:			float y = yfreq * (ycomp(Pshad) - yoffset + 0.5);
k3d/share/shaders/k3d_projectionmap_plastic.sl:53:			float tt = mix(t1, t0, y);
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: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:26: *    C language version by F. Kenton Musgrave
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:35: *    ??? - original C language version by Ken Musgrave
k3d/share/shaders/k3d_puffyclouds.sl:36: *    Apr 94 - translation to Shading Language by L. Gritz
k3d/share/shaders/k3d_puffyclouds.sl:48:k3d_puffyclouds (float Ka = 0, Kd = 0;
k3d/share/shaders/k3d_puffyclouds.sl:50:	     color skycolor = color(.15, .15, .6);
k3d/share/shaders/k3d_puffyclouds.sl:73:  Ct = mix (skycolor, cloudcolor, smoothstep (threshold, 1, value));
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:11: * for specific geometry, but can very easily be adjusted to fit any
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: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:24: * email me your praises, notification of my credits in big motion
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:51:	float label = 0;          /* Non-uniformity param.         */
k3d/share/shaders/k3d_redapple.sl:55:	float txtscale = .05;     /* Ugly kludge (see above...)    */
k3d/share/shaders/k3d_redapple.sl:90:	 * and patches of finely speckled red and green. These
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:131:	 * The blotch color is finally determined by mixing,
k3d/share/shaders/k3d_redapple.sl:133:	 * section sets that coefficient, using a funky yet
k3d/share/shaders/k3d_redapple.sl:134:	 * really simple noise routine.
k3d/share/shaders/k3d_redapple.sl:153:	 * The apple has brown speckles on it, set by mixing
k3d/share/shaders/k3d_redapple.sl:155:	 * specks are very dot-like in nature, and this
k3d/share/shaders/k3d_redapple.sl:167:	 * attached, and where the wierd bit at the very bottom
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:191:	 * also dented a bit (alas, no real apples are perfectly
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:220:		reflect = RayTrace(P, Rdir, 0, 1, 1);
k3d/share/shaders/k3d_redapple.sl:230:	 * Combine everything to get Ci, in the standard form.
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: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:35:          		exponent = pow( lacunarity, (-i*H) );

k3d/share/shaders/k3d_ridged_multifractal.sl:37:          		PP.x *= lacunarity;

k3d/share/shaders/k3d_ridged_multifractal.sl:38:          		PP.y *= lacunarity;

k3d/share/shaders/k3d_ridged_multifractal.sl:39:          		PP.z *= lacunarity;

k3d/share/shaders/k3d_ridged_multifractal.sl:41:			PP = PP * lacunarity;

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

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_roughmetal.sl:12: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_round.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_round.sl:21:	   u and in v, and the directions away from those edges. */
k3d/share/shaders/k3d_round.sl:41:	if (lu < radius || lv < radius) {	/* only if within radius of 
k3d/share/shaders/k3d_round.sl:45:	 *  moved. This center is on the center line of a cylinder, if we 
k3d/share/shaders/k3d_rubber.sl:1:/* Copyrighted Pixar 1989 */
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:17: * AUTHOR: written by Emil Mikulic
k3d/share/shaders/k3d_ruledpaper.sl:25: * last modified 15 Nov 1997 by Emil Mikulic
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:30: *   (initcode) instead of being re-calced for every sample.
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:36: *   The paper shader works for A4 pieces of paper, so remeber to make your
k3d/share/shaders/k3d_ruledpaper.sl:48:	/* Paper anatomy settings */
k3d/share/shaders/k3d_ruledpaper.sl:54: 		shiny=1.25/pw,
k3d/share/shaders/k3d_ruledpaper.sl:68:	// Circle center along page (ss coordinate system)
k3d/share/shaders/k3d_ruledpaper.sl:70:	// Circle radius in ss/tt coord. system
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:79:// becomes black and the opacity becomes 0.
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:107:	// Figure out where in the lining we are and draw accordingly
k3d/share/shaders/k3d_ruledpaper.sl:117:		// accurate, aspecty circles.
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_rustymetal.sl:2: * rustymetal.sl -- metal with specks of rust
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:15: *   rusty - 0=no rust, larger for more rust, 1=completely rusty
k3d/share/shaders/k3d_rustymetal.sl:16: *   rustbump - controls the "bumpiness" of the rusty areas.
k3d/share/shaders/k3d_rustymetal.sl:23: * AUTHOR: Larry Gritz, gritz@SpamSucks_seas.gwu.edu
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:48:	    float rusty = 0.2;
k3d/share/shaders/k3d_rustymetal.sl:53:  point Nrust;                 /* perturbed normal for the rusty areas */
k3d/share/shaders/k3d_rustymetal.sl:57:  float rustiness;             /* Result: how rusty is this point? */
k3d/share/shaders/k3d_rustymetal.sl:61:   * number of octaves by the estimated change in PP between adjacent
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:77:  rustiness = step (1-rusty, clamp (sum,0,1));
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:88:  /* If we have any metal, calculate the color of the metal, using the
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:18: *               terrain type by latitude
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: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:39: * last modified 23 May 1995 by Tal
k3d/share/shaders/k3d_saturn.sl:60:   * Step 2: Assign a climite type, roughly by latitude.
k3d/share/shaders/k3d_saturn.sl:63:  /* make climate symmetric about equator */
k3d/share/shaders/k3d_saturnring.sl:6: * varing colors and transparency.
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:16: *  otherwise then they will neeb to be changed.
k3d/share/shaders/k3d_saturnring.sl:21: * History:
k3d/share/shaders/k3d_saturnring.sl:31:/* Grabbed from one of Larry Gritz's many shaders */
k3d/share/shaders/k3d_saturnring.sl:40:	cutoff = 0.55, ringrad = 1.0, opacity = 0.5;)
k3d/share/shaders/k3d_saturnring.sl:47:	float oi = 0.0; /* Opacity 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:68:		/* Create rings of varing transparency */
k3d/share/shaders/k3d_saturnring.sl:77:		/* Create some gaps of completely transparent rings */
k3d/share/shaders/k3d_saturnring.sl:89:			cs = dgrey;
k3d/share/shaders/k3d_saturnring.sl:96:			cs = dyellow;	
k3d/share/shaders/k3d_scartissue.sl:1:/*  IDscartissue.sl written by Ivan DeWolf
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_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:19: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_screen.sl:26:		   float density = 0.25, frequency = 20;)
k3d/share/shaders/k3d_screen.sl:30:  if(mod(s * frequency, 1) < density || mod(t * frequency, 1) < density)
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: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:15: * AUTHOR: written by Larry Gritz
k3d/share/shaders/k3d_screen_aa.sl:17: * last modified  31 Jan 1994 by Larry Gritz
k3d/share/shaders/k3d_screen_aa.sl:21: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_screen_aa.sl:32:		      float density = 0.25, frequency = 20;)
k3d/share/shaders/k3d_screen_aa.sl:36:  float d;			/* Density at the sample point */
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:49:  ss = mod(frequency * s, 1);
k3d/share/shaders/k3d_screen_aa.sl:50:  tt = mod(frequency * t, 1);
k3d/share/shaders/k3d_screen_aa.sl:53:  GWF = density * 0.5;
k3d/share/shaders/k3d_sdixon.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_sdixon.sl:6: * sdixon(): Paint the body of a pencil.
k3d/share/shaders/k3d_sdixon.sl:15:		yellow 		= color(.56, .23, 0);
k3d/share/shaders/k3d_sdixon.sl:23:	/* This shader uses a single-channel texture map to apply a 
k3d/share/shaders/k3d_sdixon.sl:24:	 *   metallic-green ink to a matte-yellow background. */
k3d/share/shaders/k3d_sdixon.sl:29: 	/* Use ink to mix yellow and green */
k3d/share/shaders/k3d_sdixon.sl:30:	cout = mix(yellow, green, ink); 					 
k3d/share/shaders/k3d_shadowdistant_rim.sl:5:    float  intensity=1 ;
k3d/share/shaders/k3d_shadowdistant_rim.sl:18:        Cl = intensity * lightcolor;
k3d/share/shaders/k3d_shadowspot.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_shadowspot.sl:9:	float intensity	= 1;
k3d/share/shaders/k3d_shadowspot.sl:28:		cosangle = L.A / length(L);	/* A is already normalized */
k3d/share/shaders/k3d_shadowspot.sl:33:		Cl = attenuation * intensity * lightcolor;
k3d/share/shaders/k3d_shifteddrtile.sl:20: *	The center varible should really be placed in the parameter list 
k3d/share/shaders/k3d_shifteddrtile.sl:30: * History:
k3d/share/shaders/k3d_shifteddrtile.sl:63:	float mix_opacity; /* How much to mix between the surfaces */
k3d/share/shaders/k3d_shifteddrtile.sl:72:	center = (0.5, 0.5, 0);  /* This should really be */
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:96:	surfColor = mix (surfColor, cstate1, mix_opacity);
k3d/share/shaders/k3d_shiftedmoontile.sl:19: *	Really should move center to the paramter list so both centers 
k3d/share/shaders/k3d_shiftedmoontile.sl:25: * History:
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:84:	mix_opacity = difference (circle1, circle2);
k3d/share/shaders/k3d_shiftedmoontile.sl:85:	surfColor = mix (surfColor, cstate1, mix_opacity);
k3d/share/shaders/k3d_shiny.sl:2: * shiny.sl -- Shiny metal surface
k3d/share/shaders/k3d_shiny.sl:7: *    blur - how blurry are the reflections? (0 = perfectly sharp)
k3d/share/shaders/k3d_shiny.sl:9: *    rayjitter, raysamples - ray tracing controls for reflection
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: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: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_shinyplastic.sl:2: * shinyplastic.sl -- Shiny plastic surface
k3d/share/shaders/k3d_shinyplastic.sl:7: *    blur - how blurry are the reflections? (0 = perfectly sharp)
k3d/share/shaders/k3d_shinyplastic.sl:10: *    rayjitter, raysamples - ray tracing controls for reflection
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: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_skin1.sl:4: * Copyright (C) 2002, Rudy Cortes   rcortes@hntb.com
k3d/share/shaders/k3d_skin1.sl:8: * without express or implied warranty. 
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:22: * blemishfreq, blemishthresh,blemhishopac = control the freqency, threshold and opacity
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: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:35: * NOTE- you must copy the entire subsurface skin function to your
k3d/share/shaders/k3d_skin1.sl:38: * Enjoy!!
k3d/share/shaders/k3d_skin1.sl:40: * Modification history:
k3d/share/shaders/k3d_skin1.sl:42: *     Renamed RudyCSkin for RMR.
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:68:    vector Y = (N ^ xdir) / yroughness;
k3d/share/shaders/k3d_skin1.sl:88:    return C / (4 * xroughness * yroughness);
k3d/share/shaders/k3d_skin1.sl:97: * "Reflection from layered surfaces due to subsurface scattering", 
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:112:   directions wi and wo, surface normal n, asymmetry value g (see above),
k3d/share/shaders/k3d_skin1.sl:113:   scattering albedo (between 0 and 1 for physically-valid volumes),
k3d/share/shaders/k3d_skin1.sl:135:   color for an oily surface sheen.
k3d/share/shaders/k3d_skin1.sl:182:  varying vector xdir = dPdu;
k3d/share/shaders/k3d_skin1.sl:184:  float oily = 1.5;
k3d/share/shaders/k3d_skin1.sl:187:        yroughness = .5;
k3d/share/shaders/k3d_skin1.sl:206:  float oilVal = oily;
k3d/share/shaders/k3d_skin1.sl:209:  /*--- layer 1 - add pores to the skin*/
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:235:  /* layer 2 - create small skin blemishes over the skin. Use a map to control
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:276:  if (oily > 0.01){
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:7: * without express or implied warranty. 
k3d/share/shaders/k3d_skin2.sl:12: * "Reflection from layered surfaces due to subsurface scattering", 
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:31:   directions wi and wo, surface normal n, asymmetry value g (see above),
k3d/share/shaders/k3d_skin2.sl:32:   scattering albedo (between 0 and 1 for physically-valid volumes),
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:90:   reasonably well for Caucasian skin.
k3d/share/shaders/k3d_skymetal.sl:1:/* skymetal shader 
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:10: * anyways.
k3d/share/shaders/k3d_skymetal.sl:15:surface k3d_skymetal (
k3d/share/shaders/k3d_skymetal.sl:19:             /* actually should be vector and vtransform if using 3.5 or 
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:38:		refl = mix (sky_horiz, sky_zenith, costheta);
k3d/share/shaders/k3d_slateroof.sl:8:	before it reaches the wall which supposedly supports it! The shader
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: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:40:	calculations in this shader. Renderdc, however, does not yet support
k3d/share/shaders/k3d_slateroof.sl:55:							maxcolorvary = .2,
k3d/share/shaders/k3d_slateroof.sl:63:                 offset = swidth / 2,		/* the amount by which alternate rows are offset */
k3d/share/shaders/k3d_slateroof.sl:66:	float stile, ttile, 							/* An integer identifying the current tile */
k3d/share/shaders/k3d_slateroof.sl:68:			newstile, newscoord, 				/* Used in calculations to identify an overlapping tile */
k3d/share/shaders/k3d_slateroof.sl:77:   color 	Ct = 0;								/* A temporary color variable */
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:79:				newcolorvary, ocolorvary, ns;
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:112:	ocolorvary = (noise(cs * colorfactor, ct * colorfactor) - 1) * 2 * maxcolorvary;
k3d/share/shaders/k3d_slateroof.sl:113:	colorvary = ocolorvary;
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:154:			newcolorvary =  (noise(cs * colorfactor, ct * colorfactor) - 1) * 2 * maxcolorvary;
k3d/share/shaders/k3d_slateroof.sl:156:				/* if t_offset <= newadd we are actually in the overlapping tile */
k3d/share/shaders/k3d_slateroof.sl:164:					colorvary = newcolorvary; 
k3d/share/shaders/k3d_slateroof.sl:181:		colorvary = ocolorvary;
k3d/share/shaders/k3d_slateroof.sl:182:	/*printf("#dispo = %f, disp = %f, colorvary = %f\n",dispo,disp,colorvary); */
k3d/share/shaders/k3d_slateroof.sl:191:	Ct = Ct * (1 + colorvary);
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: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:31:		the bottom of the tile, gaps to either side and the whole tile gently
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:56:                 offset = swidth / 2;		/* the amount by which alternate rows are offset */
k3d/share/shaders/k3d_slateroofd.sl:58:   float stile, ttile, 							/* An integer identifying the current tile */
k3d/share/shaders/k3d_slateroofd.sl:60:			newstile, newscoord, 				/* Used in calculations to identify an overlapping tile */
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:103: 		/* the very bottom row cannot expand */
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:147:			/* if t_offset <= newadd we are actually in the overlapping tile */
k3d/share/shaders/k3d_slideprojector.sl:1:light k3d_slideprojector(float intensity = 2000;
k3d/share/shaders/k3d_slideprojector.sl:50:    Cl = attenuation * intensity * lightcolor * Ct;
k3d/share/shaders/k3d_smoke.sl:9: *   opacdensity - overall smoke density control as it affects its ability
k3d/share/shaders/k3d_smoke.sl:11: *   lightdensity - smoke density control as it affects light scattering
k3d/share/shaders/k3d_smoke.sl:13: *   integstart, integend - bounds along the viewing ray direction of the
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:22: * Author: Larry Gritz
k3d/share/shaders/k3d_smoke.sl:32: * compute the smoke density at that point.  Only count lights tagged
k3d/share/shaders/k3d_smoke.sl:35:void smokedensity(point Pcur, Pshad;
k3d/share/shaders/k3d_smoke.sl:36:		  uniform float smokevary, smokefreq, smokeoctaves;
k3d/share/shaders/k3d_smoke.sl:49:  if(smokeoctaves > 0 && smokevary > 0)
k3d/share/shaders/k3d_smoke.sl:54:      /* Optimize: one octave only if not lit */
k3d/share/shaders/k3d_smoke.sl:58:      smoke = smoothstep(-1, 1, smokevary * smoke);
k3d/share/shaders/k3d_smoke.sl:68:/* Return a component-by-component exp() of a color */
k3d/share/shaders/k3d_smoke.sl:77:volume k3d_smoke(float opacdensity = 1, lightdensity = 1;
k3d/share/shaders/k3d_smoke.sl:80:		 color scatter = 1;	/* for sky, try (1, 2.25, 21) */
k3d/share/shaders/k3d_smoke.sl:81:		 float smokeoctaves = 0, smokefreq = 1, smokevary = 1;)
k3d/share/shaders/k3d_smoke.sl:83:  point Worigin = P - I;	/* Origin of volume ray */
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:99:  smokedensity(Worigin + d * WIN, origin + d * IN, smokevary, smokefreq,
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:105:      /* Take a step and get the local scattered light and smoke density */
k3d/share/shaders/k3d_smoke.sl:108:      smokedensity(Worigin + d * WIN, origin + d * IN, smokevary, smokefreq,
k3d/share/shaders/k3d_smoke.sl:112:       * the portion of the volume covered by this step.
k3d/share/shaders/k3d_smoke.sl:114:      float tau = opacdensity * ss / 2 * (dtau + last_dtau);
k3d/share/shaders/k3d_smoke.sl:116:	lightdensity * ss / 2 * (li * dtau + last_li * last_dtau);
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_smoke2.sl:2: * TLSmoke.sl -- This is really Larry's noisysmoke.sl.  I only took out the
k3d/share/shaders/k3d_smoke2.sl:3: * random() as it made my animation look to funky -- tal 9/4/96
k3d/share/shaders/k3d_smoke2.sl:10: *   density - overall smoke density control
k3d/share/shaders/k3d_smoke2.sl:11: *   integstart, integend - bounds along the viewing ray direction of the
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:21: * Author: Larry Gritz
k3d/share/shaders/k3d_smoke2.sl:23: * History:
k3d/share/shaders/k3d_smoke2.sl:30: * * Moved scripts & shaders to the share directory
k3d/share/shaders/k3d_smoke2.sl:39: * Compute only one octave of noise when not lit (big speedup)
k3d/share/shaders/k3d_smoke2.sl:59:             /* Optimize: one octave only if not lit */                     \
k3d/share/shaders/k3d_smoke2.sl:67:             g = density * smoothstep(-1,1,smokevary*smoke);                \
k3d/share/shaders/k3d_smoke2.sl:68:         } else g = density;                                                \
k3d/share/shaders/k3d_smoke2.sl:77:k3d_smoke2 (float density = 60;
k3d/share/shaders/k3d_smoke2.sl:83:	    color scatter = 1;   /* for sky, try (1, 2.25, 21) */
k3d/share/shaders/k3d_smoke2.sl:84:	    float octaves = 3, freq = 1, smokevary = 1;
k3d/share/shaders/k3d_smoke2.sl:98:  color Cv = 0, Ov = 0;           /* net color & opacity of volume */
k3d/share/shaders/k3d_smoke2.sl:99:  color dC, dO;                   /* differential color & opacity */
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:147:  /* Ci & Oi are the color (premultiplied by opacity) and opacity of 
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_softboxes.sl:36:#define OBEY_THIS "Reflectivity"
k3d/share/shaders/k3d_softboxes.sl:49:/*   - point Q on the x-y plane						***/
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: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:66:    varying float result;
k3d/share/shaders/k3d_softboxes.sl:67:    varying float x = abs(xcomp(Q)), y = abs(ycomp(Q));
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:73:	varying float re = 2/roundness;		/* roundness exponent */
k3d/share/shaders/k3d_softboxes.sl:74:	varying float q = a * b * pow (pow(b*x, re) + pow(a*y, re), -1/re);
k3d/share/shaders/k3d_softboxes.sl:75:	varying float r = A * B * pow (pow(B*x, re) + pow(A*y, re), -1/re);
k3d/share/shaders/k3d_softboxes.sl:86:    varying point	surfPt;
k3d/share/shaders/k3d_softboxes.sl:87:    varying vector	reflVect;
k3d/share/shaders/k3d_softboxes.sl:100:    uniform float	decayExp;
k3d/share/shaders/k3d_softboxes.sl:105:    uniform string filtTypes[4] = {"gaussian","box","radial-bspline","disk"};
k3d/share/shaders/k3d_softboxes.sl:106:    uniform string theFilterName = filtTypes[clamp(boxFilter,0,3)];
k3d/share/shaders/k3d_softboxes.sl:107:    varying float contrib;
k3d/share/shaders/k3d_softboxes.sl:108:    varying color ct = 1;
k3d/share/shaders/k3d_softboxes.sl:109:    varying float ot = 1; 
k3d/share/shaders/k3d_softboxes.sl:111:    varying point Pb1 = transform (boxCoords, surfPt);
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: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:165:    varying point ppC = transform(boxCoords,"world",Pplane);
k3d/share/shaders/k3d_softboxes.sl:166:    varying point spw = transform("world",surfPt);
k3d/share/shaders/k3d_softboxes.sl:167:    varying float pDist = length(ppC - spw); /* in "world" coords */
k3d/share/shaders/k3d_softboxes.sl:170:    theColor = contrib * ct * boxColor / pow(pDist,decayExp);	/* premultiplied!!!!! */
k3d/share/shaders/k3d_softboxes.sl:179:    varying point	thePoint;
k3d/share/shaders/k3d_softboxes.sl:185:    uniform string filtTypes[2] = {"box", "gaussian"};
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:209:    float	intensity	= 1;
k3d/share/shaders/k3d_softboxes.sl:211:    float	decayRate	= 0;
k3d/share/shaders/k3d_softboxes.sl:218:    color	boxColor1	= color (1,1,1),	/* multiplied by lightcolor&intensity */
k3d/share/shaders/k3d_softboxes.sl:219:		boxOpacity1	= color (1,1,1);
k3d/share/shaders/k3d_softboxes.sl:230:    color	boxColor2	= color (1,1,1),	/* multiplied by lightcolor&intensity */
k3d/share/shaders/k3d_softboxes.sl:231:		boxOpacity2	= color (1,1,1);
k3d/share/shaders/k3d_softboxes.sl:242:    color	boxColor3	= color (1,1,1),	/* multiplied by lightcolor&intensity */
k3d/share/shaders/k3d_softboxes.sl:243:		boxOpacity3	= color (1,1,1);
k3d/share/shaders/k3d_softboxes.sl:254:    color	boxColor4	= color (1,1,1),	/* multiplied by lightcolor&intensity */
k3d/share/shaders/k3d_softboxes.sl:255:		boxOpacity4	= color (1,1,1);
k3d/share/shaders/k3d_softboxes.sl:266:    uniform float	EnvType = CLASSIC;
k3d/share/shaders/k3d_softboxes.sl:267:    uniform float	MapType = CUBEFACE;
k3d/share/shaders/k3d_softboxes.sl:268:    uniform float envTexIntensity	= 1;
k3d/share/shaders/k3d_softboxes.sl:274:    float shadowintensity = 1;
k3d/share/shaders/k3d_softboxes.sl:297:    BOOL	ObeyMateria	= 0;
k3d/share/shaders/k3d_softboxes.sl:299:    output varying float __nondiffuse = 1;
k3d/share/shaders/k3d_softboxes.sl:300:    output varying float __nonspecular = 0;
k3d/share/shaders/k3d_softboxes.sl:301:    string	__category = "reflection";
k3d/share/shaders/k3d_softboxes.sl:302:    output varying float __inShadow = 0;	   
k3d/share/shaders/k3d_softboxes.sl:305:    uniform string filtTypes[4] = {"gaussian","box","radial-bspline","disk"};
k3d/share/shaders/k3d_softboxes.sl:306:    uniform string theFilterName = filtTypes[clamp(envTexFilter,0,3)];
k3d/share/shaders/k3d_softboxes.sl:323:    uniform float adjIntensity = pow(adjMeterDistance,decayRate)*intensity;
k3d/share/shaders/k3d_softboxes.sl:324:    varying float fullShad = 0;
k3d/share/shaders/k3d_softboxes.sl:331:    if (ObeyMateria > 0) {
k3d/share/shaders/k3d_softboxes.sl:332:	if (surface("Reflectivity",materiaRefl) == 0) {
k3d/share/shaders/k3d_softboxes.sl:333:	    if (surface("abReflectivity",materiaRefl) == 0) {
k3d/share/shaders/k3d_softboxes.sl:334:		if (surface("reflectivity",materiaRefl) == 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:357:	    varying float sortedDist[4];
k3d/share/shaders/k3d_softboxes.sl:358:	    varying color sortedOpac[4];
k3d/share/shaders/k3d_softboxes.sl:359:	    varying color sortedColor[4];
k3d/share/shaders/k3d_softboxes.sl:365:		    boxRoundness1,boxColor1,boxOpacity1,decayRate,
k3d/share/shaders/k3d_softboxes.sl:377:		    boxRoundness2,boxColor2,boxOpacity2,decayRate,
k3d/share/shaders/k3d_softboxes.sl:389:		    boxRoundness3,boxColor3,boxOpacity3,decayRate,
k3d/share/shaders/k3d_softboxes.sl:401:		    boxRoundness4,boxColor4,boxOpacity4,decayRate,
k3d/share/shaders/k3d_softboxes.sl:410:		varying vector Rs = normalize (vtransform (theEnvSpace, normalize(-L)));
k3d/share/shaders/k3d_softboxes.sl:411:		if (EnvType == SPHERICAL) {
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:418:		if( MapType == LATLONG ) {	/* latlong */
k3d/share/shaders/k3d_softboxes.sl:419:		    Rs = vector (-zcomp (Rs), xcomp (Rs), ycomp (Rs));
k3d/share/shaders/k3d_softboxes.sl:427:		Cl *= envTexIntensity;
k3d/share/shaders/k3d_softboxes.sl:454:	    /* Apply shadow mapped shadows */
k3d/share/shaders/k3d_softboxes.sl:455:	    varying vector Ln = normalize(L);
k3d/share/shaders/k3d_softboxes.sl:456:	    varying vector Nn = normalize(N);
k3d/share/shaders/k3d_softboxes.sl:457:	    varying vector In = normalize(I);
k3d/share/shaders/k3d_softboxes.sl:465:	    varying float shadowed;
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: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:27: *  tal 3/2/97  -- Cleaned up code, removed many constants, added comments
k3d/share/shaders/k3d_spacecloud.sl:28: *  tal 2/23/97 -- Originally tried using fBm to create turbulence.  But
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:37:#define snoise2(x, y) (2 * noise(x, y) - 1)
k3d/share/shaders/k3d_spacecloud.sl:39:#define adjustNoise2(x, y, minVal, maxVal) \
k3d/share/shaders/k3d_spacecloud.sl:40:	snoise2 (x,y) * ((maxVal)-(minVal)+(minVal))
k3d/share/shaders/k3d_spacecloud.sl:55:  float maxOpacity = .4;
k3d/share/shaders/k3d_spacecloud.sl:80:	/* Old way */
k3d/share/shaders/k3d_spacecloud.sl:95:	Oi *= maxOpacity;
k3d/share/shaders/k3d_spaceshiphull1.sl:23:	float lumavary = .4;
k3d/share/shaders/k3d_spaceshiphull1.sl:24:	float rowvary = 3.0;
k3d/share/shaders/k3d_spaceshiphull1.sl:38:  ss += rowvary * noise(tplate + 0.3);
k3d/share/shaders/k3d_spaceshiphull1.sl:42:  platecolor = Cs - (lumavary * float noise(splate + 0.4, tplate + 0.5));
k3d/share/shaders/k3d_spotlight.sl:2: * (c) Copyright 1988, Pixar.
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: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: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:12:// but WITHOUT ANY WARRANTY; without even the implied warranty of
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:24:/// Filtering code courtesy of the Advanced RenderMan book ... where else?
k3d/share/shaders/k3d_square_ridges.sl:59:	float Frequency = 8.0;
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_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:18:   by Rob Bredow and Scott Stokdyk 
k3d/share/shaders/k3d_srfdeformation.sl:22:fnc_mydiffuse (color Cl; 
k3d/share/shaders/k3d_srfdeformation.sl:42:    Y = ycomp(Pndc);
k3d/share/shaders/k3d_srfdeformation.sl:56:    varying point Pref = point "shader" (0,0,0);
k3d/share/shaders/k3d_srfdeformation.sl:59:    float x, y;
k3d/share/shaders/k3d_srfdeformation.sl:66:    fnc_projectCurrentCamera(Pref, x, y);
k3d/share/shaders/k3d_srfdeformation.sl:69:	Ci0 = texture(texname, x, y);
k3d/share/shaders/k3d_srfdeformation.sl:86:	Ci1 += Kd * fnc_mydiffuse(Cl,L,N1);
k3d/share/shaders/k3d_srfdeformation.sl:90:	Ci2 += Kd * fnc_mydiffuse(Cl,L,N2);
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_starfield.sl:8:	AUTHOR: written by Timothy M. Shead
k3d/share/shaders/k3d_starfield.sl:11:surface k3d_starfield(float intensity = 2.0; float frequency = 0.1; float size = 0.3; float irregularity = 2.0)
k3d/share/shaders/k3d_starfield.sl:14:	point PP = transform("object", frequency * P);
k3d/share/shaders/k3d_starfield.sl:17:	point star_center = point(0.5 * (floor(xcomp(PP)) + ceil(xcomp(PP))), 0.5 * (floor(ycomp(PP)) + ceil(ycomp(PP))), 0.5 * (floor(zcomp(PP)) + ceil(zcomp(PP))));
k3d/share/shaders/k3d_starfield.sl:19:	star_center += irregularity * (point noise(star_center) - point(0.5, 0.5, 0.5));
k3d/share/shaders/k3d_starfield.sl:27:	float star_intensity = float cellnoise(star_center);
k3d/share/shaders/k3d_starfield.sl:29:	Ci = intensity * star_intensity * inside_star * inside_star;
k3d/share/shaders/k3d_stones.sl:3: * RudyCstones.sl
k3d/share/shaders/k3d_stones.sl:5: * Copyright (C) 2002, Rudy Cortes   rcortes@hntb.com
k3d/share/shaders/k3d_stones.sl:9: * without express or implied warranty.
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: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:25: * grungefreq, grunge_Pow, grunginess = freqeuncy, power and depth of grunge
k3d/share/shaders/k3d_stones.sl:27: * varyhue, varysat,varylum  = how much will the color change?
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:41:#define rotate2d(x,y,rad,ox,oy,rx,ry) \
k3d/share/shaders/k3d_stones.sl:42:  rx = ((x) - (ox)) * cos(rad) - ((y) - (oy)) * sin(rad) + (ox); \
k3d/share/shaders/k3d_stones.sl:43:  ry = ((x) - (ox)) * sin(rad) + ((y) - (oy)) * cos(rad) + (oy)
k3d/share/shaders/k3d_stones.sl:50:#define snoise2(x,y) (noise(x,y) * 2 - 1)
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:59: * are all independently controlled.  Hue adds, but saturation and
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: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:70:    s *= 1 - varysat * (cellnoise(index-14)-0.5);
k3d/share/shaders/k3d_stones.sl:71:    v *= 1 - varyval * (cellnoise(index+37)-0.5);
k3d/share/shaders/k3d_stones.sl:93:   float varyhue = .03, varysat = .2, varylum = .25;)
k3d/share/shaders/k3d_stones.sl:96: color surface_color, layer_color;
k3d/share/shaders/k3d_stones.sl:97: float layer_opac;
k3d/share/shaders/k3d_stones.sl:102: float cx,cy;
k3d/share/shaders/k3d_stones.sl:112: /*loop for creating color layers of rocks*/
k3d/share/shaders/k3d_stones.sl:117:   rotate2d(s,t,angle,0.5,0.5,cx,cy);    /*randomize rotations*/
k3d/share/shaders/k3d_stones.sl:121:   tt = repeat(cy,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:133:   cy = 0.5 + 0.1 * snoise2( 28.398, 62.112); */
k3d/share/shaders/k3d_stones.sl:135:   cy = 0.5 + 0.1 * snoise2( freq * 28.398, freq * 42.112);
k3d/share/shaders/k3d_stones.sl:136:   point p1 =(cx,cy,0);
k3d/share/shaders/k3d_stones.sl:143:   layer_opac = clamp( mag,0,1);
k3d/share/shaders/k3d_stones.sl:145:   layer_color = varyEach(stonecolor, stoneindex,varyhue,varysat,varylum);
k3d/share/shaders/k3d_stones.sl:146:   surface_color = mix(surface_color,layer_color,layer_opac);
k3d/share/shaders/k3d_stones.sl:156:   /*apply if grunginess != 0 */
k3d/share/shaders/k3d_strata.sl:2: * strata.sl -- surface shader for sedimentary rock strata
k3d/share/shaders/k3d_strata.sl:5: *    Makes sedimentary rock strata, useful for rendering landscapes.
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:20: *    C language version by F. Kenton Musgrave
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:29: *    ??? - original C language version by Ken Musgrave
k3d/share/shaders/k3d_strata.sl:30: *    Apr 94 - translation to Shading Language by L. Gritz
k3d/share/shaders/k3d_strata.sl:38:		   float yscale = 2; float turbscale = 0.1; float offset = 0;
k3d/share/shaders/k3d_strata.sl:57:  cmap = yscale * ycomp(PP) + turbscale * turb - offset;
k3d/share/shaders/k3d_strata.sl:82:  /* Shade like matte, but with color scaled by cloudcolor and opacity */
k3d/share/shaders/k3d_stucco.sl:10: *   frequency  	the frequency of the pimples
k3d/share/shaders/k3d_stucco.sl:13: * AUTHOR: written by Larry Gritz (lg@bmrt.org)
k3d/share/shaders/k3d_stucco.sl:17:displacement k3d_stucco(float Km = 0.05, power = 5, frequency = 10;)
k3d/share/shaders/k3d_stucco.sl:23:  magnitude = Km * pow(noise(PP * frequency), power);
k3d/share/shaders/k3d_superkagee.sl:15:    varying point       thePoint;
k3d/share/shaders/k3d_superkagee.sl:21:    uniform string filtTypes[2] = {"box", "gaussian"};
k3d/share/shaders/k3d_superkagee.sl:22:    uniform string theFilterName = filtTypes[clamp(theFilt,0,1)];
k3d/share/shaders/k3d_superkagee.sl:46:                        shadowdensitya = 1;
k3d/share/shaders/k3d_superkagee.sl:53:                        shadowdensityb = 1;
k3d/share/shaders/k3d_superkagee.sl:60:                        shadowdensityc = 1;
k3d/share/shaders/k3d_superkagee.sl:67:                        shadowdensityd = 1;
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:77:        shadowed = clamp(shadowdensitya,0,1) * do_shadow6(shadownamea,P,
k3d/share/shaders/k3d_superkagee.sl:84:        shadowed = clamp(shadowdensityb,0,1) * do_shadow6(shadownameb,P,
k3d/share/shaders/k3d_superkagee.sl:91:        shadowed = clamp(shadowdensityc,0,1) * do_shadow6(shadownamec,P,
k3d/share/shaders/k3d_superkagee.sl:98:        shadowed = clamp(shadowdensityd,0,1) * do_shadow6(shadownamed,P,
k3d/share/shaders/k3d_superplank.sl:26: *   plankvary - controls how much wood color varies from plank to plank
k3d/share/shaders/k3d_superplank.sl:29: *   wavy - relative wavyness of the ring pattern
k3d/share/shaders/k3d_superplank.sl:30: *   grainy - relative graininess (0 = no fine grain)
k3d/share/shaders/k3d_superplank.sl:33: *   varnishbumpfreq - frequency 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:39: * Author: written by Larry Gritz
k3d/share/shaders/k3d_superplank.sl:64:			/* Plank layout */
k3d/share/shaders/k3d_superplank.sl:73:			float plankvary = 0.8;	/* Wood color variation plank-to-plank */
k3d/share/shaders/k3d_superplank.sl:77:			float wavy = 0.08;	/* Larger makes rings more wavy */
k3d/share/shaders/k3d_superplank.sl:78:			float grainy = 1;	/* Relative graininess */
k3d/share/shaders/k3d_superplank.sl:95:  float groovy;			/* 0 in groove, 1 in woody part */
k3d/share/shaders/k3d_superplank.sl:107:  vector R, T_dummy;		/* Refl (and tummy transmit) from fresnel */
k3d/share/shaders/k3d_superplank.sl:135:   * strictly tied to the scale of the object.
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:184:   * antialiasing by trying to box filter the edges of the grooves.
k3d/share/shaders/k3d_superplank.sl:200:  groovy = w * h;
k3d/share/shaders/k3d_superplank.sl:203:   * 3. Ring and grain patterns, color and specularity adjustment.
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:206:   * interact subtly.
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:234:	  r2 = grainy * r2 * r2 + (1 - grainy);
k3d/share/shaders/k3d_superplank.sl:251:    1 - plankvary / 2 + plankvary * float cellnoise(whichplank, whichrow);
k3d/share/shaders/k3d_superplank.sl:255:  Ct = mix(groovecolor, woodcolor, groovy);
k3d/share/shaders/k3d_superplank.sl:257:  adjustedKs = Ks * (1 + .2 * ring) * (1 + .3 * grain) * groovy;
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:291:   * Have some subtle interaction between grain and specularity.
k3d/share/shaders/k3d_superplank.sl:297:  fresnel(IN, Nf, 1 / eta, fresnelKr, fresnelKt, R, T_dummy);
k3d/share/shaders/k3d_superplank.sl:316:  /* Only compute reflections if Kr > 0 */
k3d/share/shaders/k3d_superplank.sl:324:						1 - ycomp(Pndc));
k3d/share/shaders/k3d_superplank.sl:330:  /* Scale by opacity */
k3d/share/shaders/k3d_superpplastic.sl:2: * (c) Copyright 1988, Pixar.
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:18:/* Modified to support filter type and aize, amount of image blur, nuber samples
k3d/share/shaders/k3d_superpplastic.sl:19:along S and T, fidelty and number of samples by Giueppe Zompatori joesunny@tiscalinet.it*/
k3d/share/shaders/k3d_superpplastic.sl:23:			  float filtertype = 1; float blur = 0.0;
k3d/share/shaders/k3d_superpplastic.sl:24:			  float fidelity = 1; float samples = 1;
k3d/share/shaders/k3d_superpplastic.sl:32:  if(filtertype == 1)
k3d/share/shaders/k3d_superpplastic.sl:34:  if(filtertype == 2);
k3d/share/shaders/k3d_superpplastic.sl:36:  if(filtertype == 3);
k3d/share/shaders/k3d_superpplastic.sl:38:  if(filtertype == 4)
k3d/share/shaders/k3d_superpplastic.sl:40:  if(filtertype == 5)
k3d/share/shaders/k3d_superpplastic.sl:47:      color texture(texturename, s, t, "filter", filter, "fidelity", fidelity,
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: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:17: *                named coordinate system.
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:44:			/* opacity */
k3d/share/shaders/k3d_supertexmap.sl:51:			/* specularity */
k3d/share/shaders/k3d_supertexmap.sl:69:   * by maps.
k3d/share/shaders/k3d_supertexmap.sl:78:      ApplyColorTextureOver(Ct, Csmapname, Csproj, P, Csspace,
k3d/share/shaders/k3d_supertexmap.sl:79:			    array_to_mx(Csmx), Csblur);
k3d/share/shaders/k3d_supertexmap.sl:81:  /* Opacity mapping */
k3d/share/shaders/k3d_supertexmap.sl:84:      ApplyColorTextureOver(Ct, Osmapname, Osproj, P, Osspace,
k3d/share/shaders/k3d_supertexmap.sl:85:			    array_to_mx(Osmx), Osblur);
k3d/share/shaders/k3d_supertexmap.sl:87:  /* specularity mapping */
k3d/share/shaders/k3d_supertexmap.sl:90:      ApplyFloatTextureOver(Ks, Ksmapname, Ksproj, P, Ksspace,
k3d/share/shaders/k3d_supertexmap.sl:91:			    array_to_mx(Ksmx), Ksblur);
k3d/share/shaders/k3d_supertexmap.sl:97:	ApplyFloatTextureOver(disp, dispmapname, dispproj, P, dispspace,
k3d/share/shaders/k3d_supertexmap.sl:98:			      array_to_mx(dispmx), dispblur);
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: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:44:    if(Ks != 0){ /* Some optimization. If the multiplier is zero, why call an expensive function? */

k3d/share/shaders/k3d_terran.sl:22:		   float lacunarity = 2, octaves = 7;
k3d/share/shaders/k3d_terran.sl:41:  float bumpy;
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:57:      bumpy = 0;
k3d/share/shaders/k3d_terran.sl:60:	  bumpy += o * snoise(l * Ptexture);
k3d/share/shaders/k3d_terran.sl:61:	  l *= lacunarity;
k3d/share/shaders/k3d_terran.sl:73:      bumpy = weight * snoise(tp);
k3d/share/shaders/k3d_terran.sl:76:	  tp *= lacunarity;
k3d/share/shaders/k3d_terran.sl:77:	  /* get subsequent values, weighted by previous value */
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: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:100:  latitude = abs(ycomp(PtN));
k3d/share/shaders/k3d_terran.sl:102:  /* fractally purturb color map offset using "chaos" */
k3d/share/shaders/k3d_terran.sl:103:  /*  "nonlinear" scales purturbation-by-z */
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_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:13: *   which is necessary to get the best effect.  If you do this, it is
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:21: *    spectral_exp, lacunarity, octaves - control the fractal characteristics
k3d/share/shaders/k3d_terran2.sl:30: *               terrain type by latitude
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:41: *    is radically different.
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:54: *    ???? - original texture developed by F. Ken Musgrave.
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:79:	  float lacunarity = 2, octaves = 7;
k3d/share/shaders/k3d_terran2.sl:104:  float bumpy;
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:117:      o = 1;  l = 1;  bumpy = 0;
k3d/share/shaders/k3d_terran2.sl:119:	  bumpy += o * snoise (l * Ptexture);
k3d/share/shaders/k3d_terran2.sl:120:	  l *= lacunarity;
k3d/share/shaders/k3d_terran2.sl:130:      bumpy = weight * snoise (tp);
k3d/share/shaders/k3d_terran2.sl:132:	  tp *= lacunarity;
k3d/share/shaders/k3d_terran2.sl:133:	  /* get subsequent values, weighted by previous value */
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: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:158:  /*  "nonlinear" scales purturbation-by-z */
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_terranbump.sl:18:			    float lacunarity = 2, octaves = 7;
k3d/share/shaders/k3d_terranbump.sl:26:  float bumpy;
k3d/share/shaders/k3d_terranbump.sl:35:      bumpy = 0;
k3d/share/shaders/k3d_terranbump.sl:38:	  bumpy += o * snoise(l * Ptexture);
k3d/share/shaders/k3d_terranbump.sl:39:	  l *= lacunarity;
k3d/share/shaders/k3d_terranbump.sl:51:      bumpy = weight * snoise(tp);
k3d/share/shaders/k3d_terranbump.sl:54:	  tp *= lacunarity;
k3d/share/shaders/k3d_terranbump.sl:55:	  /* get subsequent values, weighted by previous value */
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:68:    P += (bump_scale * bumpy) * normalize(Ng);
k3d/share/shaders/k3d_texblender.sl:21:myEnvironment (point P;  vector R;  float Kr, blur;  DECLARE_ENVPARAMS;)
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:41:float myrand(point p;)
k3d/share/shaders/k3d_texblender.sl:45:	x+=abs(ycomp(p));
k3d/share/shaders/k3d_texblender.sl:75:	float grainy = 1;
k3d/share/shaders/k3d_texblender.sl:77:    float my_t = zcomp(PP) / ringscale;
k3d/share/shaders/k3d_texblender.sl:78:    point PQ = point (xcomp(PP)*8, ycomp(PP)*8, zcomp(PP));
k3d/share/shaders/k3d_texblender.sl:79:    my_t += noise (PQ) / 16;
k3d/share/shaders/k3d_texblender.sl:81:    PQ = point (xcomp(PP), my_t, ycomp(PP)+12.93);
k3d/share/shaders/k3d_texblender.sl:85:    PQ = point (xcomp(PP)*128+5, zcomp(PP)*8-3, ycomp(PP)*128+1);
k3d/share/shaders/k3d_texblender.sl:86:    float r2 = grainy * (1.3 - noise (PQ)) + (1-grainy);
k3d/share/shaders/k3d_texblender.sl:92:		float scalex, scaley, scalez, octaves, blur;)
k3d/share/shaders/k3d_texblender.sl:97:	transp=transform(space,P)*vector (scalex, scaley, scalez);
k3d/share/shaders/k3d_texblender.sl:102:		newc=myrand(transp);
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:146:		float Sgmx[5]={1,1,1,1,1},Sgmy[5]={1,1,1,1,1},Sgmz[5]={1,1,1,1,1};
k3d/share/shaders/k3d_texblender.sl:168:		color MC=colorMap(Gmapname[i],Gspace[i],Sgmx[i],Sgmy[i],Sgmz[i],
k3d/share/shaders/k3d_texblender.sl:194:	float olds=raysamples;
k3d/share/shaders/k3d_texblender.sl:197:	if((kr!=0) && (((Nf.V)>=0) || (raylevel()==0)) ) 
k3d/share/shaders/k3d_texblender.sl:199:		if(Rblur==0) raysamples=1;
k3d/share/shaders/k3d_texblender.sl:200:		env=myEnvironment(P,normalize(reflect(V,Nf)),1,Rblur,ENVPARAMS);
k3d/share/shaders/k3d_texblender.sl:204:		if(RFblur==0) raysamples=1;
k3d/share/shaders/k3d_texblender.sl:205:		else raysamples=olds;
k3d/share/shaders/k3d_texblender.sl:206:		benv=myEnvironment(P,refract(V,Nf,(V.Nf > 0) ? 1.0/eta : eta),1,RFblur,ENVPARAMS);
k3d/share/shaders/k3d_threads.sl:1:/* Copyrighted Pixar 1989 */
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:11:		frequency	= 5.0,
k3d/share/shaders/k3d_threads.sl:19:	magnitude = (sin( PI*2*(t*frequency + s + phase))+offset) * Km;
k3d/share/shaders/k3d_tooledsteel.sl:1:/*  tooledsteel.sl written 9/99 by Ivan DeWolf
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: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:22: *  Kr			- coefficient of reflectivity
k3d/share/shaders/k3d_tooledsteel.sl:29: *  twist		- allows you to twist the direction of anisotropy
k3d/share/shaders/k3d_tooledsteel.sl:62:  setycomp(trucell,floor(ycomp(Po))+.5);
k3d/share/shaders/k3d_toonmap.sl:125:color toon_color, layer_color;
k3d/share/shaders/k3d_toonmap.sl:126:color toon_opac, layer_opac;
k3d/share/shaders/k3d_toonmap.sl:131:/* background layer (layer 0) */
k3d/share/shaders/k3d_toonmap.sl:135:/* toon paint (layer 1) */
k3d/share/shaders/k3d_toonmap.sl:137:/* only care about percentage illumination */
k3d/share/shaders/k3d_toonmap.sl:149:layer_color = Cs*(Kd*diff*temt_c3 + Ka*ambient()) + temt_c4*Ks*spec;
k3d/share/shaders/k3d_toonmap.sl:150:layer_opac = Os;
k3d/share/shaders/k3d_toonmap.sl:152:toon_color = blend(toon_color, layer_color, layer_opac);
k3d/share/shaders/k3d_toonmap.sl:153:toon_opac = union(toon_opac, layer_opac);
k3d/share/shaders/k3d_toonmap.sl:155:/* toon ink (layer 3) */
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:163:layer_color = temt_c2;
k3d/share/shaders/k3d_toonmap.sl:165:layer_color = 0;
k3d/share/shaders/k3d_toonmap.sl:167:toon_color = blend(toon_color, layer_color, layer_opac);
k3d/share/shaders/k3d_toonmap.sl:168:toon_opac = union(toon_opac, layer_opac);
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:19:*		 Don't use white on the translucency texture.
k3d/share/shaders/k3d_translucency.sl:22:* Notes: Please send me any kind of suggestions or bugs.
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:24:*	 I'll really appriciate it.
k3d/share/shaders/k3d_translucency.sl:33:surface k3d_translucency(float Ka = 1;
k3d/share/shaders/k3d_translucency.sl:64:	color shiny;
k3d/share/shaders/k3d_translucency.sl:94:	/*Translucency texturing of different side*/
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: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: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:18: *   intensity - overall intensity scaling of 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:25: *       Area lights are emitted from actual geometry (this only works on
k3d/share/shaders/k3d_uberlight.sl:31: *       this range, no energy is transmitted.
k3d/share/shaders/k3d_uberlight.sl:38: *       (which is physically correct for point-like sources, but
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:42: *       is actually given by:   I = (falloffdist / distance) ^ falloff
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: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:58: *       They are the cross-sectional dimensions at a distance of 1
k3d/share/shaders/k3d_uberlight.sl:62: *       respectively.  Values of 0 will make a sharp cutoff, larger
k3d/share/shaders/k3d_uberlight.sl:68: *       the corners in a fairly obvious way.
k3d/share/shaders/k3d_uberlight.sl:69: *   beamdistribution - controls intensity falloff due to angle.
k3d/share/shaders/k3d_uberlight.sl:71: *       of 1 is roughly physically correct for a spotlight and 
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: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:84: *       simplicity, the shader assumes that the texture file will
k3d/share/shaders/k3d_uberlight.sl:91: *   noisefreq - frequency of the noise.
k3d/share/shaders/k3d_uberlight.sl:93: *       for example, you can use the noise to simulate the
k3d/share/shaders/k3d_uberlight.sl:98: * shadows are mainly computed by shadow maps.  Please consult the
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:113: *       allows you to cause the shadows to emanate as if the light
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:128: *   blockerwedge, blockerhedge - define the fuzzyness of the edges.
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: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: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: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:155: *       correctly acting upon, this parameter.  The built-in functions
k3d/share/shaders/k3d_uberlight.sl:157: *       and later, as well as BMRT 2.3.5 and later.  But if you write
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: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:165: *       illumination in the scene.  All the same caveats apply with
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:173: *       Note that the noisysmoke shader is distributed with BMRT but
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: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: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:199: * Author: coded by Larry Gritz, 1998
k3d/share/shaders/k3d_uberlight.sl:200: *         based on paper by Ronen Barzel, 1997
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: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: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:233:  float x = abs(xcomp(Q)), y = abs(ycomp(Q));
k3d/share/shaders/k3d_uberlight.sl:234:  if(x != 0 || y != 0)
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:248:	  float q = a * b / sqrt(sqr(b * x) + sqr(a * y));
k3d/share/shaders/k3d_uberlight.sl:249:	  float r = A * B / sqrt(sqr(B * x) + sqr(A * y));
k3d/share/shaders/k3d_uberlight.sl:256:	  float q = a * b * pow(pow(b * x, re) + pow(a * y, re), -1 / re);
k3d/share/shaders/k3d_uberlight.sl:257:	  float r = A * B * pow(pow(B * x, re) + pow(A * y, re), -1 / re);
k3d/share/shaders/k3d_uberlight.sl:272: *     clipping, superellipse x-y shaping, and distance falloff.
k3d/share/shaders/k3d_uberlight.sl:277:		       string lighttype;	/* what kind of light */
k3d/share/shaders/k3d_uberlight.sl:282:		       float maxintensity;
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:289:  /* Examine the z depth of PL to apply the (possibly smooth) cuton and
k3d/share/shaders/k3d_uberlight.sl:295:  if(lighttype == "spot")
k3d/share/shaders/k3d_uberlight.sl:316:	  float s = log(1 / maxintensity);
k3d/share/shaders/k3d_uberlight.sl:318:	  atten *= (maxintensity * exp(s * pow(PLlen / falloffdist, beta)));
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:339: * blocker.  Return 0 if the light is totally blocked, 1 if it totally
k3d/share/shaders/k3d_uberlight.sl:353:  /* Blocker works only if it's straddled by ray endpoints. */
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:376:		     float falloff = 0, falloffdist = 1, maxintensity = 1;
k3d/share/shaders/k3d_uberlight.sl:377:		     float parallelrays = 0;
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:385:		     /* Noisy light */
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:403:		     output varying float __nonspecular = 0;
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:409:   * light, you transform the coordinate system in the RIB stream, prior
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:418:   * geometry.  If not an area light, BMRT guarantees P,N will be the
k3d/share/shaders/k3d_uberlight.sl:424:  /* For PRMan, we've gotta do it the hard way */
k3d/share/shaders/k3d_uberlight.sl:429:  if(lighttype == "spot")
k3d/share/shaders/k3d_uberlight.sl:431:      uniform float maxradius = 1.4142136 * max(height + hedge + abs(sheary),
k3d/share/shaders/k3d_uberlight.sl:435:  else if(lighttype == "arealight")
k3d/share/shaders/k3d_uberlight.sl:447:    /* Accumulate attenuation of the light as it is affected by various
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:469:	float yslide = 0.5 - 0.5 * ycomp(Pslide) / zslide;
k3d/share/shaders/k3d_uberlight.sl:470:	lcol *= color texture(slidename, xslide, yslide);
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:476:	/* Apply noise */
k3d/share/shaders/k3d_uberlight.sl:485:	/* Apply shadow mapped shadows */
k3d/share/shaders/k3d_uberlight.sl:492:	if(parallelrays == 0)
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: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:521:    Cl = (atten * intensity) * lcol;
k3d/share/shaders/k3d_uberlight.sl:522:    if(parallelrays != 0)
k3d/share/shaders/k3d_urbermap.sl:20:string abTransparencyMap="I:/ArtWorks/Textures/Native_1.2.tif"; 
k3d/share/shaders/k3d_urbermap.sl:21:float abInvertTransparencyMap=0; 
k3d/share/shaders/k3d_urbermap.sl:22:float abTransparencyMapBlur=1; 
k3d/share/shaders/k3d_urbermap.sl:28:float abReflectivity=0.1; 
k3d/share/shaders/k3d_urbermap.sl:124:if(abTransparencyMap != "")
k3d/share/shaders/k3d_urbermap.sl:126:if(abInvertTransparencyMap != 0)
k3d/share/shaders/k3d_urbermap.sl:128:Copac = Copac * color texture(abTransparencyMap, ss, tt,
k3d/share/shaders/k3d_urbermap.sl:129:"swidth", abTransparencyMapBlur,
k3d/share/shaders/k3d_urbermap.sl:130:"twidth", abTransparencyMapBlur );
k3d/share/shaders/k3d_urbermap.sl:134:Copac = Copac * (color(1) - color texture(abTransparencyMap, ss, tt,
k3d/share/shaders/k3d_urbermap.sl:135:"swidth", abTransparencyMapBlur,
k3d/share/shaders/k3d_urbermap.sl:136:"twidth", abTransparencyMapBlur ));
k3d/share/shaders/k3d_urbermap.sl:189:D = vector(-zcomp(D), xcomp(D), ycomp(D));
k3d/share/shaders/k3d_urbermap.sl:191:Crefl = abReflectivity *
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: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: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:24: * last modified  29 Jun 1994 by Larry Gritz
k3d/share/shaders/k3d_veinedmarble.sl:28:#include "k3d_rayserver.h"
k3d/share/shaders/k3d_velvet.sl:16: *   Ka:	ambient component (affects diffuse color only)
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:31: * prev modified  28 January 1997 S. H. Westin
k3d/share/shaders/k3d_velvet.sl:47:  vector V;                      /* Normalized eye vector */
k3d/share/shaders/k3d_velvet.sl:50:  color shiny;                   /* Non-diffuse components */
k3d/share/shaders/k3d_velvet.sl:56:  shiny = 0;
k3d/share/shaders/k3d_velvet.sl:61:    shiny += pow ( cosine, 1.0/roughness ) * backscatter
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:2: * venus.sl - surface for a very cloudy planet like Venus.
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:10: *   simulated to give the twisting of clouds that is typically seen
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:26: *    is radically different.
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:40: *    ???? - Venus texture developed by F. Ken Musgrave.
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:61:  point PP;			/* Point after rotation by coriolis twist */
k3d/share/shaders/k3d_venus.sl:71:  /* Calculate Coriolis twist, yielding point PP */
k3d/share/shaders/k3d_venus.sl:73:  rsq = xcomp(PtN) * xcomp(PtN) + ycomp(PtN) * ycomp(PtN);
k3d/share/shaders/k3d_venus.sl:78:    point(xcomp(Ptexture) * cosine - ycomp(Ptexture) * sine,
k3d/share/shaders/k3d_venus.sl:79:	  xcomp(Ptexture) * sine + ycomp(Ptexture) * cosine, zcomp(Ptexture));
k3d/share/shaders/k3d_venus.sl:94:  /* Shade like matte, but with color scaled by cloud color */
k3d/share/shaders/k3d_venus2.sl:4: * venus.sl - surface for a very cloudy planet like Venus.
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:12: *   simulated to give the twisting of clouds that is typically seen
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:36: *    ???? - Venus texture developed by F. Ken Musgrave.
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:63:  point PP;                 /* Point after rotation by coriolis twist */
k3d/share/shaders/k3d_venus2.sl:73:  /* Calculate Coriolis twist, yielding point PP */
k3d/share/shaders/k3d_venus2.sl:75:  rsq = xcomp(PtN)*xcomp(PtN) + ycomp(PtN)*ycomp(PtN);
k3d/share/shaders/k3d_venus2.sl:79:  PP = point (xcomp(Ptexture)*cosine - ycomp(Ptexture)*sine,
k3d/share/shaders/k3d_venus2.sl:80:	      xcomp(Ptexture)*sine + ycomp(Ptexture)*cosine,
k3d/share/shaders/k3d_venus2.sl:93:  /* Shade like matte, but with color scaled by cloud color */
k3d/share/shaders/k3d_volcube.sl:1:/* srf_vol_cube - Brian Steiner - Sony Pictures Imageworks
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:7:   Density             - volume thickes per unit.
k3d/share/shaders/k3d_volcube.sl:14:   ShowActiveVol       - if 1 show the active volume instead of density.
k3d/share/shaders/k3d_volcube.sl:80:    /*plane_y_min*/
k3d/share/shaders/k3d_volcube.sl:88:    /*plane_y_max*/
k3d/share/shaders/k3d_volcube.sl:112:/* density function will return the final volume density */
k3d/share/shaders/k3d_volcube.sl:114:get_density(point Pos; float vol_mult, vol_offset;)
k3d/share/shaders/k3d_volcube.sl:132:    Nd = normal (get_density(point (xcomp(Pos) - epsilon, ycomp(Pos),
k3d/share/shaders/k3d_volcube.sl:134:		 get_density(point (xcomp(Pos),
k3d/share/shaders/k3d_volcube.sl:135:				    ycomp(Pos) - epsilon, zcomp(Pos)),vol_mult,vol_offset) - dens,
k3d/share/shaders/k3d_volcube.sl:136:		 get_density(point (xcomp(Pos),
k3d/share/shaders/k3d_volcube.sl:137:				    ycomp(Pos), zcomp(Pos) - epsilon),vol_mult,vol_offset) - dens);
k3d/share/shaders/k3d_volcube.sl:185:/* main ray marching shader  */
k3d/share/shaders/k3d_volcube.sl:189:	     float  Density        = 1;
k3d/share/shaders/k3d_volcube.sl:212:    float  density_sum  = 0;
k3d/share/shaders/k3d_volcube.sl:216:    float  cur_density  = 0;
k3d/share/shaders/k3d_volcube.sl:218:    float  density      = StepSize * Density;
k3d/share/shaders/k3d_volcube.sl:229:    while(curStep < numOfSteps && density_sum < 1){
k3d/share/shaders/k3d_volcube.sl:230:	cur_density = 0;
k3d/share/shaders/k3d_volcube.sl:233:	/*--- Run Density Function ---*/
k3d/share/shaders/k3d_volcube.sl:235:	    cur_density = active_volume(Pcur_obj,Vol_Mult,Vol_Offset);
k3d/share/shaders/k3d_volcube.sl:237:	    cur_density = get_density(Pcur_obj,Vol_Mult,Vol_Offset);
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:241:	    cur_color = cur_density;
k3d/share/shaders/k3d_volcube.sl:246:						  cur_density,Epsilon);
k3d/share/shaders/k3d_volcube.sl:257:		cur_density *= remainder;
k3d/share/shaders/k3d_volcube.sl:260:	    cur_density *= density;
k3d/share/shaders/k3d_volcube.sl:261:	    cur_color *= clamp(cur_density,0,1);
k3d/share/shaders/k3d_volcube.sl:265:                /* Just Add Up Density */
k3d/share/shaders/k3d_volcube.sl:266:		density_sum += max(0,cur_density);
k3d/share/shaders/k3d_volcube.sl:272:		cur_density = clamp(cur_density,0,1);
k3d/share/shaders/k3d_volcube.sl:273:		color_sum = ( cur_color) * (1-density_sum) + color_sum;
k3d/share/shaders/k3d_volcube.sl:274:		density_sum = (cur_density) * (1-density_sum) + density_sum;
k3d/share/shaders/k3d_volcube.sl:280:		shad_sum += max(0,cur_density);
k3d/share/shaders/k3d_volcube.sl:283:		cur_density = clamp(cur_density,0,1);
k3d/share/shaders/k3d_volcube.sl:284:		shad_sum = (cur_density) * (1-shad_sum) + shad_sum;
k3d/share/shaders/k3d_volcube.sl:287:		density_sum = 1;
k3d/share/shaders/k3d_volcube.sl:302:    Oi = density_sum;
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:7: *   equal s.  The background color is given by the surface color.
k3d/share/shaders/k3d_wallpaper_2stripe.sl:18: * ANTIALIASING:  should analytically antialias itself quite well.
k3d/share/shaders/k3d_wallpaper_2stripe.sl:20: * AUTHOR: written by Larry Gritz (email: lg@bmrt.org)
k3d/share/shaders/k3d_warningstripes.sl:2:// Copyright (c) 1995-2004, Timothy M. Shead
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:12:// but WITHOUT ANY WARRANTY; without even the implied warranty of
k3d/share/shaders/k3d_warningstripes.sl:16:// You should have received a copy of the GNU General Public
k3d/share/shaders/k3d_warningstripes.sl:24:/// Filtering code courtesy of the Advanced RenderMan book ... where else?
k3d/share/shaders/k3d_warningstripes.sl:46:	float Frequency = 8.0;
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:2: * water.sl -- water surface, using ray tracing.

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: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:19: *    blur - how blurry are the reflections? (0 = perfectly sharp)

k3d/share/shaders/k3d_water.sl:24: *      Aug 1991 -- written by lg in C

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

k3d/share/shaders/k3d_water.sl:27: * last modified 25 Jan 1994 by Larry Gritz

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

k3d/share/shaders/k3d_water.sl:65:	    uoffset = blur * normalize (vector (zcomp(Rdir) - ycomp(Rdir),

k3d/share/shaders/k3d_water.sl:67:					        ycomp(Rdir) - xcomp(Rdir)));

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

k3d/share/shaders/k3d_water.sl:91:    color layer_color = (1,1,1);

k3d/share/shaders/k3d_water.sl:92:    color layer_opac = 1;

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

k3d/share/shaders/k3d_water.sl:100:    surface_color = blend(surface_color, layer_color, layer_opac);

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:12:	color sky = color(0.69,0.84,1);

k3d/share/shaders/k3d_watercolor.sl:19:	float reflectivity;

k3d/share/shaders/k3d_watercolor.sl:28:		reflectivity = (nSnell - 1)/(nSnell + 1);

k3d/share/shaders/k3d_watercolor.sl:29:		reflectivity = reflectivity * reflectivity;

k3d/share/shaders/k3d_watercolor.sl:35:		reflectivity = 0.5 * ( fs*fs + ts*ts );

k3d/share/shaders/k3d_watercolor.sl:43:		sky = color environment(envmap, nN);

k3d/share/shaders/k3d_watercolor.sl:45:	Ci = dist * ( reflectivity * sky + (1-reflectivity) * upwelling ) + (1-dist)* air;

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

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

k3d/share/shaders/k3d_waterlight.sl:3:Copyright (c) 1995-2004, Timothy M. Shead
k3d/share/shaders/k3d_waterlight.sl:11:	float minimum_intensity = 0.3;
k3d/share/shaders/k3d_waterlight.sl:12:	float maximum_intensity = 1.0;
k3d/share/shaders/k3d_waterlight.sl:13:	float frequency = 1;
k3d/share/shaders/k3d_waterlight.sl:24:			Cl = mix(minimum_intensity, maximum_intensity, float noise(frequency * Ps)) * lightcolor;
k3d/share/shaders/k3d_windowlight.sl:9: *   intensity - overall intensity scaling of the light
k3d/share/shaders/k3d_windowlight.sl:20: * Author:  Larry Gritz, with inspiration from [Upstill]
k3d/share/shaders/k3d_windowlight.sl:28:light k3d_windowlight(float intensity = 1;
k3d/share/shaders/k3d_windowlight.sl:44:  float offset, modulus, yfract, xfract;
k3d/share/shaders/k3d_windowlight.sl:64:	yfract =
k3d/share/shaders/k3d_windowlight.sl:69:      yfract = 0;
k3d/share/shaders/k3d_windowlight.sl:81:    Cl = intensity * mix(darkcolor, lightcolor, yfract * xfract);
k3d/share/shaders/k3d_windywave.sl:3:displacement k3d_windywave(float Km = 0.1; float txtscale = 1;
k3d/share/shaders/k3d_wood2.sl:12: *   grainy - relative graininess (0 = no fine grain)
k3d/share/shaders/k3d_wood2.sl:14: * AUTHOR: written by Larry Gritz (lg@bmrt.org)
k3d/share/shaders/k3d_wood2.sl:27:		  color darkwood = color(0.35, 0.22, 0.08); float grainy = 1;)
k3d/share/shaders/k3d_wood2.sl:33:  float my_t;
k3d/share/shaders/k3d_wood2.sl:38:  my_t = zcomp(PP) / ringscale;
k3d/share/shaders/k3d_wood2.sl:39:  PQ = point(xcomp(PP) * 8, ycomp(PP) * 8, zcomp(PP));
k3d/share/shaders/k3d_wood2.sl:40:  my_t += noise(PQ) / 16;
k3d/share/shaders/k3d_wood2.sl:42:  PQ = point(xcomp(PP), my_t, ycomp(PP) + 12.93);
k3d/share/shaders/k3d_wood2.sl:48:  PQ = point(xcomp(PP) * 128 + 5, zcomp(PP) * 8 - 3, ycomp(PP) * 128 + 1);
k3d/share/shaders/k3d_wood2.sl:49:  r2 = grainy * (1.3 - noise(PQ)) + (1 - grainy);
k3d/share/shaders/k3d_woodcut.sl:3:string up="y"; 
k3d/share/shaders/k3d_woodcut.sl:13:color surface_color, layer_color;
k3d/share/shaders/k3d_woodcut.sl:14:color surface_opac, layer_opac, Cr;
k3d/share/shaders/k3d_woodcut.sl:17:float y, z, i, n, ns;
k3d/share/shaders/k3d_woodcut.sl:40:y = ycomp(Psh);
k3d/share/shaders/k3d_woodcut.sl:41:y *= ringscale;
k3d/share/shaders/k3d_woodcut.sl:42:tt = mod(y,1);
k3d/share/shaders/k3d_woodcut.sl:61:layer_color = 0.0; 
k3d/share/shaders/k3d_woodcut.sl:65:layer_color = 1.0;
k3d/share/shaders/k3d_woodcut.sl:69:layer_color = 1.0;
k3d/share/shaders/k3d_woodcut.sl:77:layer_opac = color val;
k3d/share/shaders/k3d_woodcut.sl:78:surface_color = blend(surface_color, layer_color, layer_opac);
