k3d/share/shaders/k3d_altitude_fog.sl:2:	float max_height = 1; 
k3d/share/shaders/k3d_altitude_fog.sl:8:	float fog = 1 - smoothstep(min_height, max_height, ycomp(PP));
k3d/share/shaders/k3d_altitude_fog.sl:10:	Ci = mix(Ci, background, fog);
k3d/share/shaders/k3d_altitude_fog.sl:11:	Oi = mix(Oi, color(1, 1, 1), fog);
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:6: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_antialiasedchecks.sl:6: *   look great even at only one sample per pixel.
k3d/share/shaders/k3d_antialiasedchecks.sl:31:  float smod, tmod;     /* Texture position within the pattern */
k3d/share/shaders/k3d_antialiasedchecks.sl:33:  float x, y;           /* Used to determine pattern */
k3d/share/shaders/k3d_antialiasedchecks.sl:36:  float fuzzmax;        /* max of (sfuzz, tfuzz) */
k3d/share/shaders/k3d_antialiasedchecks.sl:40:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_antialiasedchecks.sl:48:  fuzzmax = max (sfuzz, tfuzz);
k3d/share/shaders/k3d_antialiasedchecks.sl:55:  if (fuzzmax <= 0.5) {
k3d/share/shaders/k3d_antialiasedchecks.sl:56:      x = ((smoothstep (.5,.5+sfuzz,smod)) + (1 - smoothstep (0,sfuzz,smod)));
k3d/share/shaders/k3d_antialiasedchecks.sl:58:      checkcolor = mix (color1, color2, x*y + (1-x)*(1-y));
k3d/share/shaders/k3d_antialiasedchecks.sl:60:      Ci = mix (checkcolor, (color1+color2)/2, smoothstep (.125, .5, fuzzmax));
k3d/share/shaders/k3d_arealight.sl:25:   * approximately work for a flat light source whose normal points
k3d/share/shaders/k3d_bluemarble.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_bluemarble.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_bluemarble.sl:40:    uniform float texturescale = 2.5;
k3d/share/shaders/k3d_bluemarble.sl:50:    PP = transform("shader", P) * texturescale;
k3d/share/shaders/k3d_bluescreen.sl:12:string texturename = ""
k3d/share/shaders/k3d_bluescreen.sl:16:float lenx, leny;
k3d/share/shaders/k3d_bluescreen.sl:17:color tex;
k3d/share/shaders/k3d_bluescreen.sl:20:       lenx = xcomp(P)/ resolution[0];
k3d/share/shaders/k3d_bluescreen.sl:24:    if (texturename != "") {
k3d/share/shaders/k3d_bluescreen.sl:25:	tex = texture(texturename, lenx, leny);
k3d/share/shaders/k3d_bluescreen.sl:26:	Ci+=(1-alpha)*  tex;
k3d/share/shaders/k3d_brick.sl:9: *   The staggering isn't exact, however, and this variance is controlled
k3d/share/shaders/k3d_brick.sl:42:#define sqr(x) ((x)*(x))
k3d/share/shaders/k3d_brick.sl:55:  /* Determine how wide in s-t space one pixel projects to, relative
k3d/share/shaders/k3d_brick.sl:60:  swidth = 1.5 * max(filterwidth(s), MINFILTWIDTH) / BMWIDTH;
k3d/share/shaders/k3d_brick.sl:61:  twidth = 1.5 * max(filterwidth(t), MINFILTWIDTH) / BMHEIGHT;
k3d/share/shaders/k3d_brick.sl: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:86:      clamp(filteredpulse(MWF, 1 - MWF, ss, swidth), max(1 - MWF / swidth, 0),
k3d/share/shaders/k3d_brick.sl:92:      clamp(filteredpulse(MHF, 1 - MHF, tt, twidth), max(1 - MHF / twidth, 0),
k3d/share/shaders/k3d_brick.sl:133:  Ct = mix(mortarcolor, bcolor, w * h);
k3d/share/shaders/k3d_brick2.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_brick2.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brick2.sl:53:    Ct = mix(Cmortar, Cbrick, w*h);
k3d/share/shaders/k3d_brick3.sl:9: *   The staggering isn't exact, however, and this variance is controlled
k3d/share/shaders/k3d_brick3.sl:52:#define snoise(x) (2 * noise((x)) - 1)
k3d/share/shaders/k3d_brick3.sl:53:#define boxstep(a,b,x) (clamp(((x)-(a))/((b)-(a)),0,1))
k3d/share/shaders/k3d_brick3.sl:62:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_brick3.sl:63:  swidth = max (abs(Du(s)*du) + abs(Dv(s)*dv), MINFILTERWIDTH);
k3d/share/shaders/k3d_brick3.sl:64:  twidth = max (abs(Du(t)*du) + abs(Dv(t)*dv), MINFILTERWIDTH);
k3d/share/shaders/k3d_brick3.sl:70:  scoord = s + jagged * xcomp (PP2);
k3d/share/shaders/k3d_brick3.sl:93:  else w = clamp (boxstep(MWF-swidth,MWF,ss), max(1-MWF/swidth,0), 1)
k3d/share/shaders/k3d_brick3.sl:94:	 - clamp (boxstep(1-MWF-swidth,1-MWF,ss), 0, 2*MWF/swidth);
k3d/share/shaders/k3d_brick3.sl:98:  else h = clamp (boxstep(MHF-twidth,MHF,tt), max(1-MHF/twidth,0),1)
k3d/share/shaders/k3d_brick3.sl:99:	 - clamp (boxstep(1-MHF-twidth,1-MHF,tt), 0, 2*MHF/twidth);
k3d/share/shaders/k3d_brick3.sl:104:  Ct = mix (mortarcolor, bcolor, w*h);
k3d/share/shaders/k3d_brickanti.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_brickanti.sl:15:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brickanti.sl:55:    /* This is the simple antialiasing with "boxstep" */
k3d/share/shaders/k3d_brickanti.sl:59:    w = boxstep(MWF-swidth,MWF,ss)
k3d/share/shaders/k3d_brickanti.sl:60:      - boxstep(1-MWF-swidth,1-MWF,ss);
k3d/share/shaders/k3d_brickanti.sl:61:    h = boxstep(MHF-twidth,MHF,tt)
k3d/share/shaders/k3d_brickanti.sl:62:      - boxstep(1-MHF-twidth,1-MHF,tt);
k3d/share/shaders/k3d_brickanti.sl:66:#define frac(x)        mod((x),1)
k3d/share/shaders/k3d_brickanti.sl:68:                        max(0,frac(ss)-MWF))
k3d/share/shaders/k3d_brickanti.sl:70:                        max(0,frac(tt)-MHF))
k3d/share/shaders/k3d_brickanti.sl:76:    Ct = mix(Cmortar, Cbrick, w*h);
k3d/share/shaders/k3d_brickbump.sl:6: *   shader to the surface "brick" shader.  The parameters work exactly
k3d/share/shaders/k3d_brickbump.sl:37:#define sqr(x) ((x)*(x))
k3d/share/shaders/k3d_brickbump2.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_brickbump2.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brickbump2.sl:54:    Ct = mix(Cmortar, Cbrick, w*h);
k3d/share/shaders/k3d_brickbump3.sl:6: *   shader to the surface "brick" shader.  The parameters work exactly
k3d/share/shaders/k3d_brickbump3.sl:38:  parameters, it looks *exactly* like those painted cinderblock walls
k3d/share/shaders/k3d_brickbump3.sl:62:#define snoise(x) (2 * noise((x)) - 1)
k3d/share/shaders/k3d_brickbump3.sl:63:#define boxstep(a,b,x) (clamp(((x)-(a))/((b)-(a)),0,1))
k3d/share/shaders/k3d_brickbump3.sl:64:#define sqr(x) ((x)*(x))
k3d/share/shaders/k3d_brickbump3.sl:74:  scoord = s + jagged * xcomp (PP2);
k3d/share/shaders/k3d_brickperturb.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_brickperturb.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brickperturb.sl:54:    Ct = mix(Cmortar, Cbrick, w*h);
k3d/share/shaders/k3d_brushedmetal2.sl:21: * 			  maxes out at 10
k3d/share/shaders/k3d_brushedmetal2.sl:23: *			  maxes out at .5
k3d/share/shaders/k3d_brushedmetal2.sl:25: *			  maxes out at .5
k3d/share/shaders/k3d_brushedmetal2.sl:36:    extern vector I;
k3d/share/shaders/k3d_brushedmetal2.sl:37:    extern normal N;
k3d/share/shaders/k3d_brushedmetal2.sl:38:    extern point P;
k3d/share/shaders/k3d_brushedmetal2.sl:44:    color pixbrdf, C = 0;
k3d/share/shaders/k3d_brushedmetal2.sl:48:        extern vector L;  
k3d/share/shaders/k3d_brushedmetal2.sl:49:	extern color Cl;
k3d/share/shaders/k3d_brushedmetal2.sl:57:	    pixbrdf  = specularbrdf(LN, Nf,V,specspread);
k3d/share/shaders/k3d_brushedmetal2.sl:58:            C += Cl * pixbrdf * pow( 1-abs(VA.H), 1/specwidth );
k3d/share/shaders/k3d_brushedmetal3.sl:11: *   xdir - a unit tangent of the surface which defines the reference
k3d/share/shaders/k3d_brushedmetal3.sl:13: *   xroughness - the apparent roughness of the surface in xdir.
k3d/share/shaders/k3d_brushedmetal3.sl:15: *          tangent which is perpendicular to xdir.
k3d/share/shaders/k3d_brushedmetal3.sl:19:                         vector xdir;  float xroughness, yroughness;)
k3d/share/shaders/k3d_brushedmetal3.sl:21:    float sqr (float x) { return x*x; }
k3d/share/shaders/k3d_brushedmetal3.sl:24:    vector X = xdir / xroughness;
k3d/share/shaders/k3d_brushedmetal3.sl:25:    vector Y = (N ^ xdir) / yroughness;
k3d/share/shaders/k3d_brushedmetal3.sl:28:    extern point P;
k3d/share/shaders/k3d_brushedmetal3.sl:30:        /* Must declare because extern L & Cl because we're in a function */
k3d/share/shaders/k3d_brushedmetal3.sl:31:        extern vector L;  extern color Cl;
k3d/share/shaders/k3d_brushedmetal3.sl:39:                float rho = exp (-2 * (sqr(X.H) + sqr(Y.H)) / (1 + H.N))
k3d/share/shaders/k3d_brushedmetal3.sl:45:    return C / (4 * xroughness * yroughness);
k3d/share/shaders/k3d_brushedmetal3.sl:58:    vector xdir = normalize (dPdu);
k3d/share/shaders/k3d_brushedmetal3.sl:61:                                          xdir, uroughness, vroughness);
k3d/share/shaders/k3d_bubbly.sl:7: *  "a cellular texture basis function" by Steven Worley in the 
k3d/share/shaders/k3d_bubbly.sl:8: *  siggraph proceedings from 1996, except this uses a noised grid of cells
k3d/share/shaders/k3d_bubbly.sl:43:  setxcomp(trucell,floor(xcomp(Po))+.5);
k3d/share/shaders/k3d_castucco.sl:10: *   freq - basic frequency of the texture
k3d/share/shaders/k3d_castucco.sl:33:  /* Do texture calcs in "shader" space, get approximate filter size */
k3d/share/shaders/k3d_causticlight.sl:17:    uniform vector axis = normalize(to-from);
k3d/share/shaders/k3d_causticlight.sl:19:    illuminate (from, axis, coneangle) {
k3d/share/shaders/k3d_causticlight.sl:20:	float cosangle = (L . axis) / length(L);
k3d/share/shaders/k3d_ceramictiles.sl:7: *   projection, textureprojspace, mx -  define the projection used to
k3d/share/shaders/k3d_ceramictiles.sl:12: *     expressed as a fraction of the tile-to-tile spacing.
k3d/share/shaders/k3d_ceramictiles.sl:13: *   groovedepth - displacement amount for the grooves (expressed in
k3d/share/shaders/k3d_ceramictiles.sl:43: * Contacts:  lg@pixar.com
k3d/share/shaders/k3d_ceramictiles.sl:60:/* Given 2-D texture coordinates ss,tt and their filter widths ds, dt,
k3d/share/shaders/k3d_ceramictiles.sl:62: * tile spacing is 1.0), figure out which (integer indexed) tile we are
k3d/share/shaders/k3d_ceramictiles.sl:90:color tiletexture(float tileindex;
k3d/share/shaders/k3d_ceramictiles.sl:96:  float dst = max(ds, dt);
k3d/share/shaders/k3d_ceramictiles.sl:99:      point noisep = mottlefreq * point(stile, ttile, tileindex);
k3d/share/shaders/k3d_ceramictiles.sl:101:	.2 + .6 * fBm(noisep, mottlefreq * max(ds, dt), 4, 2, 0.65);
k3d/share/shaders/k3d_ceramictiles.sl:102:      C = mix(C, Cmottle, clamp(mottling * mottle, 0, 1));
k3d/share/shaders/k3d_ceramictiles.sl:107:	.05 * fBm(point(stile * 10, ttile * 10, tileindex + 10),
k3d/share/shaders/k3d_ceramictiles.sl:110:	.05 * fBm(point(stile * 10, ttile * 10, tileindex - 3),
k3d/share/shaders/k3d_ceramictiles.sl:116:      C = mix(C, Cedge, edgevary * edgy);
k3d/share/shaders/k3d_ceramictiles.sl:122:	point(stile * speckfreq, ttile * speckfreq, tileindex + 8);
k3d/share/shaders/k3d_ceramictiles.sl:125:      C = mix(C, Cspeck, speckly * specky);
k3d/share/shaders/k3d_ceramictiles.sl:146:  extern vector I;
k3d/share/shaders/k3d_ceramictiles.sl:147:  extern point P;
k3d/share/shaders/k3d_ceramictiles.sl:148:  color basecolor = mix(Cmortar, Ctile, intile);
k3d/share/shaders/k3d_ceramictiles.sl:150:  float kd = mix(Kdmortar, Kdtile, intile);
k3d/share/shaders/k3d_ceramictiles.sl:176:			 string textureprojspace = "shader";
k3d/share/shaders/k3d_ceramictiles.sl:177:			 float mx[16] =
k3d/share/shaders/k3d_ceramictiles.sl:189:   * Get a 2-D texture coordinates for the texturing, then
k3d/share/shaders/k3d_ceramictiles.sl:190:   * Normalize everything so that the tiles are 1x1 units
k3d/share/shaders/k3d_ceramictiles.sl:193:    ProjectTo2D (projection, P, textureprojspace, array_to_mx(mx),ss, tt, dss, dtt);
k3d/share/shaders/k3d_ceramictiles.sl:207:  float tileindex = swhichtile + 13 * twhichtile;
k3d/share/shaders/k3d_ceramictiles.sl:220:  Ntile += 0.05 * (vector cellnoise(tileindex + 5) - 0.5);
k3d/share/shaders/k3d_ceramictiles.sl:221:  Nf = normalize(mix(Nf, Ntile, intile));
k3d/share/shaders/k3d_ceramictiles.sl:224:   * Here's the exciting part -- calculate the color of the spot we're
k3d/share/shaders/k3d_ceramictiles.sl:225:   * in within the tile.  Then use the tile index to vary its color
k3d/share/shaders/k3d_ceramictiles.sl:228:  color Ctile = tiletexture(tileindex, stile, ttile, dss, dtt,
k3d/share/shaders/k3d_ceramictiles.sl:232:  Ctile = varyEach(Ctile, tileindex, varyhue, varysat, varylum);
k3d/share/shaders/k3d_checkerboard.sl:14:  float mixamount;
k3d/share/shaders/k3d_checkerboard.sl:37:      mixamount = 0.0;
k3d/share/shaders/k3d_checkerboard.sl:41:      mixamount = 1.0;
k3d/share/shaders/k3d_checkerboard.sl:44:  checkcolor = mix(EvenColor, Cs, mixamount);
k3d/share/shaders/k3d_checkerboard_solid.sl:17:	float x, y, z, sum;
k3d/share/shaders/k3d_checkerboard_solid.sl:21:	x = mod(floor(xcomp(Pshad) / TileX), 2.0);
k3d/share/shaders/k3d_checkerboard_solid.sl:25:	sum = mod(x + y + z, 2.0);
k3d/share/shaders/k3d_clamptoalpha.sl:4: *    pixel.
k3d/share/shaders/k3d_cloudplane.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_cloudplane.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_cloudplane.sl:26:    float x, fx, xfreq, xphase;
k3d/share/shaders/k3d_cloudplane.sl:29:    uniform float xoffset = 13;
k3d/share/shaders/k3d_cloudplane.sl:33:    x = xcomp(Psh) + xoffset;
k3d/share/shaders/k3d_cloudplane.sl:36:    xphase = 0.9; /* arbitrary */
k3d/share/shaders/k3d_cloudplane.sl:38:    xfreq = 2 * PI * 0.023;
k3d/share/shaders/k3d_cloudplane.sl:43:        fx = amplitude *
k3d/share/shaders/k3d_cloudplane.sl:44:            (offset + cos(xfreq * (x + xphase)));
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_cloudplane.sl:57:    Ct = mix(Cs, cloudcolor, f);
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:6: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_contacshadow.sl:15:    string shadowname = "";     /* the name of the texture file */  
k3d/share/shaders/k3d_contacshadow.sl:19:    float maxdist = 10000;      /* how far is considered infinity */  
k3d/share/shaders/k3d_contacshadow.sl:22:    /* get a matrix which transforms from current space to the  
k3d/share/shaders/k3d_contacshadow.sl:24:    uniform matrix matNl;  
k3d/share/shaders/k3d_contacshadow.sl:25:    textureinfo(shadowname, "viewingmatrix", matNl);  
k3d/share/shaders/k3d_contacshadow.sl:27:    /* get a matrix which transforms from current space to the  
k3d/share/shaders/k3d_contacshadow.sl:29:    uniform matrix matNP;  
k3d/share/shaders/k3d_contacshadow.sl:30:    textureinfo(shadowname, "projectionmatrix", matNP);  
k3d/share/shaders/k3d_contacshadow.sl:32:    /* transform the ground plane point into texture coordinates  
k3d/share/shaders/k3d_contacshadow.sl:35:    float ss = (xcomp(screenP) + 1) * 0.5;  
k3d/share/shaders/k3d_contacshadow.sl:45:	float mapdist = float texture(shadowname, ss, tt, "samples", samples);
k3d/share/shaders/k3d_corktile.sl:12: * txtscale - the amount of detail / magnification of the image, this also determines
k3d/share/shaders/k3d_corktile.sl:13: *   (if tiles=1) the number of tiles fitted into the texture as s and t vary from 0 to 1
k3d/share/shaders/k3d_corktile.sl:14: * tiles - the number of tiles in a unit square of texture before txtscale is applied
k3d/share/shaders/k3d_corktile.sl:15: *	 (this means the number of tiles actually seen is the square of txtscale * tiles)
k3d/share/shaders/k3d_corktile.sl:38:bias (float b, x)
k3d/share/shaders/k3d_corktile.sl:40:	return pow(x, log(b)/log(0.5));
k3d/share/shaders/k3d_corktile.sl:44:							float txtscale, filtwidth)
k3d/share/shaders/k3d_corktile.sl:52:		point PT = P2 * txtscale;
k3d/share/shaders/k3d_corktile.sl:53:		float fw = filtwidth * txtscale;
k3d/share/shaders/k3d_corktile.sl:55:		float f = fnoise(PT, fw) + fnoise((P2 + 0.553) * txtscale, fw); 
k3d/share/shaders/k3d_corktile.sl:59:		g = fBm((P2 + 8.654) * txtscale, fw, 4, 2, .5);
k3d/share/shaders/k3d_corktile.sl:84:	 					float	txtscale = 1;
k3d/share/shaders/k3d_corktile.sl:94:	uniform float tilewidth = 1 / (tiles * txtscale); 
k3d/share/shaders/k3d_corktile.sl:100:			stfiltwidth = max(swidth, twidth) / tilewidth,
k3d/share/shaders/k3d_corktile.sl:106:	Ct = cork( P, txtscale, filtwidth);	
k3d/share/shaders/k3d_corktile.sl:108:	Cg = color( .20, 0, 0) + filteredsnoise(PP * txtscale, filtwidth * txtscale) * .2;
k3d/share/shaders/k3d_corktile.sl:113:	disp = (tileheight + fnoise(PP * txtscale * bumpfreq + 3, filtwidth * txtscale) * (1 - tileheight)) 
k3d/share/shaders/k3d_corktile.sl:119:	Ci = Os * (mix( Ct, Cg, ingap) * (Ka*ambient() + Kd*diffuse(Nf)) +
k3d/share/shaders/k3d_craters.sl:35:    float rmax = swidth/2; /* was /2 */
k3d/share/shaders/k3d_craters.sl:36:    float	rmax1=1000000,rmax2=1000000,rrad1=0,rrad2=0,cellsizescale,ilac;
k3d/share/shaders/k3d_craters.sl:58:		  /* xp = (sc*7*scell-9.5,sc*7*tcell+7.5,.5); */
k3d/share/shaders/k3d_craters.sl:59:		  /* if ( fBm_default(xp) < pitfactor)  *//* I like this distribution better - pitf = -1 -> 1 */
k3d/share/shaders/k3d_craters.sl:66:		    if (r < rmax1) {
k3d/share/shaders/k3d_craters.sl:68:		      rad = rmax*ilac;
k3d/share/shaders/k3d_craters.sl:71:		      rmax2 = rmax1;
k3d/share/shaders/k3d_craters.sl:73:		      rmax1 = r;
k3d/share/shaders/k3d_craters.sl:76:		    else if (r < rmax2) {
k3d/share/shaders/k3d_craters.sl:78:		      rad = rmax*ilac;
k3d/share/shaders/k3d_craters.sl:81:		      rmax2 = r;
k3d/share/shaders/k3d_craters.sl:95:	if (rrad1 > 0 && rmax1 > 0) 
k3d/share/shaders/k3d_craters.sl:97:	    r = smoothstep(0,rrad1,rmax1);
k3d/share/shaders/k3d_craters.sl:101:	if (rrad2 > 0 && rmax2 > 0) 
k3d/share/shaders/k3d_craters.sl:103:	    r = smoothstep(0,rrad2,rmax2);
k3d/share/shaders/k3d_crayon.sl:13:	txtscale  - an overall scaling factor
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:32:#define snoise(x,y) ((noise(x,y) - 0.5) * 2)
k3d/share/shaders/k3d_crayon.sl:42:	mag = max(pow(0.85, f - 1),.1);
k3d/share/shaders/k3d_crayon.sl:51:#define filterwidth(x)  max (abs(Du(x)*du) + abs(Dv(x)*dv), MINFILTWIDTH)
k3d/share/shaders/k3d_crayon.sl:60:			float txtscale = 1;
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_crayon.sl:81:	float smks = aanoise(txtscale * s * micro / width, txtscale * t * micro / width,
k3d/share/shaders/k3d_crayon.sl:82:	 		txtscale * fw * micro / width);
k3d/share/shaders/k3d_crayon.sl:83:	float lmks = (aanoise(txtscale * s / width, txtscale * t / (width * stretch), 
k3d/share/shaders/k3d_crayon.sl:84:		txtscale * fw / width) + 1) / 2;
k3d/share/shaders/k3d_crayon.sl:89:	Csurf = mix(basecolor, topcolor, m);
k3d/share/shaders/k3d_crayontoon.sl:2: * Abril 2002    <felipe@siggraph.org.mx>

k3d/share/shaders/k3d_crayontoon.sl:25:  Ci = Os * (mix(colorBase, colorSombra, Kt1) + Kd * Kt1 * diffuse(Nf) * colorBase);

k3d/share/shaders/k3d_cyclone.sl:4:#define snoise(x) ((2*noise(x))-1)
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:16:  point Pt;			/* Point in texture space */
k3d/share/shaders/k3d_cyclone.sl:17:  point PN;			/* Normalized vector in texture space */
k3d/share/shaders/k3d_cyclone.sl:21:  /* Transform to texture coordinates */
k3d/share/shaders/k3d_cyclone.sl:26:  radius = sqrt(xcomp(PN) * xcomp(PN) + ycomp(PN) * ycomp(PN));
k3d/share/shaders/k3d_cyclone.sl:28:  if(radius < max_radius)
k3d/share/shaders/k3d_cyclone.sl:31:      dist = pow(max_radius - radius, 3);
k3d/share/shaders/k3d_cyclone.sl:32:      angle = PI + twist * TWOPI * (max_radius - dist) / max_radius;
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:39:      if(radius < 0.05 * max_radius)
k3d/share/shaders/k3d_cyclone.sl:41:	  eye_weight = (.1 * max_radius - radius) * 10;	/* normalize */
k3d/share/shaders/k3d_decalplastic.sl:30:	string texturename = "";
k3d/share/shaders/k3d_decalplastic.sl:38:	if(texturename != "")
k3d/share/shaders/k3d_decalplastic.sl:40:			float ss = mix(s0, s1, s);
k3d/share/shaders/k3d_decalplastic.sl:41:			float tt = mix(t0, t1, t);
k3d/share/shaders/k3d_decalplastic.sl:42:			float alpha = float texture(texturename[3], ss, tt);
k3d/share/shaders/k3d_decalplastic.sl:43:			Ct = (1.0 - alpha) * Cs + (alpha * color texture(texturename, ss, tt));
k3d/share/shaders/k3d_defaultsurface.sl:4: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_defaultsurface.sl:5: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_dented.sl:19: *      Dec 1992 -- written by lg for "Timbre Trees Examples" (jingle)
k3d/share/shaders/k3d_dented.sl:24: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_dented.sl:25: * RenderMan (R) is a registered trademark of Pixar.
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:39:	for(i = 0;  i < maxoctaves;  i += 1)
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.sl:6: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_depthcue.sl:9:volume k3d_depthcue(float mindistance = 0, maxdistance = 1;
k3d/share/shaders/k3d_depthcue.sl:14:  d = clamp((depth(P) - mindistance) / (maxdistance - mindistance), 0, 1);
k3d/share/shaders/k3d_depthcue.sl:15:  Ci = mix(Ci, background, d);
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:8:float mindistance = 0, maxdistance = 1, CScale=1000;
k3d/share/shaders/k3d_depthcue_surf.sl:13:  d = clamp((depth(P) - mindistance) / (maxdistance - mindistance), 0, 1);
k3d/share/shaders/k3d_depthcue_surf.sl:15:  Ci = 1 - mix(Ci, (1,1,1), d)*CScale;
k3d/share/shaders/k3d_displacementmap.sl:3:				 string texturename = "";)
k3d/share/shaders/k3d_displacementmap.sl:9:  Ct = (texturename != "") ? float texture(texturename) : 0;
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:6: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_droop.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_droop.sl:18:	yDel = -Km * ( M_E + (1/M_E) - (exp(droop)+exp(-droop)) );
k3d/share/shaders/k3d_dturb.sl:12:  float width, cutoff, fade, f, turb, maxfreq = 16;
k3d/share/shaders/k3d_dturb.sl:19:  cutoff = clamp(0.5 / width, 0, maxfreq);
k3d/share/shaders/k3d_easysurface.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_ember.sl:39:	float spcol = pow (max (0, Nf.NI * -1), 1/roughness);
k3d/share/shaders/k3d_emboss.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_emboss.sl:3:/* Listing 16.36  Displacement shader embossing a surface using a texture */
k3d/share/shaders/k3d_emboss.sl:6: * emboss(): emboss a pencil with lettering.  It uses the same texture
k3d/share/shaders/k3d_emboss.sl:7: * 	map as sdixon() to define the lettering.
k3d/share/shaders/k3d_emboss.sl:12:	string	texturename	= "")
k3d/share/shaders/k3d_emboss.sl:14:	if( texturename != "") {
k3d/share/shaders/k3d_emboss.sl:15:		P -= Km * texture(texturename, s, t) * normalize(N);
k3d/share/shaders/k3d_eroded.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_eroded.sl:20:    point x = (1, 0, 0);
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: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:57:	 float index = 0;
k3d/share/shaders/k3d_eyeball.sl:74:  twidth = max (abs(Du(t)*du) + abs(Dv(t)*dv), MINFILTERWIDTH);
k3d/share/shaders/k3d_eyeball.sl:75:  PO = transform ("object", P) + index;
k3d/share/shaders/k3d_eyeball.sl:103:      Cball = mix (eyeballcolor, bloodcolor, smoothstep(0,.75,displayed));
k3d/share/shaders/k3d_eyeball.sl:107:  Ciris = mix (iriscolor, irisoutercolor, smoothstep (irissize*.8, irissize, tt));
k3d/share/shaders/k3d_eyeball.sl:120:  /* OK, now calculate a surface texture color (Ct) based on where we are
k3d/share/shaders/k3d_eyeball.sl:123:  Ct = mix (Ciris, Cball, irisstat);
k3d/share/shaders/k3d_eyeball.sl:124:  Ct = mix (pupilcolor, Ct, pupilstat);
k3d/share/shaders/k3d_fakesky.sl:4: * Shader a la const that slaps a fixed blue color up on the top half of a

k3d/share/shaders/k3d_fakesky.sl: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_fill.sl:10:		max			=   0.055)
k3d/share/shaders/k3d_fill.sl:13:	Ci = Cs * (Ka*ambient() + Kd*(smoothstep(min,max,comp(diffuse(Nf),0))));
k3d/share/shaders/k3d_fire.sl:13:  float width, cutoff, fade, f, turb, maxfreq = 16;
k3d/share/shaders/k3d_fire.sl:31:  width = max(filterwidth(ss), filterwidth(tt));
k3d/share/shaders/k3d_fire.sl:32:  cutoff = clamp(0.5 / width, 0, maxfreq);
k3d/share/shaders/k3d_fire.sl:41:  /* index into color spline using turbulence */
k3d/share/shaders/k3d_flame.sl:2: * flame.sl -- RenderMan compatible surface shader for a flame-like texture.
k3d/share/shaders/k3d_flame.sl:21: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_flame.sl:47:  PQ *= point(1, 1, exp(-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_fog.sl:6: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_fog.sl:11:  float d = 1 - exp(-length(I) / distance);
k3d/share/shaders/k3d_fog.sl:12:  Ci = mix(Ci, background, d);
k3d/share/shaders/k3d_fog.sl:13:  Oi = mix(Oi, color(1, 1, 1), d);
k3d/share/shaders/k3d_fractal.sl:7: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,

k3d/share/shaders/k3d_fractal.sl:12:#define snoise(x) (2.5*(noise(x)-0.5))

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

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:58:          		result += signal * exponent;

k3d/share/shaders/k3d_fresnelplastic.sl:19:#define CHKTX(tx) ((tx != "" && textureinfo (tx, "exists", 0) != 0)? 1: 0)
k3d/share/shaders/k3d_fresnelplastic.sl:21:#define CHKTX(tx) \
k3d/share/shaders/k3d_fresnelplastic.sl:22:    ((tx != "")? 1: 0)
k3d/share/shaders/k3d_fresnelplastic.sl:33:   /* desc { Index of Refraction.  Used to get Fresnel falloff.
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:81:    /* Calculate fresnel index of refraction */
k3d/share/shaders/k3d_fresnelplastic.sl:94:    /*Ct = (CHKTX (colorMap))? texture (colorMap, ss, tt): Csurf; */
k3d/share/shaders/k3d_fresnelplastic.sl:96:      Ct = texture (colorMap, ss, tt);
k3d/share/shaders/k3d_funkyglass.sl:5: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_funkyglass.sl:6: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_fur2.sl:27:    Atten = max(0.0,LN.NN);
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:112:       Dimensional Textures", Computer Graphics 23,3, 271-280  
k3d/share/shaders/k3d_fur2.sl:151:    final_c = mix( rootcolor, tipcolor, v ) * darkening;
k3d/share/shaders/k3d_gloop.sl:5: * an example of nonlinear displacements 
k3d/share/shaders/k3d_gloop.sl:7: * Written as an explanation to the talk I gave at
k3d/share/shaders/k3d_gloop.sl:19: * wildly complex formula:
k3d/share/shaders/k3d_glow.sl:17:      C = mix(edgecolor, centercolor, strength);
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:11: *   txtscale - overall scaling for the texture
k3d/share/shaders/k3d_gmarbtile_polish.sl:31:			     float txtscale = 1;
k3d/share/shaders/k3d_gmarbtile_polish.sl:53:  point PP = txtscale * transform("shader", P);
k3d/share/shaders/k3d_gmarbtile_polish.sl:56:  float ss = xcomp(PP) / tilesize;
k3d/share/shaders/k3d_gmarbtile_polish.sl:71:  Ct = mix(darkcolor, lightcolor, smoothstep(0.1, .35, turb));
k3d/share/shaders/k3d_gmarbtile_polish.sl:96:  Ct = mix(Ct, veincolor, turbsum);
k3d/share/shaders/k3d_gmarbtile_polish.sl:98:  Ct = mix(groovecolor, Ct, groovy);
k3d/share/shaders/k3d_gooch.sl:50:        Cgooch += mix(kcool,kwarm,blendval); 
k3d/share/shaders/k3d_gouge.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_gouge.sl:3:/* Listing 16.32  Displacement shader for beating up a surface with a texture  */
k3d/share/shaders/k3d_gouge.sl:6: * gouge(): Use a texture map to displace a surface.
k3d/share/shaders/k3d_gouge.sl:11:		spin	= 0.0;		/* each pin gets its texture spun */
k3d/share/shaders/k3d_gouge.sl:12:	string	texturename = "")
k3d/share/shaders/k3d_gouge.sl:16:   /* Use the same texture map that the surface shader uses. Spin it a different
k3d/share/shaders/k3d_gouge.sl:17:    *  amount for each pin so that similarity is not detected.  The texture 
k3d/share/shaders/k3d_gouge.sl:22:   if( texturename != "") 
k3d/share/shaders/k3d_gouge.sl:23:   {  P += (-Km * texture(texturename,s+spin,y/15.0)) * normalize(N);
k3d/share/shaders/k3d_gradient_t.sl:7:	color C = mix(start_color, end_color, t);
k3d/share/shaders/k3d_granite.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_granite.sl:6: * granite(): Provide a diffuse granite-like surface texture. 
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:60:        string up_ink="x";
k3d/share/shaders/k3d_graphic_lines.sl:98:	float stripemax_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:100:	float x_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:113:/** setup tt_highlight with chosen axis **/
k3d/share/shaders/k3d_graphic_lines.sl:124:	else {x_highlight=xcomp(Psh_highlight);
k3d/share/shaders/k3d_graphic_lines.sl:125:		x_highlight*=line_scale_highlight*line_scale_master;
k3d/share/shaders/k3d_graphic_lines.sl:126:		tt_highlight=mod(x_highlight,1);
k3d/share/shaders/k3d_graphic_lines.sl:129:	illumination_highlight=max(max(comp(illumcolor_highlight,0),comp(illumcolor_highlight,1)),comp(illumcolor_highlight,2));
k3d/share/shaders/k3d_graphic_lines.sl:150:	stripemax_highlight=0.5+smoothstep(0.0,1.0,illumination_highlight)/2.0;
k3d/share/shaders/k3d_graphic_lines.sl:151:	float val_highlight=(smoothstep((stripemin_highlight)-(fuzz_highlight),(stripemin_highlight),(tt_highlight))-smoothstep((stripemax_highlight)-(fuzz_highlight),(stripemax_highlight),(tt_highlight)));
k3d/share/shaders/k3d_graphic_lines.sl:154:	float color_val_highlight=mix(0.0,1.0,val_highlight);
k3d/share/shaders/k3d_graphic_lines.sl:157:	vector Ndisp_highlight=normalize(N_highlight)*(0/max(spacescale_highlight,1e-6));
k3d/share/shaders/k3d_graphic_lines.sl:176:	float stripemax_paint;
k3d/share/shaders/k3d_graphic_lines.sl:178:	float x_paint;
k3d/share/shaders/k3d_graphic_lines.sl:200:	else {x_paint=xcomp(Psh_paint);
k3d/share/shaders/k3d_graphic_lines.sl:201:		x_paint*=line_scale_paint*line_scale_master;
k3d/share/shaders/k3d_graphic_lines.sl:202:		tt_paint=mod(x_paint,1);
k3d/share/shaders/k3d_graphic_lines.sl:204:	illumination_paint=max(max(comp(illumcolor_paint,0),comp(illumcolor_paint,1)),comp(illumcolor_paint,2));
k3d/share/shaders/k3d_graphic_lines.sl:223:	stripemax_paint=0.5+smoothstep(0.0,1.0,illumination_paint)/2.0;
k3d/share/shaders/k3d_graphic_lines.sl:224:	float val1=(smoothstep((stripemin_paint)-(fuzz_paint),(stripemin_paint),(tt_paint))-smoothstep((stripemax_paint)-(fuzz_paint),(stripemax_paint),(tt_paint)));
k3d/share/shaders/k3d_graphic_lines.sl:227:	float color_val1=mix(0.0,1.0,val1);
k3d/share/shaders/k3d_graphic_lines.sl:230:	vector Ndisp1=normalize(N_paint)*(0/max(spacescale1,1e-6));
k3d/share/shaders/k3d_graphic_lines.sl:248:	float stripemax_ink;
k3d/share/shaders/k3d_graphic_lines.sl:250:	float x_ink;
k3d/share/shaders/k3d_graphic_lines.sl:272:	else {x_ink=xcomp(Psh_ink);
k3d/share/shaders/k3d_graphic_lines.sl:273:		x_ink*=line_scale_ink*line_scale_master;
k3d/share/shaders/k3d_graphic_lines.sl:274:		tt_ink=mod(x_ink,1);
k3d/share/shaders/k3d_graphic_lines.sl:276:	illumination_ink=max(max(comp(illumcolor_ink,0),comp(illumcolor_ink,1)),comp(illumcolor_ink,2));
k3d/share/shaders/k3d_graphic_lines.sl:295:	stripemax_ink=0.5+smoothstep(0.0,1.0,illumination_ink)/2.0;
k3d/share/shaders/k3d_graphic_lines.sl:296:	float val2=(smoothstep((stripemin_ink)-(fuzz_ink),(stripemin_ink),(tt_ink))-smoothstep((stripemax_ink)-(fuzz_ink),(stripemax_ink),(tt_ink)));
k3d/share/shaders/k3d_graphic_lines.sl:299:	float color_val2=mix(0.0,1.0,val2);
k3d/share/shaders/k3d_graphic_lines.sl:302:	vector Ndisp2=normalize(N_ink)*(0/max(spacescale2,1e-6));
k3d/share/shaders/k3d_graphic_lines.sl:310:#define blend(a,b,x) ((a) * (1 - (x)) + (b) * (x))
k3d/share/shaders/k3d_grass_displace.sl:5: * creating a random look on the grass texture.

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

k3d/share/shaders/k3d_grass_displace.sl:39:      x = smod*10; 

k3d/share/shaders/k3d_grass_displace.sl:40:      x = abs(x - 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:50:      x = (smod - 0.5)*10;

k3d/share/shaders/k3d_grass_displace.sl:52:      x = abs(x - 2.5);

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

k3d/share/shaders/k3d_greenmarble.sl:9: *   txtscale - overall scaling for the texture
k3d/share/shaders/k3d_greenmarble.sl:31:			float sharpness = 25; float txtscale = 1;
k3d/share/shaders/k3d_greenmarble.sl:38:  point PP = txtscale * transform("shader", P);
k3d/share/shaders/k3d_greenmarble.sl:46:  Ct = mix(darkcolor, lightcolor, smoothstep(0.1, .35, turb));
k3d/share/shaders/k3d_greenmarble.sl:69:  Ct = mix(Ct, veincolor, turbsum);
k3d/share/shaders/k3d_grids.sl:47:#define repeat(x,freq) (mod((x) * (freq), 1.0))
k3d/share/shaders/k3d_grids.sl:48:#define pulse(a,b,fuzz,x) (smoothstep((a)-(fuzz),(a),(x)) - smoothstep((b)-(fuzz),(b),(x)))
k3d/share/shaders/k3d_grids.sl: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:50:#define blend(a,b,x) ((a) * (1 - (x)) + (b) * (x))
k3d/share/shaders/k3d_grids.sl:51:#define snoise(x) (2*noise(x)-1) 
k3d/share/shaders/k3d_grids_disp.sl:6: extern point P;
k3d/share/shaders/k3d_grids_disp.sl:8: vector Ndisp = dir * (amp / max(spacescale,1e-6));
k3d/share/shaders/k3d_grids_disp.sl:26:#define repeat(x,freq) (mod((x) * (freq), 1.0))
k3d/share/shaders/k3d_grids_disp.sl:27:#define pulse(a,b,fuzz,x) (smoothstep((a)-(fuzz),(a),(x)) - smoothstep((b)-(fuzz),(b),(x)))
k3d/share/shaders/k3d_grids_disp.sl: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:29:#define blend(a,b,x) ((a) * (1 - (x)) + (b) * (x))
k3d/share/shaders/k3d_grids_disp.sl:39:#define repeat(x,freq) (mod((x) * (freq), 1.0))
k3d/share/shaders/k3d_grids_disp.sl:40:#define pulse(a,b,fuzz,x) (smoothstep((a)-(fuzz),(a),(x)) - smoothstep((b)-(fuzz),(b),(x)))
k3d/share/shaders/k3d_grids_disp.sl: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:42:#define blend(a,b,x) ((a) * (1 - (x)) + (b) * (x))
k3d/share/shaders/k3d_grids_disp.sl:52:float x=0.5; 
k3d/share/shaders/k3d_grids_disp.sl:54:float temp_f_2=(comp((x*Ct0+(1-x)*Ct1),0)+comp((x*Ct0+(1-x)*Ct1),1)+comp((x*Ct0+(1-x)*Ct1),2))/3;
k3d/share/shaders/k3d_hair.sl:29:	Ci = Oi * (mix(rootcolor, tipcolor, v) * (Ka*ambient() + Kd * Cdiff) + (Ks * Cspec * specularcolor));
k3d/share/shaders/k3d_hdr_light.sl:18:	color hdrtex;

k3d/share/shaders/k3d_hdr_light.sl:22:	float Dx = xcomp(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:28:	float ss = 0.5 + (Dx * r);

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

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

k3d/share/shaders/k3d_hdr_light.sl:42:	float exposure_compensation_stops = 0.0;

k3d/share/shaders/k3d_hdr_light.sl:58:vector axis = normalize(N);

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

k3d/share/shaders/k3d_hdr_light.sl:63:	solar (-axis, 1.570796327) {

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

k3d/share/shaders/k3d_hdr_light.sl:87:				Ct = texture(envname,s,t,"blur",blur);

k3d/share/shaders/k3d_hdr_light.sl:91:		float exposure = pow(2,exposure_compensation_stops);

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

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

k3d/share/shaders/k3d_hdr_surface.sl:21:	float Dx = xcomp(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:27:	float ss = 0.5 + (Dx * r);

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

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

k3d/share/shaders/k3d_hdr_surface.sl:41:	float exposure_compensation_stops = 0.0;

k3d/share/shaders/k3d_hdr_surface.sl:66:			Ct = texture(envname,s,t,"blur",blur);

k3d/share/shaders/k3d_hdr_surface.sl:70:	float exposure = pow(2,exposure_compensation_stops);

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

k3d/share/shaders/k3d_hexatile_bump.sl:2:* FGHexaTile_bump.sl -- "Simple shader to do "Hexagon" displacement"
k3d/share/shaders/k3d_hexatile_bump.sl:5:* A simple bump shader that tile a "Hexagon" pattern
k3d/share/shaders/k3d_hexatile_bump.sl:9:* 	string Name 	= "FGHexaTile_bump"	---	Name of the shader "do nothing".
k3d/share/shaders/k3d_hexatile_bump.sl:11:*	float Edge2	=.5 			---	Maxvalue of Edge.
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:19:*	float mx[16] = {1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1}  --- 16 float for scale,rotate,translate.
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:56:/* Hexagon code */
k3d/share/shaders/k3d_hexatile_bump.sl:57:if ((hexagon != 0) && abs(mod(stestcell, 2)) < 1)
k3d/share/shaders/k3d_hexatile_bump.sl:78:displacement k3d_hexatile_bump (
k3d/share/shaders/k3d_hexatile_bump.sl:79:	string Name 	= "FGHexaTile_bump";
k3d/share/shaders/k3d_hexatile_bump.sl:89:	float mx[16] = {1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1}; 
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_hexatile_bump.sl:108:/*** ----- Exponential "sqrt(float X)" ----- ***/
k3d/share/shaders/k3d_hexatile_bump.sl:114:/*** ----- Exponential "sqrt(float X)" ----- ***/
k3d/share/shaders/k3d_hexatile_bump.sl:124:	extern point P;
k3d/share/shaders/k3d_hexatile_bump.sl:126:	vector Ndisp = dir * (amp / max(spacescale,1e-6));
k3d/share/shaders/k3d_hextile.sl:2: * hextile.sl -- surface shader for hexagonal tiles in st space
k3d/share/shaders/k3d_hextile.sl:6: *    hexagonal tiles, similar to that found as floor patterns in public
k3d/share/shaders/k3d_hextile.sl:8: *       The basic pattern is a hexagonal tiling, with a little bit of
k3d/share/shaders/k3d_hextile.sl:40:#define snoise(x) (2*noise(x)-1)
k3d/share/shaders/k3d_hextile.sl:41:#define snoise2(x,y) (2*noise((x),(y))-1)
k3d/share/shaders/k3d_hextile.sl:45:k3d_hextile (float Ka = .5;
k3d/share/shaders/k3d_hextile.sl:66:  float x, y;
k3d/share/shaders/k3d_hextile.sl:68:  float swidth, twidth, sfuzz, tfuzz, fuzzmax;
k3d/share/shaders/k3d_hextile.sl:70:  float tileindex;
k3d/share/shaders/k3d_hextile.sl:74:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_hextile.sl:79:  fuzzmax = max (sfuzz, tfuzz);
k3d/share/shaders/k3d_hextile.sl:96:      x = tilewidth/2 - abs (ss - tilewidth/2);
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:109:  tileindex = stile+41*ttile;
k3d/share/shaders/k3d_hextile.sl:110:  Ctile = tilecolor * (1 + tilevary * snoise(tileindex+0.5));
k3d/share/shaders/k3d_hextile.sl:118:  Ct = (1-stain) * mix (mix (Ctile, scuffcolor, scuff), mortarcolor, mortar);
k3d/share/shaders/k3d_imagelayerclouds.sl:2:#define snoise(x) ((2 * noise(x)) - 1)
k3d/share/shaders/k3d_imagelayerclouds.sl:5:surface k3d_imagelayerclouds(float txtscale = 1;
k3d/share/shaders/k3d_imagelayerclouds.sl:16://  PP = txtscale * transform ("shader", P);
k3d/share/shaders/k3d_imagelayerclouds.sl:17:  PP = txtscale * point(s, t, s);
k3d/share/shaders/k3d_imagelayerclouds.sl:33:  Ct = mix(skycolor, cloudcolor, smoothstep(threshold, 1, value));
k3d/share/shaders/k3d_imagelayergradient.sl:10:      Ci = Cs * mix(zenith, sky, v * 2.0);
k3d/share/shaders/k3d_imagelayergradient.sl:14:      Ci = Cs * mix(ground, nadir, (v - 0.5) * 2.0);
k3d/share/shaders/k3d_incandplastic.sl:2: * Felipe Esquivel <felipe@siggraph.org.mx>

k3d/share/shaders/k3d_indirect.sl:7: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_indirect.sl:8: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_indirect.sl:22:  /* Exploit the fact that PRMan (incorrectly) leaves the surface normal
k3d/share/shaders/k3d_indirect.sl:25:  vector axis = normalize(N);
k3d/share/shaders/k3d_indirect.sl:26:  solar(-axis, 0)
k3d/share/shaders/k3d_indirect.sl:28:    Cl = rs_indirect(Ps, axis);
k3d/share/shaders/k3d_leather.sl:2: * JexSkin.sl

k3d/share/shaders/k3d_leather.sl:13: * 	old-autor jmerritt@warpax.com   :-)

k3d/share/shaders/k3d_leather.sl:36:	float txtscale = .05;     	/* Ugly kludge (see above...)    */

k3d/share/shaders/k3d_leather.sl:78:	#define BASE_NOISE_AMP   0.2    /* small noise color mix amplitude */

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

k3d/share/shaders/k3d_leather.sl:88:	small_noise = snoise(BASE_NF*PP*txtscale/TSCALE);

k3d/share/shaders/k3d_leather.sl:89:	small_speckle = mix(red, green, BASE_GRC+

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

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

k3d/share/shaders/k3d_leather.sl:138:	            noise(SPECK_NF*PP*txtscale/TSCALE)), 3);

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

k3d/share/shaders/k3d_leather.sl:157:	cs = mix(cs, brown, speck);

k3d/share/shaders/k3d_leather.sl:158:	cs = mix(cs, black, blackness);

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

k3d/share/shaders/k3d_leather.sl:176:	              DISP_TF*t + label) * DISP_DENT_AMP * txtscale / TSCALE;

k3d/share/shaders/k3d_leather.sl:177:	disp += small_noise * DISP_SMNOISE_AMP * txtscale / TSCALE;

k3d/share/shaders/k3d_leather.sl:178:	disp -= speck * DISP_SPECK_AMP * txtscale / TSCALE;

k3d/share/shaders/k3d_lensflare.sl:24: *   nspots - number of "spots" splayed out on the axis joining the
k3d/share/shaders/k3d_lensflare.sl:33: *   graphics.  Use this effect with extreme care!  
k3d/share/shaders/k3d_lensflare.sl:39: * Contacts:  lg@pixar.com
k3d/share/shaders/k3d_lensflare.sl:54:  return (xcomp(Pcorner1) - xcomp(Pcorner0)) / (ycomp(Pcorner1) -
k3d/share/shaders/k3d_lensflare.sl:70:rainbow(float x, dx)
k3d/share/shaders/k3d_lensflare.sl:79:  return filteredpulse(0, 1, x, dx) * spline(x, V, V, Ii, B, G, Y, O, R, R);
k3d/share/shaders/k3d_lensflare.sl:105:    extern uniform float nrand, seed;
k3d/share/shaders/k3d_lensflare.sl:136:    float angle = atan(ycomp(Lvec), xcomp(Lvec)) + PI;
k3d/share/shaders/k3d_lensflare.sl:146:	float radius = sqrt(brightness) * 5 * mix(.2, bloomradius, urand());
k3d/share/shaders/k3d_lensflare.sl:148:	bloom = mix(0.5, bloom, bloomstarry);
k3d/share/shaders/k3d_lensflare.sl:149:	bloom = mix(1, bloom, smoothstep(0, 0.5, dist / radius));
k3d/share/shaders/k3d_lensflare.sl:158:	  sqrt(brightness) * 5 * mix(.2, starburstradius, urand());
k3d/share/shaders/k3d_lensflare.sl:178:    vector axis = normalize(vector Plight);
k3d/share/shaders/k3d_lensflare.sl:183:	uniform float alongaxis = urand();
k3d/share/shaders/k3d_lensflare.sl:184:	point cntr = point(mix(-1.7, 1.7, alongaxis) * axis);
k3d/share/shaders/k3d_lensflare.sl:185:	float axisdist = distance(cntr, Pndc);
k3d/share/shaders/k3d_lensflare.sl:186:	float radius = mix(0.04, .1,
k3d/share/shaders/k3d_lensflare.sl:200:	    int = 1 - filterstep(radius, axisdist - dPndc / 2,
k3d/share/shaders/k3d_lensflare.sl:201:				 axisdist + dPndc / 2);
k3d/share/shaders/k3d_lensflare.sl:205:	    int = filteredpulse(radius, radius + 0.05 * axisdist,
k3d/share/shaders/k3d_lensflare.sl:206:				axisdist, dPndc);
k3d/share/shaders/k3d_lensflare.sl:210:	    int = 1 - smoothstep(0, radius, axisdist);
k3d/share/shaders/k3d_lensflare.sl:214:	    int = smoothstep(0, radius, axisdist) - filterstep(radius,
k3d/share/shaders/k3d_lensflare.sl:215:							       axisdist -
k3d/share/shaders/k3d_lensflare.sl:217:							       axisdist +
k3d/share/shaders/k3d_luna.sl:14: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_luna.sl:64:  radial_dist = sqrt(xcomp(PP) * xcomp(PP) + ycomp(PP) * ycomp(PP));
k3d/share/shaders/k3d_luna.sl:102:  vv = point(xcomp(PP) / radial_dist, 0, zcomp(PP) / radial_dist);
k3d/share/shaders/k3d_lunette.sl:25: *   maxOctaves, lunacrity, gain - work as in the fBm function
k3d/share/shaders/k3d_lunette.sl:29: *   noise functions and an box-filter antialiased grid 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:43: * dimensional fashion using the coordinates ss and tt as texture / pattern
k3d/share/shaders/k3d_lunette.sl:52: *                              respectively; expressed as a fraction of the
k3d/share/shaders/k3d_lunette.sl:59: *   maxOctaves - Maximum number of octaves for the fBm noise.
k3d/share/shaders/k3d_lunette.sl:62: *   colorBenhance - After the noise has been calculated, there exists the
k3d/share/shaders/k3d_lunette.sl:82:	uniform float maxOctaves;	/* maximum number of octives for the noise */
k3d/share/shaders/k3d_lunette.sl:106:	 * Find the base color for the pattern.  The base color is a mix
k3d/share/shaders/k3d_lunette.sl:107:	 * between colorA and colorB, created using noise and other mixing
k3d/share/shaders/k3d_lunette.sl:114:		noisePt, noisefilterwidth, maxOctaves, lunacrity, gain
k3d/share/shaders/k3d_lunette.sl:117:	color basecolor = mix(colorB, colorA, noiseamt);
k3d/share/shaders/k3d_lunette.sl:122:	color linecolor = mix(basecolor, baselinecolor, gridDensity);
k3d/share/shaders/k3d_lunette.sl:125:	 * return the mix between the base grid and the colorful noise
k3d/share/shaders/k3d_lunette.sl:127:	return mix(basecolor, linecolor, pulsegrid);
k3d/share/shaders/k3d_lunette.sl:152:	float maxOctaves = 5;
k3d/share/shaders/k3d_lunette.sl:161:		colorA, colorB, noiseScale, noiseRandom, maxOctaves,
k3d/share/shaders/k3d_map_pattern_1.sl:9:float txtscale=1; 
k3d/share/shaders/k3d_map_pattern_1.sl:22:/** Texture_Brick_1 **/
k3d/share/shaders/k3d_map_pattern_1.sl:36:temt_c1=texture(map1,temp_ss1,temp_tt1,"swidth",swidth1,"twidth",twidth1,"samples",samples1);
k3d/share/shaders/k3d_map_pattern_1.sl:40:temt_c1=texture(map1[channel1],temp_ss1,temp_tt1,"swidth",swidth1,"twidth",twidth1,"samples",samples1);
k3d/share/shaders/k3d_map_pattern_1.sl:51:PP = txtscale * transform ("shader", P);
k3d/share/shaders/k3d_map_pattern_1.sl:54:PQ = point (xcomp(PP)*8, ycomp(PP)*8, zcomp(PP));
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:65:Ct = mix (lightwood, darkwood, r*r2*r2);
k3d/share/shaders/k3d_map_pattern_1.sl:70:Ci = mix (C_temp1, Ct, 0.5);
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_matte.sl:6: * RenderMan (R) is a registered trademark of Pixar.
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_metal.sl:6: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_mondometal.sl:2: * felipe@siggraph.org.mx

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

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

k3d/share/shaders/k3d_mondometal.sl:57:    extern vector I;

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

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

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

k3d/share/shaders/k3d_mondometal.sl:73:        Csurf = Cs * color texture(abColorMap, ss, tt,

k3d/share/shaders/k3d_mondometal.sl:78:            Copac = float texture(abColorMap[3], ss, tt, 

k3d/share/shaders/k3d_mondometal.sl:98:        diff = abDiffuse * float texture(abDiffuseMap, ss, tt, 

k3d/share/shaders/k3d_mondometal.sl:110:        spec = abSpecular * float texture(abSpecularMap, ss, tt, 

k3d/share/shaders/k3d_mondometal.sl:123:        Cspec = abSpecularColor * color texture(abSpecularColorMap, ss, tt,

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

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

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

k3d/share/shaders/k3d_mondometal.sl:163:        Cincand = abIncandescence * color texture(abIncandescenseMap, ss, tt,

k3d/share/shaders/k3d_mondometal.sl:176:        bmp = abBumpScale * float texture( abBumpMap, ss, tt,

k3d/share/shaders/k3d_mondometal.sl:209:            D = vector(-zcomp(D), xcomp(D), ycomp(D));

k3d/share/shaders/k3d_mondometal.sl:219:    /* Averiguamos si la textura es metlica o no */

k3d/share/shaders/k3d_mondometal.sl:222:        Cmatte = color texture(metalMatte, ss, tt,

k3d/share/shaders/k3d_mondometal.sl:232:    /* Textura normal de Mondo*/

k3d/share/shaders/k3d_mondometal.sl:237:    /* Textura metlica */

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:18: *    txtscale - overall scaling factor

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

k3d/share/shaders/k3d_mysky.sl:47:#define snoise(x) ((2*noise(x))-1)

k3d/share/shaders/k3d_mysky.sl:52:	     float txtscale = 1;

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

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

k3d/share/shaders/k3d_noisysmoke.sl:90:	    1 - color(exp(comp(scat, 0)), exp(comp(scat, 1)),
k3d/share/shaders/k3d_noisysmoke.sl:91:		      exp(comp(scat, 2)));
k3d/share/shaders/k3d_noisysmoke.sl:98:	  ss = max(min(ss, end - d), 0.005);
k3d/share/shaders/k3d_oak.sl:4: * Description: makes procedural solid texture that looks very much like
k3d/share/shaders/k3d_oak.sl:5: *    wood grain.  The rings surround the z axis, so to position the
k3d/share/shaders/k3d_oak.sl: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:25: *       the z axis.
k3d/share/shaders/k3d_oak.sl:39: * Contacts:  lg@pixar.com
k3d/share/shaders/k3d_oak.sl:73:    oaktexture(Pshad, dPshad, ringfreq, ringunevenness, grainfreq, ringnoise,
k3d/share/shaders/k3d_oak.sl:76:  color Cwood = mix(Clightwood, Cdarkwood, wood);
k3d/share/shaders/k3d_oakplank.sl:5: *    are projected onto the x-y plane, with the length aligned with
k3d/share/shaders/k3d_oakplank.sl:6: *    the y axis.  The subpattern within each individual plank is just
k3d/share/shaders/k3d_oakplank.sl:7: *    a shifted version of the oaktexture function from oak.h.
k3d/share/shaders/k3d_oakplank.sl: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:32: *       the z axis.
k3d/share/shaders/k3d_oakplank.sl:50: * Contacts:  lg@pixar.com
k3d/share/shaders/k3d_oakplank.sl:71:/* Given 2-D texture coordinates ss,tt, filter widths ds, dt, and the
k3d/share/shaders/k3d_oakplank.sl:73: * (integer indexed) plank we are on and what coordinates within our
k3d/share/shaders/k3d_oakplank.sl:124:  float ss = xcomp(Pshad), tt = ycomp(Pshad), height = zcomp(Pshad);
k3d/share/shaders/k3d_oakplank.sl:135:  float plankindex = swhichplank + 13 * twhichplank;
k3d/share/shaders/k3d_oakplank.sl:141:  float wood = oaktexture(Ppat, dPshad, ringfreq, ringunevenness, grainfreq,
k3d/share/shaders/k3d_oakplank.sl:145:  color Cwood = mix(Clightwood, Cdarkwood, wood);
k3d/share/shaders/k3d_oakplank.sl:147:  Cwood = varyEach(Cwood, plankindex, varyhue, varysat, varylum);
k3d/share/shaders/k3d_oakplank.sl:148:  Cwood = mix(Cgroove, Cwood, inplank);
k3d/share/shaders/k3d_orange.sl:38:	setxcomp (p2, sin (2 * PI * s));
k3d/share/shaders/k3d_orennayar.sl:11: *   Lambertian (isotropic) BRDF is a simple approximation, but not
k3d/share/shaders/k3d_orennayar.sl:31: *   2. Examination of why rough surfaces are not Lambertian will lead
k3d/share/shaders/k3d_orennayar.sl:63:	alpha = max (theta_i, theta_r);
k3d/share/shaders/k3d_outlet.sl:33:  float x, y;
k3d/share/shaders/k3d_outlet.sl:43:  x = abs (u - 0.5);
k3d/share/shaders/k3d_outlet.sl:46:  if ((x*x + (y-1)*(y-1)) < 0.0025) {
k3d/share/shaders/k3d_outlet.sl:51:  else if (x > 0.08  &&  x < 0.14  &&
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_painted_constant.sl:2:	string texturename = "";
k3d/share/shaders/k3d_painted_constant.sl:12:	if(texturename != "")
k3d/share/shaders/k3d_painted_constant.sl:14:			float ss = mix(s0, s1, s);
k3d/share/shaders/k3d_painted_constant.sl:15:			float tt = mix(t0, t1, t);
k3d/share/shaders/k3d_painted_constant.sl:17:			Ct = color texture(texturename, ss, tt);
k3d/share/shaders/k3d_painted_constant.sl:18:			Ot = float texture(texturename[3], ss, tt);
k3d/share/shaders/k3d_paintedplastic.sl:1:/* paintedplastic.sl - Standard texture map surface for RenderMan Interface.
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:6: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_paintedplastic.sl:9: *    Apply a texture map to a plastic surface, indexing the texture
k3d/share/shaders/k3d_paintedplastic.sl:14: *    texturename - the name of the texture file.
k3d/share/shaders/k3d_paintedplastic.sl:24:	string texturename = "";
k3d/share/shaders/k3d_paintedplastic.sl:34:	if(texturename != "")
k3d/share/shaders/k3d_paintedplastic.sl:36:			float ss = mix(s0, s1, s);
k3d/share/shaders/k3d_paintedplastic.sl:37:			float tt = mix(t0, t1, t);
k3d/share/shaders/k3d_paintedplastic.sl:39:			Ct = color texture(texturename, ss, tt);
k3d/share/shaders/k3d_paintedplastic.sl:40:			Ot = float texture(texturename[3], ss, tt);
k3d/share/shaders/k3d_parquet_plank.sl:5: *   Makes texture of wooden planks in s-t space.  This wood looks rather
k3d/share/shaders/k3d_parquet_plank.sl:12: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_parquet_plank.sl:34:			  float txtscale = 1;
k3d/share/shaders/k3d_parquet_plank.sl:43:#define snoise(x) (2 * noise((x)) - 1)
k3d/share/shaders/k3d_parquet_plank.sl:44:#define boxstep(a,b,x) (clamp(((x)-(a))/((b)-(a)),0,1))
k3d/share/shaders/k3d_parquet_plank.sl:62:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_parquet_plank.sl:64:    (max(abs(Du(s) * du) + abs(Dv(s) * dv), MINFILTERWIDTH) / PGWIDTH) *
k3d/share/shaders/k3d_parquet_plank.sl:65:    txtscale;
k3d/share/shaders/k3d_parquet_plank.sl:67:    (max(abs(Du(t) * du) + abs(Dv(t) * dv), MINFILTERWIDTH) / PGHEIGHT) *
k3d/share/shaders/k3d_parquet_plank.sl:68:    txtscale;
k3d/share/shaders/k3d_parquet_plank.sl:69:  fwidth = max(swidth, twidth);
k3d/share/shaders/k3d_parquet_plank.sl:73:  ss = (txtscale * s) / PGWIDTH;
k3d/share/shaders/k3d_parquet_plank.sl:75:  tt = (txtscale * t) / PGHEIGHT;
k3d/share/shaders/k3d_parquet_plank.sl:79:      ss = txtscale * t / PGWIDTH;
k3d/share/shaders/k3d_parquet_plank.sl:81:      tt = txtscale * s / PGHEIGHT;
k3d/share/shaders/k3d_parquet_plank.sl:100:      clamp(boxstep(GWF - swidth, GWF, ss), max(1 - GWF / swidth, 0),
k3d/share/shaders/k3d_parquet_plank.sl:101:	    1) - clamp(boxstep(1 - GWF - swidth, 1 - GWF, ss), 0,
k3d/share/shaders/k3d_parquet_plank.sl:107:      clamp(boxstep(GHF - twidth, GHF, tt), max(1 - GHF / twidth, 0),
k3d/share/shaders/k3d_parquet_plank.sl:108:	    1) - clamp(boxstep(1 - GHF - twidth, 1 - GHF, tt), 0,
k3d/share/shaders/k3d_parquet_plank.sl:147:  /* Mix the light and dark wood according to the grain pattern */
k3d/share/shaders/k3d_parquet_plank.sl:148:  woodcolor = mix(lightwood, darkwood, r);
k3d/share/shaders/k3d_parquet_plank.sl:154:  Ct = mix(groovecolor, woodcolor, groovy);
k3d/share/shaders/k3d_parquet_plank2.sl:6: *   Makes texture of wooden planks in s-t space.  This wood looks rather
k3d/share/shaders/k3d_parquet_plank2.sl:13: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_parquet_plank2.sl:48:	       float txtscale = 1;
k3d/share/shaders/k3d_parquet_plank2.sl:57:#define snoise(x) (2 * noise((x)) - 1)
k3d/share/shaders/k3d_parquet_plank2.sl:58:#define boxstep(a,b,x) (clamp(((x)-(a))/((b)-(a)),0,1))
k3d/share/shaders/k3d_parquet_plank2.sl:76:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_parquet_plank2.sl:77:  swidth = (max (abs(Du(s)*du) + abs(Dv(s)*dv), MINFILTERWIDTH) / PGWIDTH) * txtscale;
k3d/share/shaders/k3d_parquet_plank2.sl:78:  twidth = (max (abs(Du(t)*du) + abs(Dv(t)*dv), MINFILTERWIDTH) / PGHEIGHT) * txtscale;
k3d/share/shaders/k3d_parquet_plank2.sl:79:  fwidth = max(swidth,twidth);
k3d/share/shaders/k3d_parquet_plank2.sl:83:  ss = (txtscale * s) / PGWIDTH;
k3d/share/shaders/k3d_parquet_plank2.sl:85:  tt = (txtscale * t) / PGHEIGHT;
k3d/share/shaders/k3d_parquet_plank2.sl:88:      ss = txtscale * t / PGWIDTH;
k3d/share/shaders/k3d_parquet_plank2.sl:90:      tt = txtscale * s / PGHEIGHT;
k3d/share/shaders/k3d_parquet_plank2.sl:105:  else w = clamp (boxstep(GWF-swidth,GWF,ss), max(1-GWF/swidth,0), 1)
k3d/share/shaders/k3d_parquet_plank2.sl:106:	 - clamp (boxstep(1-GWF-swidth,1-GWF,ss), 0, 2*GWF/swidth);
k3d/share/shaders/k3d_parquet_plank2.sl:109:  else h = clamp (boxstep(GHF-twidth,GHF,tt), max(1-GHF/twidth,0),1)
k3d/share/shaders/k3d_parquet_plank2.sl:110:	 - clamp (boxstep(1-GHF-twidth,1-GHF,tt), 0, 2*GHF/twidth);
k3d/share/shaders/k3d_parquet_plank2.sl:143:  /* Mix the light and dark wood according to the grain pattern */
k3d/share/shaders/k3d_parquet_plank2.sl:144:  woodcolor = mix (lightwood, darkwood, r);
k3d/share/shaders/k3d_parquet_plank2.sl:149:  Ct = mix (groovecolor, woodcolor, groovy);
k3d/share/shaders/k3d_parquet_tile.sl:7: *   Makes texture of wooden planks in s-t space.  This wood looks rather
k3d/share/shaders/k3d_parquet_tile.sl:14: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_parquet_tile.sl:63:	       float txtscale = 1;
k3d/share/shaders/k3d_parquet_tile.sl:72:#define snoise(x) (2 * noise((x)) - 1)
k3d/share/shaders/k3d_parquet_tile.sl:73:#define boxstep(a,b,x) (clamp(((x)-(a))/((b)-(a)),0,1))
k3d/share/shaders/k3d_parquet_tile.sl:91:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_parquet_tile.sl:92:  swidth = (max (abs(Du(s)*du) + abs(Dv(s)*dv), MINFILTERWIDTH) / PGWIDTH) * txtscale;
k3d/share/shaders/k3d_parquet_tile.sl:93:  twidth = (max (abs(Du(t)*du) + abs(Dv(t)*dv), MINFILTERWIDTH) / PGHEIGHT) * txtscale;
k3d/share/shaders/k3d_parquet_tile.sl:94:  fwidth = max(swidth,twidth);
k3d/share/shaders/k3d_parquet_tile.sl:98:  ss = (txtscale * s) / PGWIDTH;
k3d/share/shaders/k3d_parquet_tile.sl:100:  tt = (txtscale * t) / PGHEIGHT;
k3d/share/shaders/k3d_parquet_tile.sl:103:      ss = txtscale * t / PGWIDTH;
k3d/share/shaders/k3d_parquet_tile.sl:105:      tt = txtscale * s / PGHEIGHT;
k3d/share/shaders/k3d_parquet_tile.sl:120:  else w = clamp (boxstep(GWF-swidth,GWF,ss), max(1-GWF/swidth,0), 1)
k3d/share/shaders/k3d_parquet_tile.sl:121:	 - clamp (boxstep(1-GWF-swidth,1-GWF,ss), 0, 2*GWF/swidth);
k3d/share/shaders/k3d_parquet_tile.sl:124:  else h = clamp (boxstep(GHF-twidth,GHF,tt), max(1-GHF/twidth,0),1)
k3d/share/shaders/k3d_parquet_tile.sl:125:	 - clamp (boxstep(1-GHF-twidth,1-GHF,tt), 0, 2*GHF/twidth);
k3d/share/shaders/k3d_parquet_tile.sl:158:  /* Mix the light and dark wood according to the grain pattern */
k3d/share/shaders/k3d_parquet_tile.sl:159:  woodcolor = mix (lightwood, darkwood, r);
k3d/share/shaders/k3d_parquet_tile.sl:164:  Ct = mix (groovecolor, woodcolor, groovy);
k3d/share/shaders/k3d_planetclouds.sl:15: *    distortionscale - controls the amount of texture distortion
k3d/share/shaders/k3d_planetclouds.sl:36: *      represented by a unit sphere.  The texture space and/or parameters
k3d/share/shaders/k3d_planetclouds.sl:45: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_planetclouds.sl:50: *    ???? - original texture developed by Ken Musgrave.
k3d/share/shaders/k3d_planetclouds.sl:59:#define snoise(x) ((2*noise(x))-1)
k3d/share/shaders/k3d_planetclouds.sl:76:  /* Transform to texture coordinates */
k3d/share/shaders/k3d_plank.sl:5: *   Makes texture of wooden planks in s-t space.  This wood looks rather
k3d/share/shaders/k3d_plank.sl:10: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_plank.sl:32:		  float txtscale = 1;
k3d/share/shaders/k3d_plank.sl:40:#define snoise(x) (2 * (float noise((x))) - 1)
k3d/share/shaders/k3d_plank.sl:41:#define boxstep(a,b,x) (clamp(((x)-(a))/((b)-(a)),0,1))
k3d/share/shaders/k3d_plank.sl:57:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_plank.sl:59:    max(abs(Du(s) * du) + abs(Dv(s) * dv),
k3d/share/shaders/k3d_plank.sl:60:	MINFILTERWIDTH) / PGWIDTH * txtscale;
k3d/share/shaders/k3d_plank.sl:62:    max(abs(Du(t) * du) + abs(Dv(t) * dv),
k3d/share/shaders/k3d_plank.sl:63:	MINFILTERWIDTH) / PGHEIGHT * txtscale;
k3d/share/shaders/k3d_plank.sl:64:  fwidth = max(swidth, twidth);
k3d/share/shaders/k3d_plank.sl:68:  ss = txtscale * s / PGWIDTH;
k3d/share/shaders/k3d_plank.sl:72:  tt = (txtscale * t / PGHEIGHT) + 10 * snoise(0.5 + whichrow);
k3d/share/shaders/k3d_plank.sl:86:      clamp(boxstep(GWF - swidth, GWF, ss), max(1 - GWF / swidth, 0),
k3d/share/shaders/k3d_plank.sl:87:	    1) - clamp(boxstep(1 - GWF - swidth, 1 - GWF, ss), 0,
k3d/share/shaders/k3d_plank.sl:93:      clamp(boxstep(GHF - twidth, GHF, tt), max(1 - GHF / twidth, 0),
k3d/share/shaders/k3d_plank.sl:94:	    1) - clamp(boxstep(1 - GHF - twidth, 1 - GHF, tt), 0,
k3d/share/shaders/k3d_plank.sl:133:  /* Mix the light and dark wood according to the grain pattern */
k3d/share/shaders/k3d_plank.sl:134:  woodcolor = mix(lightwood, darkwood, r);
k3d/share/shaders/k3d_plank.sl: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_plastic.sl:6: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_plastic2.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
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:6: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_projectionmap_plastic.sl:30:	string texturename = "";
k3d/share/shaders/k3d_projectionmap_plastic.sl:35:	vector axis = vector(0, 0, 1);
k3d/share/shaders/k3d_projectionmap_plastic.sl:36:	float xfreq = 1.0;
k3d/share/shaders/k3d_projectionmap_plastic.sl:38:	float xoffset = 0.0;
k3d/share/shaders/k3d_projectionmap_plastic.sl:45:	if(texturename != "")
k3d/share/shaders/k3d_projectionmap_plastic.sl:49:			float x = xfreq * (xcomp(Pshad) - xoffset + 0.5);
k3d/share/shaders/k3d_projectionmap_plastic.sl:52:			float ss = mix(s0, s1, x);
k3d/share/shaders/k3d_projectionmap_plastic.sl:53:			float tt = mix(t1, t0, y);
k3d/share/shaders/k3d_projectionmap_plastic.sl:55:			Ct = color texture(texturename, ss, tt);
k3d/share/shaders/k3d_projectionmap_plastic.sl:56:			Ot = float texture(texturename[3], ss, tt);
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:16: *    txtscale - overall scaling factor
k3d/share/shaders/k3d_puffyclouds.sl:30: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_puffyclouds.sl:44:#define snoise(x) ((2*noise(x))-1)
k3d/share/shaders/k3d_puffyclouds.sl:49:	     float txtscale = 1;
k3d/share/shaders/k3d_puffyclouds.sl:61:  PP = txtscale * transform ("shader", P);
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:13: * texture parameter running equatorialy around them (like latitude
k3d/share/shaders/k3d_redapple.sl:18: * Look out for the "txtscale" parameter: some noise calculations are
k3d/share/shaders/k3d_redapple.sl:21: * different size apples, make sure to change txtscale appropriately.
k3d/share/shaders/k3d_redapple.sl:25: * pictures, job offers at Pixar, etc... to:  jmerritt@SpamSucks_warpax.com   :-)
k3d/share/shaders/k3d_redapple.sl:39:#define snoise(x) (2*noise(x)-1)  /* 1-D signed noise */
k3d/share/shaders/k3d_redapple.sl:55:	float txtscale = .05;     /* Ugly kludge (see above...)    */
k3d/share/shaders/k3d_redapple.sl:102:	#define BASE_NOISE_AMP   0.2    /* small noise color mix amplitude */
k3d/share/shaders/k3d_redapple.sl:106:	#define T3               0.8    /* T2->T3 => red can exist here    */
k3d/share/shaders/k3d_redapple.sl:112:	small_noise = snoise(BASE_NF*PP*txtscale/TSCALE);
k3d/share/shaders/k3d_redapple.sl:113:	small_speckle = mix(red, green, BASE_GRC+
k3d/share/shaders/k3d_redapple.sl:131:	 * The blotch color is finally determined by mixing,
k3d/share/shaders/k3d_redapple.sl:153:	 * The apple has brown speckles on it, set by mixing
k3d/share/shaders/k3d_redapple.sl:162:	            noise(SPECK_NF*PP*txtscale/TSCALE)), 3);
k3d/share/shaders/k3d_redapple.sl:180:	cs = mix(base_color, dred, blotch);
k3d/share/shaders/k3d_redapple.sl:181:	cs = mix(cs, brown, speck);
k3d/share/shaders/k3d_redapple.sl:182:	cs = mix(cs, black, blackness);
k3d/share/shaders/k3d_redapple.sl:188:	 * Here we set the surface normal to fix up the specular
k3d/share/shaders/k3d_redapple.sl:200:	              DISP_TF*t + label) * DISP_DENT_AMP * txtscale / TSCALE;
k3d/share/shaders/k3d_redapple.sl:201:	disp += small_noise * DISP_SMNOISE_AMP * txtscale / TSCALE;
k3d/share/shaders/k3d_redapple.sl:202:	disp -= speck * DISP_SPECK_AMP * txtscale / TSCALE;
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:12:#define snoise(x) (2.5*(noise(x)-0.5))

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

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:58:          		result += signal * exponent;

k3d/share/shaders/k3d_roughmetal.sl:12: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_roughmetal.sl:13: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_round.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_round.sl:7: * next to another patch at a right angle, the edge will be rounded.
k3d/share/shaders/k3d_rubber.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_rubber.sl:13:		txtscale	= 1.5 )
k3d/share/shaders/k3d_rubber.sl:19:	/* Mix in some white dust. */
k3d/share/shaders/k3d_rubber.sl:20:	cout = mix(Cs, white, .05* (float noise(txtscale*Ploc)));
k3d/share/shaders/k3d_ruledpaper.sl:6: *   the margin, binder holes and writing (as an image texture).
k3d/share/shaders/k3d_ruledpaper.sl:12: *   texturename - name of image to map onto paper (optional)
k3d/share/shaders/k3d_ruledpaper.sl:18: *         email: darkmoon@SpamSucks_connexus.apana.org.au
k3d/share/shaders/k3d_ruledpaper.sl:23: *   15 Nov 1997 - translated to Renderman SL in Linux
k3d/share/shaders/k3d_ruledpaper.sl:37: *   patch 21x29.7 units or at least with an approximate aspect ratio. 
k3d/share/shaders/k3d_ruledpaper.sl:46:	string texturename = "";
k3d/share/shaders/k3d_ruledpaper.sl:72:	// Bounding box for circles
k3d/share/shaders/k3d_ruledpaper.sl:77:// Fancy macro checks ss/tt coords against bounding box and [if inside]
k3d/share/shaders/k3d_ruledpaper.sl:90:    color tex;
k3d/share/shaders/k3d_ruledpaper.sl:97:	// Check if there's a texture given.
k3d/share/shaders/k3d_ruledpaper.sl:100:	if (texturename != "")
k3d/share/shaders/k3d_ruledpaper.sl:101:		tex = color texture(texturename);
k3d/share/shaders/k3d_ruledpaper.sl:103:		tex = Cs; // Colour of paper
k3d/share/shaders/k3d_ruledpaper.sl:109:		tex = (tex*(1-linestr)) + (color(0.2,0.8,0.8) * linestr);
k3d/share/shaders/k3d_ruledpaper.sl:113:	// Bounding box for circle calcs
k3d/share/shaders/k3d_ruledpaper.sl:121:		// Find bounding boxes first to speed up calcs
k3d/share/shaders/k3d_ruledpaper.sl:137:			Ci = Oi * (tex * (Ka * ambient() + Kd * diffuse(Nf)) + 
k3d/share/shaders/k3d_ruledpaper.sl:141:			Ci = Oi * tex * (Ka * ambient() + Kd * diffuse(Nf));
k3d/share/shaders/k3d_rustymetal.sl:14: *   txtscale - overall scaling factor of the rust pattern.
k3d/share/shaders/k3d_rustymetal.sl:35:#define snoise(x) (2*noise(x)-1)
k3d/share/shaders/k3d_rustymetal.sl:37:/* Maximum number of octaves */
k3d/share/shaders/k3d_rustymetal.sl:47:	    float txtscale = 1;
k3d/share/shaders/k3d_rustymetal.sl:64:  PP = txtscale * transform ("shader", P);
k3d/share/shaders/k3d_rustymetal.sl:101:  Ci = Oi * mix (Cmetal, Crust, rustiness);
k3d/share/shaders/k3d_saturn.sl:17: *    lat_scale,  map_exp - control scaling of 
k3d/share/shaders/k3d_saturn.sl:47:	  float map_exp = 0;)
k3d/share/shaders/k3d_saturn.sl:53:  point Ptexture;
k3d/share/shaders/k3d_saturn.sl:56:  Ptexture = transform ("shader", P);
k3d/share/shaders/k3d_saturn.sl:57:  PtN = normalize (Ptexture);      /* Version of Ptexture with radius 1 */
k3d/share/shaders/k3d_saturn.sl:66:  if (map_exp > 0)
k3d/share/shaders/k3d_saturn.sl:67:       latitude = lat_scale * pow(latitude,map_exp);
k3d/share/shaders/k3d_saturnring.sl:26:#define RING2 0.77    /* Relative spacing for next outermost ring */    
k3d/share/shaders/k3d_saturnring.sl:33:#define snoise(x) (2 * noise(x) - 1)	
k3d/share/shaders/k3d_saturnring.sl:36:#define snoise(x) (2.5 * (noise(x) - 1))
k3d/share/shaders/k3d_scartissue.sl:29:	base = mix(dark,light,nz);
k3d/share/shaders/k3d_screen.sl:2: * (c) Pixar (appears in _RenderMan Companion_)
k3d/share/shaders/k3d_screen.sl:19: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_screen.sl:20: * RenderMan (R) is a registered trademark of Pixar.
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:21: *     Copyright 1988, 1989, Pixar.  All rights reserved.
k3d/share/shaders/k3d_screen_aa.sl:22: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_screen_aa.sl:25:#define boxstep(a,b,x) (clamp(((x)-(a))/((b)-(a)),0,1))
k3d/share/shaders/k3d_screen_aa.sl:44:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_screen_aa.sl:45:  swidth = max(abs(Du(s) * du) + abs(Dv(s) * dv), MINFILTERWIDTH) * frequency;
k3d/share/shaders/k3d_screen_aa.sl:46:  twidth = max(abs(Du(t) * du) + abs(Dv(t) * dv), MINFILTERWIDTH) * frequency;
k3d/share/shaders/k3d_screen_aa.sl:58:      clamp(boxstep(GWF - swidth, GWF, ss), max(1 - GWF / swidth, 0),
k3d/share/shaders/k3d_screen_aa.sl:59:	    1) - clamp(boxstep(1 - GWF - swidth, 1 - GWF, ss), 0,
k3d/share/shaders/k3d_screen_aa.sl:65:      clamp(boxstep(GWF - twidth, GWF, tt), max(1 - GWF / twidth, 0),
k3d/share/shaders/k3d_screen_aa.sl:66:	    1) - clamp(boxstep(1 - GWF - twidth, 1 - GWF, tt), 0,
k3d/share/shaders/k3d_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:9:k3d_sdixon(
k3d/share/shaders/k3d_sdixon.sl:16:	string	texturename	= "")
k3d/share/shaders/k3d_sdixon.sl:23:	/* This shader uses a single-channel texture map to apply a 
k3d/share/shaders/k3d_sdixon.sl:26:	/* Get the amount of ink from texture file. */
k3d/share/shaders/k3d_sdixon.sl:27:	ink = texture(texturename, s, t);
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_shadowspot.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_shifteddrtile.sl:43:#define isOdd(x) \
k3d/share/shaders/k3d_shifteddrtile.sl:44:	((mod(x,2) == 1) ? 1 : 0)
k3d/share/shaders/k3d_shifteddrtile.sl:63:	float mix_opacity; /* How much to mix between the surfaces */
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:38:#define isOdd(x) \
k3d/share/shaders/k3d_shiftedmoontile.sl:39:	((mod(x,2) == 1) ? 1 : 0)
k3d/share/shaders/k3d_shiftedmoontile.sl:60:	float mix_opacity;       /* How much to mix between the surfaces */
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_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:7: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_shinymetal.sl:12:		       string texturename = "";)
k3d/share/shaders/k3d_shinymetal.sl:23:  if(texturename != "")
k3d/share/shaders/k3d_shinymetal.sl:24:    env = Kr * color environment(texturename, D);
k3d/share/shaders/k3d_shinyplastic.sl:8: *    ior - index of refraction (1.5 is a good estimate for most plastics)
k3d/share/shaders/k3d_show_st.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_show_st.sl:3:/* Listing 16.11  Shader mapping texture-space coordinates to colors */
k3d/share/shaders/k3d_skin1.sl:8: * without express or implied warranty. 
k3d/share/shaders/k3d_skin1.sl:25: * xdir, angle = control the direction of the specular highlights.
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:62:                         vector xdir;  float xroughness, yroughness;)
k3d/share/shaders/k3d_skin1.sl:64:    float sqr (float x) { return x*x; }
k3d/share/shaders/k3d_skin1.sl:67:    vector X = xdir / xroughness;
k3d/share/shaders/k3d_skin1.sl:68:    vector Y = (N ^ xdir) / yroughness;
k3d/share/shaders/k3d_skin1.sl:71:    extern point P;
k3d/share/shaders/k3d_skin1.sl:73:  /* Must declare extern L & Cl because we're in a function */
k3d/share/shaders/k3d_skin1.sl:74:  extern vector L;  extern color Cl; 
k3d/share/shaders/k3d_skin1.sl:82:    float rho = exp (-2 * (sqr(X.H) + sqr(Y.H)) / (1 + H.N))
k3d/share/shaders/k3d_skin1.sl:88:    return C / (4 * xroughness * yroughness);
k3d/share/shaders/k3d_skin1.sl:110:/* Compute a the single-scattering approximation to scattering from
k3d/share/shaders/k3d_skin1.sl:115:   equation to approximate overall scattering.
k3d/share/shaders/k3d_skin1.sl:122:    (1. - exp(-(1/win + 1/won) * thickness));
k3d/share/shaders/k3d_skin1.sl:139:  extern point P;
k3d/share/shaders/k3d_skin1.sl:182:  varying vector xdir = dPdu;
k3d/share/shaders/k3d_skin1.sl:186:  float xroughness = .3,
k3d/share/shaders/k3d_skin1.sl:202:  float maxfreq = 8;
k3d/share/shaders/k3d_skin1.sl:213:  for (f = 1; f< maxfreq; f *= 2)
k3d/share/shaders/k3d_skin1.sl:228:      Cskin = color texture(skinmap);
k3d/share/shaders/k3d_skin1.sl:231:      Csheen = color texture(sheenmap);
k3d/share/shaders/k3d_skin1.sl:240:  for (f = 1; f< maxfreq; f *= 2)
k3d/share/shaders/k3d_skin1.sl:268:      lo *= float texture (blemishmap);
k3d/share/shaders/k3d_skin1.sl:270:  sc = mix (sc,lc,lo);
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:277:  vector anisoDir = xdir;
k3d/share/shaders/k3d_skin1.sl:280:    matrix rot = rotate(matrix 1, radians(angle),Nf);
k3d/share/shaders/k3d_skin1.sl:283:  lc = LocIllumWardAnisotropic(Nf,Vf,anisoDir,xroughness,yroughness);
k3d/share/shaders/k3d_skin1.sl:286:      oilVal *= float texture(oilmap);
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:29:/* Compute a the single-scattering approximation to scattering from
k3d/share/shaders/k3d_skin2.sl:34:   equation to approximate overall scattering.
k3d/share/shaders/k3d_skin2.sl:41:		(1. - exp(-(1/win + 1/won) * thickness));
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:65:	extern point P;
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:38:		refl = mix (sky_horiz, sky_zenith, costheta);
k3d/share/shaders/k3d_skymetal.sl:40:		refl = mix (land_horiz, land_zenith, -costheta);
k3d/share/shaders/k3d_slateroof.sl:10:	darker than the next Parameters:
k3d/share/shaders/k3d_slateroof.sl:16: 	maxadd: the maximum amount of overlap of one tile and another
k3d/share/shaders/k3d_slateroof.sl:17: 	ramp: the amount of a tile used for the initial rise to the maximum height
k3d/share/shaders/k3d_slateroof.sl:19: 	gap: the size of the gap between one tile and the next in the s direction,
k3d/share/shaders/k3d_slateroof.sl:22: 	maxcolorvary: the maximum amount by which the color of a slate can vary from the 
k3d/share/shaders/k3d_slateroof.sl:24: 	txtscale: a scaling factor for the slate coloration - the larger txtscale the
k3d/share/shaders/k3d_slateroof.sl:52:				   		maxadd = .5,
k3d/share/shaders/k3d_slateroof.sl:55:							maxcolorvary = .2,
k3d/share/shaders/k3d_slateroof.sl:57:							txtscale = 1)
k3d/share/shaders/k3d_slateroof.sl:70:   float add, 										/* Add, between 0 and 1, hold the amount the current tile overlaps the next */
k3d/share/shaders/k3d_slateroof.sl:100:	 * normally the center, except in the short tiles which lie at the
k3d/share/shaders/k3d_slateroof.sl:109:		add = noise(cs * factor, ct * factor) * maxadd;
k3d/share/shaders/k3d_slateroof.sl:112:	ocolorvary = (noise(cs * colorfactor, ct * colorfactor) - 1) * 2 * maxcolorvary;
k3d/share/shaders/k3d_slateroof.sl:135:	if ((t_offset <= maxadd) && (ttile >= 1))
k3d/share/shaders/k3d_slateroof.sl:153:			newadd = noise(cs * factor, ct * factor) * maxadd;
k3d/share/shaders/k3d_slateroof.sl:154:			newcolorvary =  (noise(cs * colorfactor, ct * colorfactor) - 1) * 2 * maxcolorvary;
k3d/share/shaders/k3d_slateroof.sl:184:	ns = noise( s * txtscale * 59.8534 * sfreq, t * txtscale * 59.8534 * tfreq);
k3d/share/shaders/k3d_slateroofd.sl:9:    	Km: Maximum displacement of tiles;
k3d/share/shaders/k3d_slateroofd.sl:12: 		maxadd: the maximum amount of overlap of one tile and another
k3d/share/shaders/k3d_slateroofd.sl:13: 		ramp: the amount of a tile used for the initial rise to the maximum height
k3d/share/shaders/k3d_slateroofd.sl:15: 		gap: the size of the gap between one tile and the next in the s direction,
k3d/share/shaders/k3d_slateroofd.sl:26:		normal roof tiles would be. Each tile is expanded by a random amount in
k3d/share/shaders/k3d_slateroofd.sl:47:							maxadd = .5,
k3d/share/shaders/k3d_slateroofd.sl:62:   float add,	 									/* Add, between 0 and 1, hold the amount the current tile overlaps the next */
k3d/share/shaders/k3d_slateroofd.sl:71:   vector Ndisp = Nf * (1 / max(spacescale,1e-6));
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:100:   		add = noise(cs * factor, ct * factor) * maxadd;
k3d/share/shaders/k3d_slateroofd.sl:103: 		/* the very bottom row cannot expand */
k3d/share/shaders/k3d_slateroofd.sl:107:	/* the above adjusts t_offset so that it runs from 0 to 1 within the expanded tile */
k3d/share/shaders/k3d_slateroofd.sl:127:	if ((t_offset <= maxadd) && (ttile >= 1))
k3d/share/shaders/k3d_slateroofd.sl:145:			newadd = noise(cs * factor, ct * factor) * maxadd;
k3d/share/shaders/k3d_slateroofd.sl:171:			disp = max(dispo,disp);
k3d/share/shaders/k3d_slateroofd.sl:172:			/* taking the maximum of dispo, disp ensures that there
k3d/share/shaders/k3d_slateroofd.sl:176:	P += Nf * (disp / max(spacescale, 1e-6));
k3d/share/shaders/k3d_slideprojector.sl:47:	Ct = color texture(slidename, sloc, tloc);
k3d/share/shaders/k3d_smoke.sl:6: *    used to find scattering and extinction.
k3d/share/shaders/k3d_smoke.sl:20: *          extinction coefficients.
k3d/share/shaders/k3d_smoke.sl:43:    extern color Cl;
k3d/share/shaders/k3d_smoke.sl:68:/* Return a component-by-component exp() of a color */
k3d/share/shaders/k3d_smoke.sl:70:colorexp(color C)
k3d/share/shaders/k3d_smoke.sl:72:  return color(exp(comp(C, 0)), exp(comp(C, 1)), exp(comp(C, 2)));
k3d/share/shaders/k3d_smoke.sl:79:		 float stepsize = 0.1, maxsteps = 100;
k3d/share/shaders/k3d_smoke.sl:118:      /* Composite with exponential extinction of background light */
k3d/share/shaders/k3d_smoke.sl:120:      Ov += (1 - Ov) * (1 - colorexp(-tau * scatter));
k3d/share/shaders/k3d_smoke2.sl:7: *    used to integrate the GADD to find scattering and extinction.
k3d/share/shaders/k3d_smoke2.sl:134:	  dO = 1 - color (exp(comp(scat,0)), exp(comp(scat,1)), exp(comp(scat,2)));
k3d/share/shaders/k3d_smoke2.sl:141:	  ss = max (min (ss, end-d), 0.005);
k3d/share/shaders/k3d_softboxes.sl:14:** $Id: k3d_softboxes.sl,v 1.1 2004/05/19 18:15:20 tshead Exp $
k3d/share/shaders/k3d_softboxes.sl:16:** Derived from softbox3 v1.2 - Author Bjorke for all
k3d/share/shaders/k3d_softboxes.sl:49:/*   - point Q on the x-y plane						***/
k3d/share/shaders/k3d_softboxes.sl:50:/*   - the equations of two superellipses (with major/minor axes given	***/
k3d/share/shaders/k3d_softboxes.sl:61:    point Q;          /* Test point on the x-y plane */
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:82:/*** Given info on a softbox, ************************************/
k3d/share/shaders/k3d_softboxes.sl:85:void softbox_contrib2(
k3d/share/shaders/k3d_softboxes.sl:88:    uniform string	boxCoords;
k3d/share/shaders/k3d_softboxes.sl:89:    uniform string	boxTexture;
k3d/share/shaders/k3d_softboxes.sl:90:    uniform float	boxTexStr,
k3d/share/shaders/k3d_softboxes.sl:91:			boxTexBlur,
k3d/share/shaders/k3d_softboxes.sl:92:			boxFilter,
k3d/share/shaders/k3d_softboxes.sl:93:			boxWidth,
k3d/share/shaders/k3d_softboxes.sl:94:			boxHeight,
k3d/share/shaders/k3d_softboxes.sl:95:			boxWEdge,
k3d/share/shaders/k3d_softboxes.sl:96:			boxHEdge,
k3d/share/shaders/k3d_softboxes.sl:97:			boxRoundness;
k3d/share/shaders/k3d_softboxes.sl:98:    uniform color	boxColor,
k3d/share/shaders/k3d_softboxes.sl:99:    			boxOpac; 
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: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:116:    uniform float bw2 = boxWidth/2;
k3d/share/shaders/k3d_softboxes.sl:117:    uniform float bh2 = boxHeight/2;
k3d/share/shaders/k3d_softboxes.sl:119:#define bw2 boxWidth
k3d/share/shaders/k3d_softboxes.sl:120:#define bh2 boxHeight
k3d/share/shaders/k3d_softboxes.sl:122:    uniform float we = max(boxWEdge,-bw2);
k3d/share/shaders/k3d_softboxes.sl:123:    uniform float he = max(boxHEdge,-bh2);
k3d/share/shaders/k3d_softboxes.sl:128:    uniform float oW = max(bW,bw2);
k3d/share/shaders/k3d_softboxes.sl:129:    uniform float oH = max(bH,bh2);
k3d/share/shaders/k3d_softboxes.sl:135:	contrib = 1 - clipSuperellipse (Pplane, iW, iH, oW,oH, boxRoundness);
k3d/share/shaders/k3d_softboxes.sl:136:	if (boxTexture != "") {
k3d/share/shaders/k3d_softboxes.sl:138:	    textureinfo(boxTexture,"channels",nChans);
k3d/share/shaders/k3d_softboxes.sl:139:	    varying float theS = (oW+xcomp(Pplane))/(oW*2);
k3d/share/shaders/k3d_softboxes.sl:141:	    theS = min(2,max(-1,theS));
k3d/share/shaders/k3d_softboxes.sl:142:	    theT = min(2,max(-1,theT));
k3d/share/shaders/k3d_softboxes.sl:144:		ct = texture(boxTexture,theS,theT,
k3d/share/shaders/k3d_softboxes.sl:146:			    "blur",	boxTexBlur);
k3d/share/shaders/k3d_softboxes.sl:147:		if (boxTexStr != 1) {
k3d/share/shaders/k3d_softboxes.sl:148:		    ct = (ct*boxTexStr)+(1-boxTexStr);
k3d/share/shaders/k3d_softboxes.sl:158:		ot = float texture(boxTexture[alphaChan],theS,theT,
k3d/share/shaders/k3d_softboxes.sl:160:			    "blur",	boxTexBlur);
k3d/share/shaders/k3d_softboxes.sl:165:    varying point ppC = transform(boxCoords,"world",Pplane);
k3d/share/shaders/k3d_softboxes.sl:169:    theOpac = contrib * boxOpac * ot;
k3d/share/shaders/k3d_softboxes.sl:170:    theColor = contrib * ct * boxColor / pow(pDist,decayExp);	/* premultiplied!!!!! */
k3d/share/shaders/k3d_softboxes.sl:185:    uniform string filtTypes[2] = {"box", "gaussian"};
k3d/share/shaders/k3d_softboxes.sl:200:light k3d_softboxes(
k3d/share/shaders/k3d_softboxes.sl:216:		edgeExp = 1;
k3d/share/shaders/k3d_softboxes.sl:217:    string	boxCoord1	= "";
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:220:    float	boxWidth1	= 1,
k3d/share/shaders/k3d_softboxes.sl:221:		boxWEdge1	= -0.1,
k3d/share/shaders/k3d_softboxes.sl:222:		boxHeight1	= 1,
k3d/share/shaders/k3d_softboxes.sl:223:		boxHEdge1	= -0.1,
k3d/share/shaders/k3d_softboxes.sl:224:		boxRoundness1	= 0;
k3d/share/shaders/k3d_softboxes.sl:225:    string	boxTex1	= "";
k3d/share/shaders/k3d_softboxes.sl:226:    float	boxFilter1	= TEX_GAUSSIAN_FILT,
k3d/share/shaders/k3d_softboxes.sl:227:		boxTexStr1	= 1,
k3d/share/shaders/k3d_softboxes.sl:228:		boxTexBlur1	= 0;
k3d/share/shaders/k3d_softboxes.sl:229:    string	boxCoord2	= "";
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:232:    float	boxWidth2	= 1,
k3d/share/shaders/k3d_softboxes.sl:233:		boxWEdge2	= -0.1,
k3d/share/shaders/k3d_softboxes.sl:234:		boxHeight2	= 1,
k3d/share/shaders/k3d_softboxes.sl:235:		boxHEdge2	= -0.1,
k3d/share/shaders/k3d_softboxes.sl:236:		boxRoundness2	= 0;
k3d/share/shaders/k3d_softboxes.sl:237:    string	boxTex2	= "";
k3d/share/shaders/k3d_softboxes.sl:238:    float	boxFilter2	= TEX_GAUSSIAN_FILT,
k3d/share/shaders/k3d_softboxes.sl:239:		boxTexStr2	= 1,
k3d/share/shaders/k3d_softboxes.sl:240:		boxTexBlur2	= 0;
k3d/share/shaders/k3d_softboxes.sl:241:    string	boxCoord3	= "";
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:244:    float	boxWidth3	= 1,
k3d/share/shaders/k3d_softboxes.sl:245:		boxWEdge3	= -0.1,
k3d/share/shaders/k3d_softboxes.sl:246:		boxHeight3	= 1,
k3d/share/shaders/k3d_softboxes.sl:247:		boxHEdge3	= -0.1,
k3d/share/shaders/k3d_softboxes.sl:248:		boxRoundness3	= 0;
k3d/share/shaders/k3d_softboxes.sl:249:    string	boxTex3	= "";
k3d/share/shaders/k3d_softboxes.sl:250:    float	boxFilter3	= TEX_GAUSSIAN_FILT,
k3d/share/shaders/k3d_softboxes.sl:251:		boxTexStr3	= 1,
k3d/share/shaders/k3d_softboxes.sl:252:		boxTexBlur3	= 0;
k3d/share/shaders/k3d_softboxes.sl:253:    string	boxCoord4	= "";
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:256:    float	boxWidth4	= 1,
k3d/share/shaders/k3d_softboxes.sl:257:		boxWEdge4	= -0.1,
k3d/share/shaders/k3d_softboxes.sl:258:		boxHeight4	= 1,
k3d/share/shaders/k3d_softboxes.sl:259:		boxHEdge4	= -0.1,
k3d/share/shaders/k3d_softboxes.sl:260:		boxRoundness4	= 0;
k3d/share/shaders/k3d_softboxes.sl:261:    string	boxTex4	= "";
k3d/share/shaders/k3d_softboxes.sl:262:    float	boxFilter4	= TEX_GAUSSIAN_FILT,
k3d/share/shaders/k3d_softboxes.sl:263:		boxTexStr4	= 1,
k3d/share/shaders/k3d_softboxes.sl:264:		boxTexBlur4	= 0;
k3d/share/shaders/k3d_softboxes.sl:265:    uniform string	envTexName = "";
k3d/share/shaders/k3d_softboxes.sl:268:    uniform float envTexIntensity	= 1;
k3d/share/shaders/k3d_softboxes.sl:269:    uniform float envTexBlur	= 0;
k3d/share/shaders/k3d_softboxes.sl:270:    uniform float envTexStr	= 1;
k3d/share/shaders/k3d_softboxes.sl:271:    uniform float envTexFilter	= 0;
k3d/share/shaders/k3d_softboxes.sl:304:    uniform string rcsInfo = "$Id: k3d_softboxes.sl,v 1.1 2004/05/19 18:15:20 tshead Exp $";
k3d/share/shaders/k3d_softboxes.sl: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:353:	    uniform float boxCt=0;
k3d/share/shaders/k3d_softboxes.sl:360:	    if (boxCoord1 != "") {
k3d/share/shaders/k3d_softboxes.sl:361:	    softbox_contrib2(Ps,rv,
k3d/share/shaders/k3d_softboxes.sl:362:boxCoord1,boxTex1,boxTexStr1,
k3d/share/shaders/k3d_softboxes.sl:363:(boxTexBlur1+materiaBlur),boxFilter1,
k3d/share/shaders/k3d_softboxes.sl:364:		    boxWidth1,boxHeight1,boxWEdge1,boxHEdge1,
k3d/share/shaders/k3d_softboxes.sl:365:		    boxRoundness1,boxColor1,boxOpacity1,decayRate,
k3d/share/shaders/k3d_softboxes.sl:367:	    sortedDist[boxCt]  = thisDist;
k3d/share/shaders/k3d_softboxes.sl:368:	    sortedColor[boxCt] = thisColor;
k3d/share/shaders/k3d_softboxes.sl:369:	    sortedOpac[boxCt]  = thisOpac;
k3d/share/shaders/k3d_softboxes.sl:370:	    boxCt += 1;
k3d/share/shaders/k3d_softboxes.sl:372:	    if (boxCoord2 != "") {
k3d/share/shaders/k3d_softboxes.sl:373:	    softbox_contrib2(Ps,rv,
k3d/share/shaders/k3d_softboxes.sl:374:boxCoord2,boxTex2,boxTexStr2,
k3d/share/shaders/k3d_softboxes.sl:375:(boxTexBlur2+materiaBlur),boxFilter2,
k3d/share/shaders/k3d_softboxes.sl:376:		    boxWidth2,boxHeight2,boxWEdge2,boxHEdge2,
k3d/share/shaders/k3d_softboxes.sl:377:		    boxRoundness2,boxColor2,boxOpacity2,decayRate,
k3d/share/shaders/k3d_softboxes.sl:379:	    sortedDist[boxCt]  = thisDist;
k3d/share/shaders/k3d_softboxes.sl:380:	    sortedColor[boxCt] = thisColor;
k3d/share/shaders/k3d_softboxes.sl:381:	    sortedOpac[boxCt]  = thisOpac;
k3d/share/shaders/k3d_softboxes.sl:382:	    boxCt += 1;
k3d/share/shaders/k3d_softboxes.sl:384:	    if (boxCoord3 != "") {
k3d/share/shaders/k3d_softboxes.sl:385:	    softbox_contrib2(Ps,rv,
k3d/share/shaders/k3d_softboxes.sl:386:boxCoord3,boxTex3,boxTexStr3,
k3d/share/shaders/k3d_softboxes.sl:387:(boxTexBlur3+materiaBlur),boxFilter3,
k3d/share/shaders/k3d_softboxes.sl:388:		    boxWidth3,boxHeight3,boxWEdge3,boxHEdge3,
k3d/share/shaders/k3d_softboxes.sl:389:		    boxRoundness3,boxColor3,boxOpacity3,decayRate,
k3d/share/shaders/k3d_softboxes.sl:391:	    sortedDist[boxCt]  = thisDist;
k3d/share/shaders/k3d_softboxes.sl:392:	    sortedColor[boxCt] = thisColor;
k3d/share/shaders/k3d_softboxes.sl:393:	    sortedOpac[boxCt]  = thisOpac;
k3d/share/shaders/k3d_softboxes.sl:394:	    boxCt += 1;
k3d/share/shaders/k3d_softboxes.sl:396:	    if (boxCoord4 != "") {
k3d/share/shaders/k3d_softboxes.sl:397:	    softbox_contrib2(Ps,rv,
k3d/share/shaders/k3d_softboxes.sl:398:boxCoord4,boxTex4,boxTexStr4,
k3d/share/shaders/k3d_softboxes.sl:399:(boxTexBlur4+materiaBlur),boxFilter4,
k3d/share/shaders/k3d_softboxes.sl:400:		    boxWidth4,boxHeight4,boxWEdge4,boxHEdge4,
k3d/share/shaders/k3d_softboxes.sl:401:		    boxRoundness4,boxColor4,boxOpacity4,decayRate,
k3d/share/shaders/k3d_softboxes.sl:403:	    sortedDist[boxCt]  = thisDist;
k3d/share/shaders/k3d_softboxes.sl:404:	    sortedColor[boxCt] = thisColor;
k3d/share/shaders/k3d_softboxes.sl:405:	    sortedOpac[boxCt]  = thisOpac;
k3d/share/shaders/k3d_softboxes.sl:406:	    boxCt += 1;
k3d/share/shaders/k3d_softboxes.sl:408:	    if (envTexName != "") {
k3d/share/shaders/k3d_softboxes.sl:419:		    Rs = vector (-zcomp (Rs), xcomp (Rs), ycomp (Rs));
k3d/share/shaders/k3d_softboxes.sl:421:		Cl = color environment (envTexName, Rs,
k3d/share/shaders/k3d_softboxes.sl:423:					    "blur", (envTexBlur+materiaBlur));
k3d/share/shaders/k3d_softboxes.sl:424:		if (envTexStr != 1) {
k3d/share/shaders/k3d_softboxes.sl:425:		    Cl = (Cl*envTexStr)+(1-envTexStr);
k3d/share/shaders/k3d_softboxes.sl:427:		Cl *= envTexIntensity;
k3d/share/shaders/k3d_softboxes.sl:429:	    if (boxCt > 0) {
k3d/share/shaders/k3d_softboxes.sl:431:		for(k=0; k<(boxCt-1); k+=1) {
k3d/share/shaders/k3d_softboxes.sl:433:		    for(i=1; i<boxCt; i+=1) {
k3d/share/shaders/k3d_softboxes.sl:449:		for(k=0; k<boxCt; k+=1) {
k3d/share/shaders/k3d_softboxes.sl:462:		q = 1 - clamp(edgeRolloff*pow(clamp(abs(q),0,1),1/max(edgeExp,0.001)),0,1);
k3d/share/shaders/k3d_softboxes.sl:463:		Cl = mix(color(0,0,0),Cl,q);
k3d/share/shaders/k3d_softboxes.sl:469:	    fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_softboxes.sl:474:	    fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_softboxes.sl:479:	    fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_softboxes.sl:484:	    fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_softboxes.sl:491:	Cl = mix(Cl, (shadowcolor*shadowintensity*adjIntensity), fullShad);
k3d/share/shaders/k3d_spacecloud.sl:3: *    texture-map and try to make it not so obvious that it is a texture-map.
k3d/share/shaders/k3d_spacecloud.sl:7: *   Uses a pulse function to tapper off the edges of the texture
k3d/share/shaders/k3d_spacecloud.sl:10: *   txtFile -- texture map
k3d/share/shaders/k3d_spacecloud.sl:15: *   maxAdjust -- amount that can be added to the value
k3d/share/shaders/k3d_spacecloud.sl:16: *   maxOpacity -- maximin opacity for the surface
k3d/share/shaders/k3d_spacecloud.sl:36:#define snoise(x) (2 * noise(x) - 1)
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:48:  string txtFile = "";
k3d/share/shaders/k3d_spacecloud.sl:54:  float maxAdjust = .4;
k3d/share/shaders/k3d_spacecloud.sl:55:  float maxOpacity = .4;
k3d/share/shaders/k3d_spacecloud.sl:67:  if (txtFile != "")
k3d/share/shaders/k3d_spacecloud.sl:68:    Ct = color texture (txtFile, s, 1-t);
k3d/share/shaders/k3d_spacecloud.sl:86:	adjust = adjustNoise2 (u, v, minAdjust, maxAdjust);
k3d/share/shaders/k3d_spacecloud.sl:95:	Oi *= maxOpacity;
k3d/share/shaders/k3d_spaceshiphull1.sl:1:#define snoise(x) (2 * noise(x) - 1)
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:6: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_square_ridges.sl:27:#define filter_width(x) max(abs(Du(x)*du) + abs(Dv(x)*dv), MIN_FILTER_WIDTH)
k3d/share/shaders/k3d_square_ridges.sl:30:float pulse(float edge0, edge1, x)
k3d/share/shaders/k3d_square_ridges.sl:32:	return step(edge0, x) - step(edge1, x);
k3d/share/shaders/k3d_square_ridges.sl:35:float pulse_train(float edge, period, x)
k3d/share/shaders/k3d_square_ridges.sl:37:	return pulse(edge, period, mod(x, period));
k3d/share/shaders/k3d_square_ridges.sl:41:float filtered_pulse_train(float edge, period, x, dx)
k3d/share/shaders/k3d_square_ridges.sl:43:	float w = dx / period;
k3d/share/shaders/k3d_square_ridges.sl:44:	float x0 = x/period - w/2;
k3d/share/shaders/k3d_square_ridges.sl:45:	float x1 = x0 + w;
k3d/share/shaders/k3d_square_ridges.sl:50:		extern float nedge;
k3d/share/shaders/k3d_square_ridges.sl:51:		return ((1 - nedge) * floor(t) + max(0, t-floor(t)-nedge));
k3d/share/shaders/k3d_square_ridges.sl:54:	return (integral(x1) - integral(x0)) / w;
k3d/share/shaders/k3d_srfdeformation.sl:9:   projects a texture through the camera onto the Pref
k3d/share/shaders/k3d_srfdeformation.sl:15:   additional contrast and color controls are left as an exersize
k3d/share/shaders/k3d_srfdeformation.sl:31:    return Cl * max(Ln.Nn,0);   
k3d/share/shaders/k3d_srfdeformation.sl:41:    X = xcomp(Pndc);
k3d/share/shaders/k3d_srfdeformation.sl:48:    string texname = "";        /* Texture to project */
k3d/share/shaders/k3d_srfdeformation.sl:50:				   1 = texture deformed with no lighting
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:68:    if (texname != "") {
k3d/share/shaders/k3d_srfdeformation.sl:69:	Ci0 = texture(texname, x, y);
k3d/share/shaders/k3d_srfdeformation.sl:98:    if (debug == 1) {  /* output the texture - no lighting */
k3d/share/shaders/k3d_srfdeformation.sl:100:    } else if (debug == 2) { /* output texture with P's lighting */
k3d/share/shaders/k3d_srfdeformation.sl:102:    } else if (debug == 3) { /* output texture with Pref's lighting */
k3d/share/shaders/k3d_star.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_star.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_star.sl:29:    uniform float rmin = 0.07, rmax = 0.2;
k3d/share/shaders/k3d_star.sl:31:    uniform point p0 = rmax*(cos(0),sin(0),0);
k3d/share/shaders/k3d_star.sl:46:    Ct = mix(Cs, starcolor, in_out);
k3d/share/shaders/k3d_starfield.sl:4:	We partition space into a 1x1x1 grid, rendering one solid spherical "star" per cell.
k3d/share/shaders/k3d_starfield.sl: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_stones.sl:9: * without express or implied warranty.
k3d/share/shaders/k3d_stones.sl:24: * minfreq & maxfreq = limits to the rock loop excecution
k3d/share/shaders/k3d_stones.sl:39:#define repeat(x,freq)    (mod((x) * (freq), 1.0))
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:46:#define fuzzpulse(a,b,fuzz,x) (smoothstep((a)-(fuzz),(a),(x)) - \
k3d/share/shaders/k3d_stones.sl:47:         smoothstep((b)-(fuzz),(b),(x)))
k3d/share/shaders/k3d_stones.sl:49:#define snoise(x)    (noise(x) * 2 - 1)
k3d/share/shaders/k3d_stones.sl:50:#define snoise2(x,y) (noise(x,y) * 2 - 1)
k3d/share/shaders/k3d_stones.sl:51:#define whichtile(x,freq) (floor((x) * (freq)))
k3d/share/shaders/k3d_stones.sl:53:#define filterwidth_point(p) (max(sqrt(area(p)), MINFILTERWIDTH))
k3d/share/shaders/k3d_stones.sl:54:#define udn(x,lo,hi) (smoothstep(.25, .75, noise(x)) * ((hi) - (lo)) + (lo))
k3d/share/shaders/k3d_stones.sl:57:/* varyEach takes a computed color, then tweaks each indexed item
k3d/share/shaders/k3d_stones.sl:63:color varyEach (color Cin; float index, varyhue, varysat, varyval;)
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:88:          maxfreq = 10,
k3d/share/shaders/k3d_stones.sl:102: float cx,cy;
k3d/share/shaders/k3d_stones.sl:113: for (freq = maxfreq ; freq>minfreq;freq -=0.5)
k3d/share/shaders/k3d_stones.sl:115:   angle = PI * snoise(freq * 16.31456);  /*randomize angle index*/
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:120:   ss = repeat(cx,freq * tilefreq);
k3d/share/shaders/k3d_stones.sl:122:   stile = whichtile(cx,freq * tilefreq);
k3d/share/shaders/k3d_stones.sl:125:   /*tile index to be use in vary each*/
k3d/share/shaders/k3d_stones.sl:126:   float stoneindex = stile + 13 * ttile;
k3d/share/shaders/k3d_stones.sl:132:   /*cx = 0.5 + 0.1 * snoise2( 12.312,  21.773);
k3d/share/shaders/k3d_stones.sl:134:   cx = 0.5 + 0.1 * snoise2( freq * 8.456, freq * 18.773);
k3d/share/shaders/k3d_stones.sl:136:   point p1 =(cx,cy,0);
k3d/share/shaders/k3d_stones.sl:140:              ((maxfreq - freq)/maxfreq); */
k3d/share/shaders/k3d_stones.sl:141:   mag= (0.5 - abs(bub - 0.5)) * 90 *(.09 - d * d)*((maxfreq - freq)/maxfreq);
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:152:    surface_mag = max(surface_mag,mag);
k3d/share/shaders/k3d_stones.sl:162:       float cutoff = clamp(0.5 / width, 0, maxfreq);
k3d/share/shaders/k3d_strata.sl:9: *    txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_strata.sl:24: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_strata.sl:37:surface k3d_strata(float Ka = 0.5, Kd = 1; float txtscale = 1;
k3d/share/shaders/k3d_strata.sl:47:  PP = txtscale * transform("shader", P);
k3d/share/shaders/k3d_superkagee.sl:21:    uniform string filtTypes[2] = {"box", "gaussian"};
k3d/share/shaders/k3d_superkagee.sl:72:"$Id: k3d_superkagee.sl,v 1.1 2004/05/19 18:15:20 tshead Exp $";
k3d/share/shaders/k3d_superkagee.sl:81:        fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_superkagee.sl:88:        fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_superkagee.sl:95:        fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_superkagee.sl:102:        fullShad = max(fullShad,shadowed);
k3d/share/shaders/k3d_superkagee.sl:105:    Ci = Oi * mix(Cs,shadColor,fullShad);
k3d/share/shaders/k3d_superplank.sl:5: *   Makes texture of wooden planks in s-t space.  This wood looks rather
k3d/share/shaders/k3d_superplank.sl:13: *   Kr, eta - reflection amount and index of refraction (for fresnel)
k3d/share/shaders/k3d_superplank.sl:15: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_superplank.sl:57:			float Kr = 1, eta = 1.5;	/* Mirror refl & index of refr */
k3d/share/shaders/k3d_superplank.sl:60:			/* Overall texturing control */
k3d/share/shaders/k3d_superplank.sl:61:			float txtscale = 1;	/* Overall scaling factor */
k3d/share/shaders/k3d_superplank.sl:93:  float whichrow, whichplank;	/* Index for each row & plank within row */
k3d/share/shaders/k3d_superplank.sl:125:  ss = s * txtscale;
k3d/share/shaders/k3d_superplank.sl:126:  tt = t * txtscale;
k3d/share/shaders/k3d_superplank.sl:130:  fwidth = max(swidth, twidth);
k3d/share/shaders/k3d_superplank.sl:180:  /* Now whichplank is a unique integer index for each plank */
k3d/share/shaders/k3d_superplank.sl:184:   * antialiasing by trying to box filter the edges of the grooves.
k3d/share/shaders/k3d_superplank.sl:212:  fwidth = max(swidth * ringscale, twidth * ringscale);
k3d/share/shaders/k3d_superplank.sl:227:      fwidth = max(swidth * grainscale, twidth * grainscale);
k3d/share/shaders/k3d_superplank.sl:255:  Ct = mix(groovecolor, woodcolor, groovy);
k3d/share/shaders/k3d_superplank.sl:309:		smoothstep(.6, .85, pow(max(0, Nf.H), 8 / roughness)));
k3d/share/shaders/k3d_superplank.sl:323:	    fresnelKr * specularcolor * texture(reflmap, xcomp(Pndc),
k3d/share/shaders/k3d_superpplastic.sl:1:/* paintedplastic.sl - Standard texture map surface for RenderMan Interface.
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:6: * RenderMan (R) is a registered trademark of Pixar.
k3d/share/shaders/k3d_superpplastic.sl:9: *    Apply a texture map to a plastic surface, indexing the texture
k3d/share/shaders/k3d_superpplastic.sl:14: *    texturename - the name of the texture file.
k3d/share/shaders/k3d_superpplastic.sl:22:			  color specularcolor = 1; string texturename = "";
k3d/share/shaders/k3d_superpplastic.sl:33:    filter = "box";
k3d/share/shaders/k3d_superpplastic.sl:43:    filter = "box";
k3d/share/shaders/k3d_superpplastic.sl:45:  if(texturename != "")
k3d/share/shaders/k3d_superpplastic.sl:47:      color texture(texturename, s, t, "filter", filter, "fidelity", fidelity,
k3d/share/shaders/k3d_supertexmap.sl:2: * supertexmap.sl
k3d/share/shaders/k3d_supertexmap.sl:5: *    Apply a texture map (possibly with associated alpha) 
k3d/share/shaders/k3d_supertexmap.sl:7: *    standard "paintedplastic", but with much more flexibility in the
k3d/share/shaders/k3d_supertexmap.sl:8: *    coordinate mapping of the texture.
k3d/share/shaders/k3d_supertexmap.sl:12: *    texturename - the name of the texture file.
k3d/share/shaders/k3d_supertexmap.sl:15: *    textureprojspace - the space in which the texture projection is
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:19: *                projected point before texture coordinates are extracted.
k3d/share/shaders/k3d_supertexmap.sl:36:surface k3d_supertexmap(float Ka = 1, Kd = .5, Ks = .5, roughness = .1;
k3d/share/shaders/k3d_supertexmap.sl:40:			float Csmx[16] =
k3d/share/shaders/k3d_supertexmap.sl:47:			float Osmx[16] =
k3d/share/shaders/k3d_supertexmap.sl:54:			float Ksmx[16] =
k3d/share/shaders/k3d_supertexmap.sl:61:			float dispmx[16] =
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: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: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:2: * <felipe@siggraph.org.mx>, abril 2002

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:8:#define snoise(x) (2*(noise(x)-0.5))
k3d/share/shaders/k3d_terran.sl:11:#define snoise(x) (2.5*(noise(x)-0.5))
k3d/share/shaders/k3d_terran.sl:14:#define DNoise(x) ((2*(point noise(x))) - point(1,1,1))
k3d/share/shaders/k3d_terran.sl:21:		   float spectral_exp = 0.5;
k3d/share/shaders/k3d_terran.sl:29:		   float purt_scale = .9; float map_exp = 0;
k3d/share/shaders/k3d_terran.sl:31:		   float depth_max = .5; float mottle_limit = 0.75;
k3d/share/shaders/k3d_terran.sl:39:  point Ptexture, tp;
k3d/share/shaders/k3d_terran.sl:44:  Ptexture = transform("shader", P);
k3d/share/shaders/k3d_terran.sl:45:  PtN = normalize(Ptexture);	/* Version of Ptexture with radius 1 */
k3d/share/shaders/k3d_terran.sl:50:   *       expect these two shaders to work well together.
k3d/share/shaders/k3d_terran.sl:60:	  bumpy += o * snoise(l * Ptexture);
k3d/share/shaders/k3d_terran.sl:62:	  o *= spectral_exp;
k3d/share/shaders/k3d_terran.sl:68:      Ptexture += dist_scale * DNoise(Ptexture);
k3d/share/shaders/k3d_terran.sl:70:      o = spectral_exp;
k3d/share/shaders/k3d_terran.sl:71:      tp = Ptexture;
k3d/share/shaders/k3d_terran.sl:80:	  bumpy += snoise(tp) * min(weight, spectral_exp);
k3d/share/shaders/k3d_terran.sl:81:	  o *= spectral_exp;
k3d/share/shaders/k3d_terran.sl:106:  if(map_exp > 0)
k3d/share/shaders/k3d_terran.sl:107:    latitude = lat_scale * pow(latitude, map_exp);
k3d/share/shaders/k3d_terran.sl:144:	  PP = mottle_scale * Ptexture;
k3d/share/shaders/k3d_terran.sl:167:	  chaos = max(chaos, -depth_max);
k3d/share/shaders/k3d_terran2.sl:21: *    spectral_exp, lacunarity, octaves - control the fractal characteristics
k3d/share/shaders/k3d_terran2.sl:29: *    lat_scale, nonlinear, purt_scale, map_exp - control scaling of 
k3d/share/shaders/k3d_terran2.sl:32: *    depth_scale, depth_max - scaling factor and max depth of oceans
k3d/share/shaders/k3d_terran2.sl:39: *    represented by a unit sphere.  The texture space and/or parameters
k3d/share/shaders/k3d_terran2.sl:54: *    ???? - original texture developed by F. Ken Musgrave.
k3d/share/shaders/k3d_terran2.sl:64:#define snoise(x) (2*(noise(x)-0.5))
k3d/share/shaders/k3d_terran2.sl:67:#define snoise(x) (2.5*(noise(x)-0.5))
k3d/share/shaders/k3d_terran2.sl:70:#define DNoise(x) ((2*(point noise(x))) - point(1,1,1))
k3d/share/shaders/k3d_terran2.sl:78:	  float spectral_exp = 0.5;
k3d/share/shaders/k3d_terran2.sl:89:	  float map_exp = 0;
k3d/share/shaders/k3d_terran2.sl:92:	  float depth_max = .5;
k3d/share/shaders/k3d_terran2.sl:102:  point Ptexture, tp;
k3d/share/shaders/k3d_terran2.sl:107:  Ptexture = transform ("shader", P);
k3d/share/shaders/k3d_terran2.sl:108:  PtN = normalize (Ptexture);      /* Version of Ptexture with radius 1 */
k3d/share/shaders/k3d_terran2.sl:113:   *       expect these two shaders to work well together.
k3d/share/shaders/k3d_terran2.sl:119:	  bumpy += o * snoise (l * Ptexture);
k3d/share/shaders/k3d_terran2.sl:121:	  o *= spectral_exp;
k3d/share/shaders/k3d_terran2.sl:126:      Ptexture += dist_scale * DNoise (Ptexture);
k3d/share/shaders/k3d_terran2.sl:128:      o = spectral_exp;  tp = Ptexture;
k3d/share/shaders/k3d_terran2.sl:136:	  bumpy += snoise(tp) * min (weight, spectral_exp);
k3d/share/shaders/k3d_terran2.sl:137:	  o *= spectral_exp;
k3d/share/shaders/k3d_terran2.sl:161:  if (map_exp > 0)
k3d/share/shaders/k3d_terran2.sl:162:       latitude = lat_scale * pow(latitude,map_exp);
k3d/share/shaders/k3d_terran2.sl:203:         PP = mottle_scale * Ptexture;
k3d/share/shaders/k3d_terran2.sl:222:	  chaos = max (chaos, -depth_max);
k3d/share/shaders/k3d_terranbump.sl:4:#define snoise(x) (2*(noise(x)-0.5))
k3d/share/shaders/k3d_terranbump.sl:7:#define snoise(x) (2.5*(noise(x)-0.5))
k3d/share/shaders/k3d_terranbump.sl:10:#define DNoise(x) ((2*(point noise(x))) - point(1,1,1))
k3d/share/shaders/k3d_terranbump.sl:17:displacement k3d_terranbump(float spectral_exp = 0.5;
k3d/share/shaders/k3d_terranbump.sl:24:  point Ptexture, tp;
k3d/share/shaders/k3d_terranbump.sl:29:  Ptexture = transform("shader", P);
k3d/share/shaders/k3d_terranbump.sl:38:	  bumpy += o * snoise(l * Ptexture);
k3d/share/shaders/k3d_terranbump.sl:40:	  o *= spectral_exp;
k3d/share/shaders/k3d_terranbump.sl:46:      Ptexture += dist_scale * DNoise(Ptexture);
k3d/share/shaders/k3d_terranbump.sl:48:      o = spectral_exp;
k3d/share/shaders/k3d_terranbump.sl:49:      tp = Ptexture;
k3d/share/shaders/k3d_terranbump.sl:58:	  bumpy += snoise(tp) * min(weight, spectral_exp);
k3d/share/shaders/k3d_terranbump.sl:59:	  o *= spectral_exp;
k3d/share/shaders/k3d_texblender.sl:14:    extern vector I;
k3d/share/shaders/k3d_texblender.sl:43:	float x,hx;
k3d/share/shaders/k3d_texblender.sl:44:	x=abs(xcomp(p));
k3d/share/shaders/k3d_texblender.sl:45:	x+=abs(ycomp(p));
k3d/share/shaders/k3d_texblender.sl:46:	x+=abs(zcomp(p));
k3d/share/shaders/k3d_texblender.sl:48:	float n=log(x,10);
k3d/share/shaders/k3d_texblender.sl:51:	x=x/pow(10,n);
k3d/share/shaders/k3d_texblender.sl:52:	hx=mod(x,1000000)/1000;
k3d/share/shaders/k3d_texblender.sl:53:	x=mod(x+hx+x*100,1000);
k3d/share/shaders/k3d_texblender.sl:54:	return x/1000;
k3d/share/shaders/k3d_texblender.sl:57:float tex_clouds(point P;float depth)
k3d/share/shaders/k3d_texblender.sl:73:float tex_wood(point PP; float 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: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: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:100:		newc=tex_clouds(transp,octaves);
k3d/share/shaders/k3d_texblender.sl:104:		newc=tex_wood(transp,octaves);
k3d/share/shaders/k3d_texblender.sl:107:		newc=texture(mapname,s*scalex,t*scaley,"blur",blur,"fill",-1,"width",0);
k3d/share/shaders/k3d_texblender.sl:108:    if (comp(newc,1)==-1) newc=comp(newc,0); /* treat a 1-channel texture map as a greyscale */
k3d/share/shaders/k3d_texblender.sl:132:k3d_texblender (float Ka = 1, Kd = .5, Ks = .2, roughness = .3, Kr=0,selft=0;
k3d/share/shaders/k3d_texblender.sl: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_threads.sl:1:/* Copyrighted Pixar 1989 */
k3d/share/shaders/k3d_tooledsteel.sl:24: * 			  maxes out at 10
k3d/share/shaders/k3d_tooledsteel.sl:26: *			  maxes out at .5
k3d/share/shaders/k3d_tooledsteel.sl:28: *			  maxes out at .5
k3d/share/shaders/k3d_tooledsteel.sl:38:  extern point P;
k3d/share/shaders/k3d_tooledsteel.sl:39:  extern vector dPdu;
k3d/share/shaders/k3d_tooledsteel.sl:40:  extern vector dPdv;
k3d/share/shaders/k3d_tooledsteel.sl:41:  extern float s;
k3d/share/shaders/k3d_tooledsteel.sl:42:  extern float t;
k3d/share/shaders/k3d_tooledsteel.sl:61:  setxcomp(trucell,floor(xcomp(Po))+.5);
k3d/share/shaders/k3d_tooledsteel.sl:92:    extern vector I;
k3d/share/shaders/k3d_tooledsteel.sl:93:    extern normal N;
k3d/share/shaders/k3d_tooledsteel.sl:94:    extern point P;
k3d/share/shaders/k3d_tooledsteel.sl:100:    color pixbrdf, C = 0;
k3d/share/shaders/k3d_tooledsteel.sl:104:        extern vector L;  
k3d/share/shaders/k3d_tooledsteel.sl:105:	extern color Cl;
k3d/share/shaders/k3d_tooledsteel.sl:113:	    pixbrdf  = specularbrdf(LN, Nf,V,specspread);
k3d/share/shaders/k3d_tooledsteel.sl:114:            C += Cl * pixbrdf * pow( 1-abs(VA.H), 1/specwidth );
k3d/share/shaders/k3d_toonmap.sl:41:/** Texture_Highlight_Map **/
k3d/share/shaders/k3d_toonmap.sl:55:temt_c4=texture(Highlight_Map,temp_ss4,temp_tt4,"swidth",swidth4,"twidth",twidth4,"samples",samples4);
k3d/share/shaders/k3d_toonmap.sl:59:temt_c4=texture(Highlight_Map[channel4],temp_ss4,temp_tt4,"swidth",swidth4,"twidth",twidth4,"samples",samples4);
k3d/share/shaders/k3d_toonmap.sl:62:/** Texture_Paint_Map **/
k3d/share/shaders/k3d_toonmap.sl:76:temt_c3=texture(Paint_Map,temp_ss3,temp_tt3,"swidth",swidth3,"twidth",twidth3,"samples",samples3);
k3d/share/shaders/k3d_toonmap.sl:80:temt_c3=texture(Paint_Map[channel3],temp_ss3,temp_tt3,"swidth",swidth3,"twidth",twidth3,"samples",samples3);
k3d/share/shaders/k3d_toonmap.sl:83:/** Texture_Ink_Map **/
k3d/share/shaders/k3d_toonmap.sl:97:temt_c2=texture(Ink_Map,temp_ss2,temp_tt2,"swidth",swidth2,"twidth",twidth2,"samples",samples2);
k3d/share/shaders/k3d_toonmap.sl:101:temt_c2=texture(Ink_Map[channel2],temp_ss2,temp_tt2,"swidth",swidth2,"twidth",twidth2,"samples",samples2);
k3d/share/shaders/k3d_toonmap.sl:104:#define blend(a,b,x) ((a) * (1 - (x)) + (b) * (x))
k3d/share/shaders/k3d_translucency.sl:12:*		translucency texture for each side of a flat object
k3d/share/shaders/k3d_translucency.sl:17:* Tips & Tricks: The transTx and TransTx2 values can be used,
k3d/share/shaders/k3d_translucency.sl:18:*		 when a texture is present, as scale value for the texture.
k3d/share/shaders/k3d_translucency.sl:19:*		 Don't use white on the translucency texture.
k3d/share/shaders/k3d_translucency.sl:39:			float blurcolorTx = 0;
k3d/share/shaders/k3d_translucency.sl:40:			string colorTx = "";
k3d/share/shaders/k3d_translucency.sl:41:			float blurcolorTx2 = 0;
k3d/share/shaders/k3d_translucency.sl:42:			string colorTx2 = "";
k3d/share/shaders/k3d_translucency.sl:47:			float transTx = 0.8;
k3d/share/shaders/k3d_translucency.sl:48:			float transblurTx = 0;
k3d/share/shaders/k3d_translucency.sl:49:			string transTex = "";
k3d/share/shaders/k3d_translucency.sl:50:			float transTx2 = 0.8;
k3d/share/shaders/k3d_translucency.sl:51:			float transblurTx2 = 0;
k3d/share/shaders/k3d_translucency.sl:52:			string transTex2 = "";
k3d/share/shaders/k3d_translucency.sl:74:	/*Color texturing of different side*/
k3d/share/shaders/k3d_translucency.sl:80:		if (colorTx != ""){
k3d/share/shaders/k3d_translucency.sl:81:			float opac = float texture(colorTx[3], ss, tt);
k3d/share/shaders/k3d_translucency.sl:82:			Ct = color texture(colorTx, ss, tt, "blur", blurcolorTx) + (1-opac)*Cs;
k3d/share/shaders/k3d_translucency.sl:86:	 	if (colorTx2 != ""){
k3d/share/shaders/k3d_translucency.sl:87:			float opac = float texture(colorTx2[3], ss, tt);
k3d/share/shaders/k3d_translucency.sl:88:			Ct = color texture(colorTx2, ss, tt, "blur", blurcolorTx2) + (1-opac)*Cs;
k3d/share/shaders/k3d_translucency.sl:94:	/*Translucency texturing of different side*/
k3d/share/shaders/k3d_translucency.sl:98:		if (transTex != ""){
k3d/share/shaders/k3d_translucency.sl:99:			 Kt = float texture(transTex[0], ss, tt, "blur", transblurTx);
k3d/share/shaders/k3d_translucency.sl:100:			 Kt = Kt * transTx;
k3d/share/shaders/k3d_translucency.sl:101:		} else Kt = transTx;
k3d/share/shaders/k3d_translucency.sl:104:		if (transTex2 != ""){
k3d/share/shaders/k3d_translucency.sl:105:			 Kt = float texture(transTex2[0], ss, tt, "blur", transblurTx2);
k3d/share/shaders/k3d_translucency.sl:106:			 Kt = Kt * transTx2;
k3d/share/shaders/k3d_translucency.sl:107:		} else Kt = transTx2;
k3d/share/shaders/k3d_translucency.sl:119:		cosine = max (-Nf.V,0);
k3d/share/shaders/k3d_translucency.sl:121:		cosine = max (Nf.V, 0);
k3d/share/shaders/k3d_uberlight.sl:8: * Rather than explicitly pass "from" and "to" points to indicate the
k3d/share/shaders/k3d_uberlight.sl:11: * toward the +z axis (also in shader space).  Thus, to position and
k3d/share/shaders/k3d_uberlight.sl:34: *   falloff - defines the exponent for falloff.  A falloff of 0 (the
k3d/share/shaders/k3d_uberlight.sl:43: *   maxintensity - to prevent the light from becoming unboundedly
k3d/share/shaders/k3d_uberlight.sl:45: *       smoothly clamped to this maximum value.
k3d/share/shaders/k3d_uberlight.sl:54: *   shearx, sheary - define the amount of shear applied to the light
k3d/share/shaders/k3d_uberlight.sl:56: *       light cone is aligned with the z-axis in local light space.
k3d/share/shaders/k3d_uberlight.sl:79: *   slidename - if a filename is supplied, a texture lookup will be
k3d/share/shaders/k3d_uberlight.sl:82: *       make a texture map that simply blocks light, just make it
k3d/share/shaders/k3d_uberlight.sl:83: *       black-and-white, but store it as an RGB texture.  For
k3d/share/shaders/k3d_uberlight.sl:84: *       simplicity, the shader assumes that the texture file will
k3d/share/shaders/k3d_uberlight.sl:93: *       for example, you can use the noise to simulate the
k3d/share/shaders/k3d_uberlight.sl:101: *   shadowmap - the name of the texture containing the shadow map.  If
k3d/share/shaders/k3d_uberlight.sl:103: *   shadowblur - how soft to make the shadow edge, expressed as a
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:151: *       highlights just fine (except for regions in shadows, as
k3d/share/shaders/k3d_uberlight.sl:152: *       explained above).  This is very handy for lights that are
k3d/share/shaders/k3d_uberlight.sl:159: *       to account for it yourself.  The PRMan user manual explains how
k3d/share/shaders/k3d_uberlight.sl:177: * noise texture.  Some advanced users may want more than one of some or
k3d/share/shaders/k3d_uberlight.sl:178: * all of these.  It is left as an exercise for the reader to make such
k3d/share/shaders/k3d_uberlight.sl:179: * extensions to the shader.
k3d/share/shaders/k3d_uberlight.sl:189: * This shader was tested using Pixar's PhotoRealistic RenderMan 3.7
k3d/share/shaders/k3d_uberlight.sl:202: * Contacts:  {lg|ronen}@pixar.com
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: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:244:	  float sqr(float x)
k3d/share/shaders/k3d_uberlight.sl:246:	    return x * x;
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:255:	  float re = 2 / roundness;	/* roundness exponent */
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:278:		       vector axis;	/* light axis */
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: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:328:	1 - clipSuperellipse(PL / Pz - point(shearx, sheary, 0), width,
k3d/share/shaders/k3d_uberlight.sl:376:		     float falloff = 0, falloffdist = 1, maxintensity = 1;
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:412:   * the surface point we're shading, expressed in the local light
k3d/share/shaders/k3d_uberlight.sl:419:   * origin and z-axis of shader space.
k3d/share/shaders/k3d_uberlight.sl:422:  vector axis = normalize(N);
k3d/share/shaders/k3d_uberlight.sl:426:  vector axis = normalize(vector "shader"(0, 0, 1));
k3d/share/shaders/k3d_uberlight.sl:431:      uniform float maxradius = 1.4142136 * max(height + hedge + abs(sheary),
k3d/share/shaders/k3d_uberlight.sl:432:						width + wedge + abs(shearx));
k3d/share/shaders/k3d_uberlight.sl:433:      angle = atan(maxradius);
k3d/share/shaders/k3d_uberlight.sl:445:  illuminate(from, axis, angle)
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:468:	float xslide = 0.5 + 0.5 * xcomp(Pslide) / zslide;
k3d/share/shaders/k3d_uberlight.sl:470:	lcol *= color texture(slidename, xslide, yslide);
k3d/share/shaders/k3d_uberlight.sl:495:	  shadoworigin = point "shader"(xcomp(PL), ycomp(PL), cuton);
k3d/share/shaders/k3d_uberlight.sl:518:	lcol = mix(shadowcolor, lcol, unoccluded);
k3d/share/shaders/k3d_uberlight.sl:523:      L = axis * length(Ps - from);
k3d/share/shaders/k3d_urbermap.sl:5:string abColorMap="I:/ArtWorks/Textures/Batik_1.4.tif"; 
k3d/share/shaders/k3d_urbermap.sl:9:string abDiffuseMap="I:/ArtWorks/Textures/BubbaWeb_1.1.3.tif"; 
k3d/share/shaders/k3d_urbermap.sl:12:string abSpecularMap="I:/ArtWorks/Textures/Curlitron_1.1.tif"; 
k3d/share/shaders/k3d_urbermap.sl:15:string abSpecularColorMap="I:/ArtWorks/Textures/Native_1.2.highlight.tif"; 
k3d/share/shaders/k3d_urbermap.sl:18:string abRoughnessMap="I:/ArtWorks/Textures/Native_1.2.shadow.tif"; 
k3d/share/shaders/k3d_urbermap.sl:20:string abTransparencyMap="I:/ArtWorks/Textures/Native_1.2.tif"; 
k3d/share/shaders/k3d_urbermap.sl:24:string abIncandescenseMap="I:/ArtWorks/Textures/BubbaWeb_1.1.3.tif"; 
k3d/share/shaders/k3d_urbermap.sl:26:string abReflectionMap="I:/ArtWorks/Textures/Batik_1.4.tif"; 
k3d/share/shaders/k3d_urbermap.sl:30:string abBumpMap="I:/ArtWorks/Textures/Curlitron_1.1.tif"; 
k3d/share/shaders/k3d_urbermap.sl:35:point STMatrix0=point(1,0,0); 
k3d/share/shaders/k3d_urbermap.sl:36:point STMatrix1=point(0,1,0); ) 
k3d/share/shaders/k3d_urbermap.sl:47:ss = vector(s, t, 1) . vector(transform("shader", STMatrix0));
k3d/share/shaders/k3d_urbermap.sl:48:tt = vector(s, t, 1) . vector(transform("shader", STMatrix1));
k3d/share/shaders/k3d_urbermap.sl:53:Csurf = Cs * color texture(abColorMap, ss, tt,
k3d/share/shaders/k3d_urbermap.sl:58:Copac = float texture(abColorMap[3], ss, tt,
k3d/share/shaders/k3d_urbermap.sl:78:diff = abDiffuse * float texture(abDiffuseMap, ss, tt,
k3d/share/shaders/k3d_urbermap.sl:90:spec = abSpecular * float texture(abSpecularMap, ss, tt,
k3d/share/shaders/k3d_urbermap.sl:102:Cspec = abSpecularColor * color texture(abSpecularColorMap, ss, tt,
k3d/share/shaders/k3d_urbermap.sl:114:roughness = abRoughness * float texture(abRoughnessMap, ss, tt,
k3d/share/shaders/k3d_urbermap.sl:128:Copac = Copac * color texture(abTransparencyMap, ss, tt,
k3d/share/shaders/k3d_urbermap.sl:134:Copac = Copac * (color(1) - color texture(abTransparencyMap, ss, tt,
k3d/share/shaders/k3d_urbermap.sl:143:Cincand = abIncandescence * color texture(abIncandescenseMap, ss, tt,
k3d/share/shaders/k3d_urbermap.sl:156:bmp = abBumpScale * float texture( abBumpMap, ss, tt,
k3d/share/shaders/k3d_urbermap.sl:189:D = vector(-zcomp(D), xcomp(D), ycomp(D));
k3d/share/shaders/k3d_veinedmarble.sl:5: *   Makes solid marble texture with strong veins.  The "veincolor" parameter
k3d/share/shaders/k3d_veinedmarble.sl:68:  Ct = mix(Cs, veincolor, turbsum);
k3d/share/shaders/k3d_velvet.sl:26: *			Fixed retroreflection lobe (sign error); added
k3d/share/shaders/k3d_velvet.sl:60:    cosine = max ( Ln.V, 0 );
k3d/share/shaders/k3d_velvet.sl:64:    cosine = max ( Nf.V, 0 );
k3d/share/shaders/k3d_venus.sl:24: *    represented by a unit sphere.  The texture space and/or parameters
k3d/share/shaders/k3d_venus.sl:34: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_venus.sl:40: *    ???? - Venus texture developed by F. Ken Musgrave.
k3d/share/shaders/k3d_venus.sl:50:#define snoise(x) ((2*noise(x))-1)
k3d/share/shaders/k3d_venus.sl:59:  point Ptexture;		/* the shade point in texture space */
k3d/share/shaders/k3d_venus.sl:60:  point PtN;			/* normalized version of Ptexture */
k3d/share/shaders/k3d_venus.sl:68:  /* Transform to texture coordinates */
k3d/share/shaders/k3d_venus.sl:69:  Ptexture = transform("shader", P);
k3d/share/shaders/k3d_venus.sl:72:  PtN = normalize(Ptexture);
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_venus2.sl:30: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_venus2.sl:36: *    ???? - Venus texture developed by F. Ken Musgrave.
k3d/share/shaders/k3d_venus2.sl:48:#define snoise(x) ((2*noise(x))-1)
k3d/share/shaders/k3d_venus2.sl:61:  point Ptexture;           /* the shade point in texture space */
k3d/share/shaders/k3d_venus2.sl:62:  point PtN;                /* normalized version of Ptexture */
k3d/share/shaders/k3d_venus2.sl:70:  /* Transform to texture coordinates and map to nit sphere */
k3d/share/shaders/k3d_venus2.sl:71:  Ptexture = transform ("shader", P) / radius;
k3d/share/shaders/k3d_venus2.sl:74:  PtN = normalize (Ptexture);
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:81:	      zcomp(Ptexture));
k3d/share/shaders/k3d_volcube.sl:3:   This shader raytraces a box that is one unit in size,
k3d/share/shaders/k3d_volcube.sl:11:   SurfNormalDepth     - the mixing depth from surface
k3d/share/shaders/k3d_volcube.sl:21:/* fnc_traceBox returns an intersection point on a box */
k3d/share/shaders/k3d_volcube.sl:23:fnc_traceBox (float XMin;
k3d/share/shaders/k3d_volcube.sl:24:	      float XMax;
k3d/share/shaders/k3d_volcube.sl:26:	      float YMax;
k3d/share/shaders/k3d_volcube.sl:28:	      float ZMax;
k3d/share/shaders/k3d_volcube.sl:29:	      float idx;
k3d/share/shaders/k3d_volcube.sl:32:    extern point P;
k3d/share/shaders/k3d_volcube.sl:33:    extern vector I;
k3d/share/shaders/k3d_volcube.sl:34:    extern normal N;
k3d/share/shaders/k3d_volcube.sl:56:    /*plane_z_max*/
k3d/share/shaders/k3d_volcube.sl:58:    D = ZMax;
k3d/share/shaders/k3d_volcube.sl:64:    /*plane_x_min*/
k3d/share/shaders/k3d_volcube.sl:72:    /*plane_x_max*/
k3d/share/shaders/k3d_volcube.sl:74:    D = XMax;
k3d/share/shaders/k3d_volcube.sl:88:    /*plane_y_max*/
k3d/share/shaders/k3d_volcube.sl:90:    D = YMax;
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:136:		 get_density(point (xcomp(Pos),
k3d/share/shaders/k3d_volcube.sl:154:    extern vector L;
k3d/share/shaders/k3d_volcube.sl:155:    extern color Cl;
k3d/share/shaders/k3d_volcube.sl:159:	diff += Cl * max(0,normalize(L).Nf);
k3d/share/shaders/k3d_volcube.sl:167:/* nomal mixer */
k3d/share/shaders/k3d_volcube.sl:169:fnc_normalMix (normal N1; normal N2; float mixer)
k3d/share/shaders/k3d_volcube.sl:176:    N1_mag *= 1-mixer;
k3d/share/shaders/k3d_volcube.sl:177:    N2_mag *= mixer;
k3d/share/shaders/k3d_volcube.sl:201:    point  outPoint_obj = fnc_traceBox(-.501,.501,-.501,.501,-.501,.501,1,"object");
k3d/share/shaders/k3d_volcube.sl:248:		    Nf = fnc_normalMix(Nf,Vol_Nf,clamp(cur_depth/SurfNormalDepth,0,1));
k3d/share/shaders/k3d_volcube.sl:266:		density_sum += max(0,cur_density);
k3d/share/shaders/k3d_volcube.sl:280:		shad_sum += max(0,cur_density);
k3d/share/shaders/k3d_volcube.sl:294:	/* jump to the next sample point */
k3d/share/shaders/k3d_wallpaper.sl:9: *    _Texturing and Modeling: A Procedural Approach_, by David S. Ebert, ed.,
k3d/share/shaders/k3d_wallpaper.sl:32:    uniform float rmin = 0.01, rmax = 0.03;
k3d/share/shaders/k3d_wallpaper.sl:34:    uniform point p0 = rmax*(cos(0),sin(0),0);
k3d/share/shaders/k3d_wallpaper.sl:67:    Ct = mix(Cs, starcolor, step(0.5,in_out));
k3d/share/shaders/k3d_wallpaper_2stripe.sl:43:  color Ct = mix(Cs, stripecolor, stripe);
k3d/share/shaders/k3d_warningstripes.sl:27:#define filter_width(x) max(abs(Du(x)*du) + abs(Dv(x)*dv), MIN_FILTER_WIDTH)
k3d/share/shaders/k3d_warningstripes.sl:29:float filtered_pulse_train(float edge, period, x, dx)
k3d/share/shaders/k3d_warningstripes.sl:31:	float w = dx / period;
k3d/share/shaders/k3d_warningstripes.sl:32:	float x0 = x/period - w/2;
k3d/share/shaders/k3d_warningstripes.sl:33:	float x1 = x0 + w;
k3d/share/shaders/k3d_warningstripes.sl:38:		extern float nedge;
k3d/share/shaders/k3d_warningstripes.sl:39:		return ((1 - nedge) * floor(t) + max(0, t-floor(t)-nedge));
k3d/share/shaders/k3d_warningstripes.sl:42:	return (integral(x1) - integral(x0)) / w;
k3d/share/shaders/k3d_warningstripes.sl:52:	color Ct = mix(Cs, StripeColor, stripe_position);
k3d/share/shaders/k3d_water.sl:30:#define pulse(a,b,fuzz,x) (smoothstep((a)-(fuzz),(a),(x)) - \

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

k3d/share/shaders/k3d_water.sl:33:#define blend(a,b,x) ((a) * (1 - (x)) + (b) * (x))

k3d/share/shaders/k3d_water.sl:66:					        xcomp(Rdir) - zcomp(Rdir),

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

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

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

k3d/share/shaders/k3d_watercolor.sl:39:	dist = exp(-dist);

k3d/share/shaders/k3d_waterdisplacement.sl:4: *	s, t		surface texture coordinates

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

k3d/share/shaders/k3d_waterlight.sl:12:	float maximum_intensity = 1.0;
k3d/share/shaders/k3d_waterlight.sl:24:			Cl = mix(minimum_intensity, maximum_intensity, float noise(frequency * Ps)) * lightcolor;
k3d/share/shaders/k3d_windowlight.sl:44:  float offset, modulus, yfract, xfract;
k3d/share/shaders/k3d_windowlight.sl:75:	xfract =
k3d/share/shaders/k3d_windowlight.sl:80:      xfract = 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_windywave.sl:12:  PP = txtscale * windfreq * transform("shader", P);
k3d/share/shaders/k3d_wood2.sl:5: *   Makes wood solid texture.
k3d/share/shaders/k3d_wood2.sl:9: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_wood2.sl:25:		  float txtscale = 1;
k3d/share/shaders/k3d_wood2.sl:36:  PP = txtscale * transform("shader", P);
k3d/share/shaders/k3d_wood2.sl:39:  PQ = point(xcomp(PP) * 8, ycomp(PP) * 8, zcomp(PP));
k3d/share/shaders/k3d_wood2.sl:42:  PQ = point(xcomp(PP), my_t, ycomp(PP) + 12.93);
k3d/share/shaders/k3d_wood2.sl:47:  /* \/--  extra line added for fine grain */
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:51:  Ct = mix(lightwood, darkwood, r * r2 * r2);
k3d/share/shaders/k3d_woodcut.sl:9:#define snoise(x) (2*noise(x)-1) 
k3d/share/shaders/k3d_woodcut.sl:10:#define pulse(a,b,fuzz,x) (smoothstep((a)-(fuzz),(a),(x)) - smoothstep((b)-(fuzz),(b),(x)))
k3d/share/shaders/k3d_woodcut.sl:11:#define blend(a,b,x) ((a) * (1 - (x)) + (b) * (x))
k3d/share/shaders/k3d_woodcut.sl:16:float stripemin, stripemax, tt;
k3d/share/shaders/k3d_woodcut.sl:46:illumination = max(max(comp(illumcolor, 0), comp(illumcolor, 1)), comp(illumcolor, 2));
k3d/share/shaders/k3d_woodcut.sl:75:stripemax = 0.5 + smoothstep(0.0, 1.0, illumination)/2.0;
k3d/share/shaders/k3d_woodcut.sl:76:float val = pulse(stripemin, stripemax, fuzz, tt);
k3d/share/shaders/k3d_woodcut.sl:79:float color_val = mix(0.0, 1.0, val);
k3d/share/shaders/k3d_woodcut.sl:88: vector Ndisp = normalize(N) * (0 / max(spacescale,1e-6));
