k3d/share/shaders/k3d_antialiasedchecks.sl:35:  float Nfactor;        /* Multiplicative factor for AA due to normal */
k3d/share/shaders/k3d_antialiasedchecks.sl:40:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_antialiasedchecks.sl:45:  Nfactor = abs (Nf . I) / (length(Nf) * length(I));
k3d/share/shaders/k3d_antialiasedchecks.sl:46:  sfuzz = .5 * swidth * frequency / Nfactor;
k3d/share/shaders/k3d_antialiasedchecks.sl:47:  tfuzz = .5 * twidth * frequency / Nfactor;
k3d/share/shaders/k3d_antialiasedchecks.sl:66:  /* Use the matte reflectance formula */
k3d/share/shaders/k3d_arealight.sl:6: *   surface.  This is perfect for using with area light sources.
k3d/share/shaders/k3d_arealight.sl:28:  vector Nl = normalize(vector "shader"(0, 0, 1));
k3d/share/shaders/k3d_background.sl:4:// Contact: tshead@k-3d.com
k3d/share/shaders/k3d_bluemarble.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brick.sl:7: *   used in conjunction with the "brickbump" displacement shader (and
k3d/share/shaders/k3d_brick.sl:9: *   The staggering isn't exact, however, and this variance is controlled
k3d/share/shaders/k3d_brick.sl:53:  float fact, disp;
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:95:  fact = 1;
k3d/share/shaders/k3d_brick.sl:116:  fact = smoothstep(0, 1.3 * MHF, tt) - smoothstep(1.0 - 1.3 * MHF, 1, tt);
k3d/share/shaders/k3d_brick.sl:117:  fact *= (smoothstep(0, 1.3 * MWF, ss) - smoothstep(1.0 - 1.3 * MWF, 1, ss));
k3d/share/shaders/k3d_brick.sl:118:  fact = pitting * (0.5 * fact + 0.5);
k3d/share/shaders/k3d_brick.sl:120:    fact *
k3d/share/shaders/k3d_brick2.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brick2.sl:55:    /* diffuse reflection model */
k3d/share/shaders/k3d_brick3.sl:7: *   used in conjunction with the "brickbump" displacement shader (and
k3d/share/shaders/k3d_brick3.sl:9: *   The staggering isn't exact, however, and this variance is controlled
k3d/share/shaders/k3d_brick3.sl:30: *      12 Jan 1994 -- recoded by lg in correct shading language.
k3d/share/shaders/k3d_brick3.sl:60:  float Nfactor;
k3d/share/shaders/k3d_brick3.sl:62:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_brickanti.sl:15:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brickanti.sl:78:    /* diffuse reflection model */
k3d/share/shaders/k3d_brickbump.sl:6: *   shader to the surface "brick" shader.  The parameters work exactly
k3d/share/shaders/k3d_brickbump.sl:8: *   in fact matte or plastic gives those nice white cinder block walls.
k3d/share/shaders/k3d_brickbump.sl:40:  float fact, disp;
k3d/share/shaders/k3d_brickbump.sl:49:  fact = 1;
k3d/share/shaders/k3d_brickbump.sl:70:  fact = smoothstep(0, 1.3 * MHF, tt) - smoothstep(1.0 - 1.3 * MHF, 1, tt);
k3d/share/shaders/k3d_brickbump.sl:71:  fact *= (smoothstep(0, 1.3 * MWF, ss) - smoothstep(1.0 - 1.3 * MWF, 1, ss));
k3d/share/shaders/k3d_brickbump.sl:72:  fact = pitting * (0.75 * fact + 0.25);
k3d/share/shaders/k3d_brickbump.sl:74:    fact *
k3d/share/shaders/k3d_brickbump2.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brickbump2.sl:56:    /* compute bump-mapping function for mortar grooves */
k3d/share/shaders/k3d_brickbump2.sl:65:    /* diffuse reflection model */
k3d/share/shaders/k3d_brickbump3.sl:6: *   shader to the surface "brick" shader.  The parameters work exactly
k3d/share/shaders/k3d_brickbump3.sl:8: *   in fact matte or plastic gives those nice white cinder block walls.
k3d/share/shaders/k3d_brickbump3.sl:27: *      12 Jan 1994 -- recoded by lg in correct shading language.
k3d/share/shaders/k3d_brickbump3.sl:38:  parameters, it looks *exactly* like those painted cinderblock walls
k3d/share/shaders/k3d_brickbump3.sl:68:  float fact, disp;
k3d/share/shaders/k3d_brickbump3.sl:92:  fact = 1;
k3d/share/shaders/k3d_brickbump3.sl:109:  fact = smoothstep (0, 1.3*MHF, tt) - smoothstep (1.0-1.3*MHF, 1, tt);
k3d/share/shaders/k3d_brickbump3.sl:110:  fact *= (smoothstep (0, 1.3*MWF, ss) - smoothstep (1.0-1.3*MWF, 1, ss));
k3d/share/shaders/k3d_brickbump3.sl:111:  fact = pitting * (0.75 * fact + 0.25);
k3d/share/shaders/k3d_brickbump3.sl:112:  disp -= fact * pow(noise ((ss+sbrick)*pockfrequency/BMHEIGHT,
k3d/share/shaders/k3d_brickperturb.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_brickperturb.sl:56:    /* diffuse reflection model */
k3d/share/shaders/k3d_brushedmetal.sl:9: *   uroughness, vroughness - separate roughnesses for u and v directions
k3d/share/shaders/k3d_brushedmetal.sl:14: *   _Advanced RenderMan: Creating CGI for Motion Picture_, 
k3d/share/shaders/k3d_brushedmetal2.sl:7: *  highlight, and also can use a reflection map.
k3d/share/shaders/k3d_brushedmetal2.sl:19: *  Kr			- coefficient of reflectivity
k3d/share/shaders/k3d_brushedmetal2.sl:26: *  twist		- allows you to twist the direction of anisotropy
k3d/share/shaders/k3d_brushedmetal2.sl:33:anisospecular (vector VA; float specspread; float specwidth)
k3d/share/shaders/k3d_brushedmetal2.sl:36:    extern vector I;
k3d/share/shaders/k3d_brushedmetal2.sl:41:    vector V = normalize(-I);
k3d/share/shaders/k3d_brushedmetal2.sl:48:        extern vector L;  
k3d/share/shaders/k3d_brushedmetal2.sl:54:            vector LN = normalize (L);
k3d/share/shaders/k3d_brushedmetal2.sl:55:	    vector H = normalize (V + LN);
k3d/share/shaders/k3d_brushedmetal2.sl:77:	point Po = transform("object",P);
k3d/share/shaders/k3d_brushedmetal2.sl:79:	vector D, V= normalize(-I);
k3d/share/shaders/k3d_brushedmetal2.sl:80:	vector Nf, Ntmp;
k3d/share/shaders/k3d_brushedmetal2.sl:85:	vector VA = rotate(normalize(dPdu), twist, zro, normalize(N));
k3d/share/shaders/k3d_brushedmetal2.sl:96:	      D = reflect(-V, Ntmp);
k3d/share/shaders/k3d_brushedmetal3.sl:6: * "Measuring and Modeling Anisotropic Reflection," ACM Computer
k3d/share/shaders/k3d_brushedmetal3.sl:10: *   V - unit viewing direction (from P toward the camera)
k3d/share/shaders/k3d_brushedmetal3.sl:12: *          direction for the anisotropy.
k3d/share/shaders/k3d_brushedmetal3.sl:14: *   yroughness - the roughness for the direction of the surface
k3d/share/shaders/k3d_brushedmetal3.sl:18:LocIllumWardAnisotropic (normal N;  vector V;
k3d/share/shaders/k3d_brushedmetal3.sl:19:                         vector xdir;  float xroughness, yroughness;)
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: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:35:            vector LN = normalize (L);
k3d/share/shaders/k3d_brushedmetal3.sl:38:                vector H = normalize (V + LN);
k3d/share/shaders/k3d_brushedmetal3.sl:58:    vector xdir = normalize (dPdu);
k3d/share/shaders/k3d_bubbly.sl:7: *  "a cellular texture basis function" by Steven Worley in the 
k3d/share/shaders/k3d_bubbly.sl:20: *            the bubbles. set this to zero for a perfect grid of bubbles.
k3d/share/shaders/k3d_bubbly.sl:37:  point Po = transform("object",P)*mult;
k3d/share/shaders/k3d_bubbly.sl:41:  vector offset;
k3d/share/shaders/k3d_bubbly.sl:51:	offset = vector(a,b,c);
k3d/share/shaders/k3d_bubbly.sl:53:	nzcell = surrcell + ((vector cellnoise(surrcell)-.5)*Nzscale);
k3d/share/shaders/k3d_castucco.sl:12: *   octaves - how many octaves of fBm to sum
k3d/share/shaders/k3d_castucco.sl:25:			  float octaves = 3;
k3d/share/shaders/k3d_castucco.sl:37:  /* Compute some fractional Brownian motion */
k3d/share/shaders/k3d_causticlight.sl:17:    uniform vector axis = normalize(to-from);
k3d/share/shaders/k3d_celld.sl:23:				   function } */
k3d/share/shaders/k3d_ceramictiles.sl:2: * ceramictiles.sl
k3d/share/shaders/k3d_ceramictiles.sl:7: *   projection, textureprojspace, mx -  define the projection used to
k3d/share/shaders/k3d_ceramictiles.sl:10: *     for s and t directions)
k3d/share/shaders/k3d_ceramictiles.sl:12: *     expressed as a fraction of the tile-to-tile spacing.
k3d/share/shaders/k3d_ceramictiles.sl:35: *   Kr, blur, eta - reflection parameters for the tile
k3d/share/shaders/k3d_ceramictiles.sl:43: * Contacts:  lg@pixar.com
k3d/share/shaders/k3d_ceramictiles.sl:54:#include "k3d_project.h"
k3d/share/shaders/k3d_ceramictiles.sl:133:/* Compute the color of a ceramic object.  Like plastic, but use a
k3d/share/shaders/k3d_ceramictiles.sl:134: * "glossy" specular term.  We're actually blending between a purely
k3d/share/shaders/k3d_ceramictiles.sl:137: * off highlights and reflections.
k3d/share/shaders/k3d_ceramictiles.sl:146:  extern vector I;
k3d/share/shaders/k3d_ceramictiles.sl:151:  vector IN = normalize(I), V = -IN;
k3d/share/shaders/k3d_ceramictiles.sl:153:  vector R, T;
k3d/share/shaders/k3d_ceramictiles.sl:165:surface k3d_ceramictiles(float Ka = 1, Ks = .75, roughness =
k3d/share/shaders/k3d_ceramictiles.sl:175:			 string projection = "st";
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:212:   * per-tile normal variation to break up reflections.
k3d/share/shaders/k3d_ceramictiles.sl:220:  Ntile += 0.05 * (vector cellnoise(tileindex + 5) - 0.5);
k3d/share/shaders/k3d_checkerboard.sl:46:  // Diffuse reflection model ...
k3d/share/shaders/k3d_checkerboard_solid.sl:35:	// Diffuse reflection model ...
k3d/share/shaders/k3d_clay.sl:7: *   _Advanced RenderMan: Creating CGI for Motion Picture_, 
k3d/share/shaders/k3d_cloudplane.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_contacshadow.sl:1:/* renamed shader to SIG2k_srf_contact to be consistent with RMR 
k3d/share/shaders/k3d_contacshadow.sl:7:** Render a contact shadow based on depth data derived from a light  
k3d/share/shaders/k3d_contacshadow.sl:8:** placed onto the surface which catches the contact shadow  
k3d/share/shaders/k3d_contacshadow.sl:14:k3d_contactshadow (  
k3d/share/shaders/k3d_contacshadow.sl:17:    float influence = 1.0;      /* world space distance in which effect is visible */  
k3d/share/shaders/k3d_contacshadow.sl:18:    float gamma = 0.5;          /* controls ramp on of effect over distance */  
k3d/share/shaders/k3d_contacshadow.sl:30:    textureinfo(shadowname, "projectionmatrix", matNP);  
k3d/share/shaders/k3d_contacshadow.sl:44:	   object as recorded in the shadow map */
k3d/share/shaders/k3d_contacshadow.sl:53:	   contact shadow effect */  
k3d/share/shaders/k3d_corktile.sl:6: * Last Update: 16 October 2000
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:35:/* Bias function - Perlin and Hoffert 1989 */
k3d/share/shaders/k3d_corktile.sl:46:		/* 	the pattern is built up of the sum of two offset noise functions, perturbed slightly
k3d/share/shaders/k3d_corktile.sl:47:		and used to select a color from a spline, combined with an overlay of the dark 
k3d/share/shaders/k3d_corktile.sl:48:		markings that characterise cork
k3d/share/shaders/k3d_craters.sl:18:   float pitfactor = .7; /* chance of crater occuring in a cell */
k3d/share/shaders/k3d_craters.sl:19:   float octaves=9;      /* number of scales used - use lower numbers for cartoony effects */
k3d/share/shaders/k3d_craters.sl:20:   float lac=1.91341;    /* diameter spacing between successive octaves */
k3d/share/shaders/k3d_craters.sl:21:   float amp=1.91341;    /* amplitude reduction between successive octaves */
k3d/share/shaders/k3d_craters.sl:24:   /* you'll get artifacts if you go too much higher than 1 */
k3d/share/shaders/k3d_craters.sl:26:   float distortamp = 0.0005; /* Crater distortion.  You'll get artifacts if it goes too high. */
k3d/share/shaders/k3d_craters.sl:33:    float sctr, tctr, scell, tcell,scellctr,tcellctr;
k3d/share/shaders/k3d_craters.sl:42:    for (lev = 0; lev < octaves; lev += 1)
k3d/share/shaders/k3d_craters.sl:46:	scellctr = floor(s*sc/swidth);
k3d/share/shaders/k3d_craters.sl:47:	tcellctr = floor(t*sc/swidth);
k3d/share/shaders/k3d_craters.sl:53:	    scell = scellctr + i;
k3d/share/shaders/k3d_craters.sl:56:		tcell = tcellctr + j;
k3d/share/shaders/k3d_craters.sl:57:		if ( cellnoise(7*scell-9.5, 7*tcell+7.5) < pitfactor)
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:61:		    sctr = cellsizescale * (scell + 0.5 + jitter * cellnoise(scell+0.5, tcell+0.5));
k3d/share/shaders/k3d_craters.sl:62:		    tctr = cellsizescale * (tcell + 0.5 + jitter * cellnoise(scell+3.5, tcell+8.5));
k3d/share/shaders/k3d_craters.sl:63:		    ss = s - sctr;
k3d/share/shaders/k3d_craters.sl:64:		    tt = t - tctr;
k3d/share/shaders/k3d_crayon.sl:13:	txtscale  - an overall scaling factor
k3d/share/shaders/k3d_crayon.sl:22:		graduation of shading from top to bottom of the object
k3d/share/shaders/k3d_crayon.sl:37:	/* an antaliased noise function, which returns noise of a wavelenth always greater than
k3d/share/shaders/k3d_crayontoon.sl:20:  vector Nf = normalize(N);

k3d/share/shaders/k3d_cyclone.sl:12:		    float omega = 0.675; float octaves = 4;
k3d/share/shaders/k3d_cyclone.sl:17:  point PN;			/* Normalized vector in texture space */
k3d/share/shaders/k3d_cyclone.sl:19:  float l, o, a, i;		/* Loop control for fractal sum */
k3d/share/shaders/k3d_cyclone.sl:38:      /* Subtract out "eye" of storm */
k3d/share/shaders/k3d_cyclone.sl:57:      for(i = 0; i < octaves && o >= VERY_SMALL; i += 1)
k3d/share/shaders/k3d_decalplastic.sl:4:// Contact: tshead@k-3d.com
k3d/share/shaders/k3d_decalplastic.sl:47:	vector V = -normalize(I);
k3d/share/shaders/k3d_dented.sl:9: *   power	   	controls the fractal dimension of the dents (1 looks
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_ember.sl:6: * to represent it's life. The desired effect is that of glowing particles that
k3d/share/shaders/k3d_ember.sl:21:	point QQ = transform ("world", point "object" (0, 0, 0));
k3d/share/shaders/k3d_ember.sl:28:	vector V;
k3d/share/shaders/k3d_ember.sl:34:	V = vector -NI;
k3d/share/shaders/k3d_ember.sl:40:	// basically, the standard specular function, but so that the highlight is
k3d/share/shaders/k3d_ember.sl:61:	// the colours for the fire effect from F. Kenton Musgrave's KMFlame.sl
k3d/share/shaders/k3d_eroded.sl:3:/* Listing 16.17  Surface shader eroding the surface of an object */
k3d/share/shaders/k3d_eroded.sl:19:	      W = transform ("object", P);
k3d/share/shaders/k3d_eroded.sl:24:		/* Calculate a simple fractal 1/f noise function */
k3d/share/shaders/k3d_eyeball.sl:8: *   part (eyeball), and blood vessels can be set individually.  Fractal
k3d/share/shaders/k3d_eyeball.sl:9: *   functions are used for the veining and the iris mottling.
k3d/share/shaders/k3d_eyeball.sl:33: *      10 Jan 1994 - recoded by lg in correct shading language.
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:75:  PO = transform ("object", P) + index;
k3d/share/shaders/k3d_eyeball.sl:90:   * of turbulence functions.  Some stretching is done to get it to look
k3d/share/shaders/k3d_eyeball.sl:109:   * just a stretched turbulence function.
k3d/share/shaders/k3d_fakesky.sl:9:surface k3d_fakesky(vector up = (0,0,1); color skycolor = (.5, .6, 1.)) {

k3d/share/shaders/k3d_filament.sl:14:	/* Calculate the distance of (s,t) from a spiral as a fraction [0,1] */
k3d/share/shaders/k3d_filament.sl:17:	/* Threshold the fraction against the fractional filament width */
k3d/share/shaders/k3d_fire.sl:24:  /* compress ss & offset both by factor of current frame */
k3d/share/shaders/k3d_flame.sl:9: *    chaosscale, chaosoffset, octaves - control the fBm
k3d/share/shaders/k3d_flame.sl:10: *    flameheight, flameamplitude - scaling factors
k3d/share/shaders/k3d_flame.sl:14: *    setting the "octaves" parameter based on distance from eye point.
k3d/share/shaders/k3d_flame.sl:38:		  float octaves = 7; float flameoffset = 0.0;
k3d/share/shaders/k3d_flame.sl:50:  for(i = 0; i < octaves; i += 1)
k3d/share/shaders/k3d_fractal.sl:15:k3d_fractal(float H = 0.8, lacunarity = 2.5, octaves = 7, offset = 0.9, sharpness = 4, threshold = 12, Kt = 0.1)

k3d/share/shaders/k3d_fractal.sl:20:	for( i=0; i<octaves; i += 1 ) {

k3d/share/shaders/k3d_fractal.sl:21:       		/* First octaves */

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

k3d/share/shaders/k3d_fresnelplastic.sl:16:#include "k3d_reflections.h"
k3d/share/shaders/k3d_fresnelplastic.sl:33:   /* desc { Index of Refraction.  Used to get Fresnel falloff.
k3d/share/shaders/k3d_fresnelplastic.sl:41:   float Kr = 0;  /* cat Reflection desc {Strength of reflection } */
k3d/share/shaders/k3d_fresnelplastic.sl:42:   string reflectMap = ""; 
k3d/share/shaders/k3d_fresnelplastic.sl:43:   /* cat Reflection desc {Name of reflection map. } type texture */
k3d/share/shaders/k3d_fresnelplastic.sl:44:   float reflectBlur = 0; 
k3d/share/shaders/k3d_fresnelplastic.sl:45:   /* cat Reflection desc {Percentage amount to blur map} */
k3d/share/shaders/k3d_fresnelplastic.sl:46:   string reflectSpace = "world";  /* cat Reflection 
k3d/share/shaders/k3d_fresnelplastic.sl:47:   desc {Space the reflection calculations are performed in. } */
k3d/share/shaders/k3d_fresnelplastic.sl:48:   float reflectDist = 1e10;
k3d/share/shaders/k3d_fresnelplastic.sl:49:   /* cat Reflection desc {The size of the room to base the reflection
k3d/share/shaders/k3d_fresnelplastic.sl:64:    vector V = -normalize(I);
k3d/share/shaders/k3d_fresnelplastic.sl:65:    vector R = normalize (reflect (I, Nf));
k3d/share/shaders/k3d_fresnelplastic.sl:81:    /* Calculate fresnel index of refraction */
k3d/share/shaders/k3d_fresnelplastic.sl:103:    if (reflectMap != "")
k3d/share/shaders/k3d_fresnelplastic.sl:104:      Cr = Environment (reflectMap, reflectSpace, reflectDist, 
k3d/share/shaders/k3d_fresnelplastic.sl:105:			P, R, reflectBlur, reflOpacity);
k3d/share/shaders/k3d_funkyglass.sl:15:  vector V;
k3d/share/shaders/k3d_fur2.sl:19:    vector LN, NN;
k3d/share/shaders/k3d_fur2.sl:23:    LN = normalize(vector(Lin));
k3d/share/shaders/k3d_fur2.sl:24:    NN = normalize(vector(Nin));
k3d/share/shaders/k3d_fur2.sl:65:	 varying vector clump_vect  = vector 0;
k3d/share/shaders/k3d_fur2.sl:70:    vector T = normalize (dPdv); /* tangent along length of hair */
k3d/share/shaders/k3d_fur2.sl:71:    vector V = -normalize(I);    /* V is the view vector */
k3d/share/shaders/k3d_fur2.sl:72:    color Cspec = 0, Cdiff = 0;  /* collect specular & diffuse light */
k3d/share/shaders/k3d_fur2.sl:74:    vector nL;
k3d/share/shaders/k3d_fur2.sl:76:    vector S = nSN^T;     /* Cross product of the tangent along the hair and surface normal */
k3d/share/shaders/k3d_fur2.sl:77:    vector N_hair = (T^S); /* N_hair is a normal for the hair oriented "away" from the surface */
k3d/share/shaders/k3d_fur2.sl:78:    vector norm_hair;
k3d/share/shaders/k3d_fur2.sl: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:128:                                    abs(clamp(nL.normalize(-1*clump_vect), -1, 0)));
k3d/share/shaders/k3d_glass.sl:2: * glass.sl -- Shiny reflective & refractive glass, using ray tracing.
k3d/share/shaders/k3d_glass.sl:6: *   reflections and refractions of the environment.
k3d/share/shaders/k3d_glass.sl:10: *    Kr - coefficient for mirror-like reflections of environment
k3d/share/shaders/k3d_glass.sl:11: *    blur - how blurry are the reflections? (0 = perfectly sharp)
k3d/share/shaders/k3d_glass.sl:13: *    rayjitter, raysamples - ray tracing controls for reflection
k3d/share/shaders/k3d_glass.sl:14: *    Kt - coefficient for refracted transmission
k3d/share/shaders/k3d_glass.sl:16: *    refrblur - how blurry are the refractions? (0 = perfectly sharp)
k3d/share/shaders/k3d_glass.sl:17: *    eta - the coefficient of refraction of the glass
k3d/share/shaders/k3d_glass.sl:18: *    reflrayjitter, refrraysamples - ray tracing controls for refraction
k3d/share/shaders/k3d_glass.sl:25: *   _Advanced RenderMan: Creating CGI for Motion Picture_, 
k3d/share/shaders/k3d_gloop.sl:6: * generated from the gradient of a noise function.
k3d/share/shaders/k3d_gloop.sl:8: * the "stupid renderman tricks" section of the 1998
k3d/share/shaders/k3d_gloop.sl:28:  vector overdist = .1;
k3d/share/shaders/k3d_gloop.sl:29:  vector stepsize = magnitude/freq;
k3d/share/shaders/k3d_gloop.sl:31:  point  Psh = transform("object",P)*freq;
k3d/share/shaders/k3d_gloop.sl:34:  vector dPduN = normalize(vtransform("object",dPdu));
k3d/share/shaders/k3d_gloop.sl:35:  vector dPdvN = normalize(vtransform("object",dPdv));
k3d/share/shaders/k3d_gloop.sl:40:  /*noise function at the point, over in u, and over in v*/
k3d/share/shaders/k3d_gloop.sl:48:  /*init deflected derivatives*/
k3d/share/shaders/k3d_gloop.sl:49:  vector DdPdu = dPduN;
k3d/share/shaders/k3d_gloop.sl:50:  vector DdPdv = dPdvN;
k3d/share/shaders/k3d_gloop.sl:52:  vector step = DdPdu^DdPdv;
k3d/share/shaders/k3d_gloop.sl:56:    P -= vtransform("object","current",step)*nz*stepsize;
k3d/share/shaders/k3d_glow.sl:14:      // Calculate a "strength" function based on incidence
k3d/share/shaders/k3d_glow.sl:20:      // and skip pre-multiplication to get an "add" effect ...
k3d/share/shaders/k3d_gmarbtile_polish.sl:6: *   traced reflections) and cut into tiles (divided in xy texture space).
k3d/share/shaders/k3d_gmarbtile_polish.sl:10: *   Kr - reflectivity (shininess) of the surface
k3d/share/shaders/k3d_gmarbtile_polish.sl:14: *   veinfreq - controls the frequency of the veining effects
k3d/share/shaders/k3d_gmarbtile_polish.sl:25:#include "k3d_reflections.h"
k3d/share/shaders/k3d_gmarbtile_polish.sl:46:  vector offset;
k3d/share/shaders/k3d_gmarbtile_polish.sl:47:  vector refldir;
k3d/share/shaders/k3d_gmarbtile_polish.sl:64:  offset = vector(7 * whichs, 15 * whicht, 0 /*-23*floor(zcomp(PQ))*/ );
k3d/share/shaders/k3d_gmarbtile_polish.sl:78:  PP += vector(35.2, -21.9, 6.25) + 0.5 * vfBm(PP, dPP, 6, 2, 0.5);
k3d/share/shaders/k3d_gmarbtile_polish.sl:80:  /* Now calculate the veining function for the lookup area */
k3d/share/shaders/k3d_gmarbtile_polish.sl:94:	       filteredsnoise(2 * (PP + vector(-4.4, 8.34, 27.1)), 2 * dPP));
k3d/share/shaders/k3d_gmarbtile_polish.sl:101:  vector V = normalize(I);
k3d/share/shaders/k3d_gmarbtile_polish.sl:104:  env += SampleEnvironment(P, reflect(V, Nf), Kr, blur, ENVPARAMS);
k3d/share/shaders/k3d_gooch.sl:9: *                 http://www.cs.utah.edu/~gooch/SIG98/abstract.html
k3d/share/shaders/k3d_gooch.sl:12: *  Ka           : ambient factor
k3d/share/shaders/k3d_gooch.sl:13: *  Kd           : diffuse factor
k3d/share/shaders/k3d_gooch.sl:14: *  Ks           : specular factor
k3d/share/shaders/k3d_gooch.sl:15: *  alpha        : Gooch cool color factor
k3d/share/shaders/k3d_gooch.sl:16: *  beta         : Gooch warm color factor
k3d/share/shaders/k3d_gooch.sl:17: *  b            : used to construct the cool color
k3d/share/shaders/k3d_gooch.sl:18: *  y            : used to construct the warm color
k3d/share/shaders/k3d_gouge.sl:14:	float	y = ycomp(transform("object",P));	/* convert to object space	 */
k3d/share/shaders/k3d_gouge.sl:17:    *  amount for each pin so that similarity is not detected.  The texture 
k3d/share/shaders/k3d_gouge.sl:18:    *  determines the size of the gouge. Multiply by the Km factor, then 
k3d/share/shaders/k3d_graphic_lines.sl:106:	vector Nf_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:107:	vector V_highlight;
k3d/share/shaders/k3d_graphic_lines.sl:157:	vector Ndisp_highlight=normalize(N_highlight)*(0/max(spacescale_highlight,1e-6));
k3d/share/shaders/k3d_graphic_lines.sl:184:	vector Nf_paint;
k3d/share/shaders/k3d_graphic_lines.sl:185:	vector V_paint;
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:256:	vector Nf_ink;
k3d/share/shaders/k3d_graphic_lines.sl:257:	vector V_ink;
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:314:	glinespec(vector N, V; float roughness)
k3d/share/shaders/k3d_graphic_lines.sl:317:		vector H;
k3d/share/shaders/k3d_graphic_lines.sl:329:	vector normI, half;
k3d/share/shaders/k3d_grass_displace.sl:4: * I took used some of RManNotes function to assist in

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

k3d/share/shaders/k3d_grass_surface.sl:2: * Again, similar structure of grass.sl

k3d/share/shaders/k3d_greenmarble.sl:5: *   Makes a marble-like surface using a turbulence function.
k3d/share/shaders/k3d_greenmarble.sl:12: *   veinfreq - controls the frequency of the veining effects
k3d/share/shaders/k3d_greenmarble.sl:53:  PP += vector(35.2, -21.9, 6.25) + 0.5 * vfBm(PP, dPP, 6, 2, 0.5);
k3d/share/shaders/k3d_greenmarble.sl:55:  /* Now calculate the veining function for the lookup area */
k3d/share/shaders/k3d_greenmarble.sl:67:    smoothstep(-0.1, 0.05, snoise(2 * (PP + vector(-4.4, 8.34, 27.1))));
k3d/share/shaders/k3d_grids.sl:76:vector G1_V = -normalize(I);
k3d/share/shaders/k3d_grids_disp.sl:8: vector Ndisp = dir * (amp / max(spacescale,1e-6));
k3d/share/shaders/k3d_hair.sl:13:	vector T = normalize (dPdv); /* tangent along length of hair */
k3d/share/shaders/k3d_hair.sl:14:	vector V = -normalize(I);    /* V is the view vector */
k3d/share/shaders/k3d_hair.sl:15:	color Cspec = 0, Cdiff = 0;  /* collect specular & diffuse light */
k3d/share/shaders/k3d_hdr_light.sl:1:/*Environment Light to project an environment map onto 3D geometry - designed

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

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

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

k3d/share/shaders/k3d_hdr_light.sl:20:	vector D = normalize(vtransform("world",R));

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:66:		/*Use light ray direction as map lookup NB L points from surface to lightsource*/

k3d/share/shaders/k3d_hdr_light.sl:67:		vector R = normalize(vtransform(envspace,L));

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

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

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

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

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

k3d/share/shaders/k3d_hdr_surface.sl:19:	vector D = normalize(vtransform("world",R));

k3d/share/shaders/k3d_hdr_surface.sl:52:	vector R = normalize(vtransform(envspace,(origin - P)));

k3d/share/shaders/k3d_hdri2.sl:12:    vector Lenv = vtransform (envspace, P-Ps);
k3d/share/shaders/k3d_hexatile_bump.sl:12:*	float ScaleSS	= 3 			---	Scale the "s" direction.
k3d/share/shaders/k3d_hexatile_bump.sl:13:*	float ScaleTT	= 3 			---	Scale the "t" direction.
k3d/share/shaders/k3d_hexatile_bump.sl:14:*	float Rotate	= 180 			---	Rotate the tile default "Z-direction"
k3d/share/shaders/k3d_hexatile_bump.sl:16:*	point P2	= point(0,0,1) 		---	The x,y,z direction for Rotate.
k3d/share/shaders/k3d_hexatile_bump.sl:17:*	string Projection = "planar" 		---	Projection "preoject.h"
k3d/share/shaders/k3d_hexatile_bump.sl:18:*	string Space	  = "shader" 		---	Space for projection.
k3d/share/shaders/k3d_hexatile_bump.sl:31:* Larry Gritz "noises.h", "project.h", "patterns.h"
k3d/share/shaders/k3d_hexatile_bump.sl:32:* Arman "Advanced Renderman-"Creating CGI for Motion Picture.
k3d/share/shaders/k3d_hexatile_bump.sl:38:#include "k3d_project.h"
k3d/share/shaders/k3d_hexatile_bump.sl:87:	string Projection = "planar"; 
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:122:Displace (normal dir; vector space; float amp; float truedisp;)
k3d/share/shaders/k3d_hexatile_bump.sl:126:	vector Ndisp = dir * (amp / max(spacescale,1e-6));
k3d/share/shaders/k3d_hexatile_bump.sl:131:vector VShd = vtransform("shader", vector(normalize(N)));
k3d/share/shaders/k3d_hextile.sl:12: *    shoes, which really only affects the tile part not the mortar part.
k3d/share/shaders/k3d_hextile.sl:74:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_imagelayerclouds.sl:8:			     float octaves = 8, omega = 0.5, lambda = 2;
k3d/share/shaders/k3d_imagelayerclouds.sl:19:  /* Use fractional Brownian motion to compute a value for this point */
k3d/share/shaders/k3d_imagelayerclouds.sl:20:/*  value = fBm (PP, omega, lambda, octaves); */
k3d/share/shaders/k3d_imagelayerclouds.sl:25:  for(i = 0; i < octaves; i += 1)
k3d/share/shaders/k3d_incandplastic.sl:21:  vector NI;

k3d/share/shaders/k3d_indirect.sl:1:/* indirect.sl - retrieve radiosity data from the "ray server"
k3d/share/shaders/k3d_indirect.sl:3: * This shader is never called from BMRT -- the "indirect" light source
k3d/share/shaders/k3d_indirect.sl:14:light k3d_indirect(output float __nonspecular = 1;)
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:28:    Cl = rs_indirect(Ps, axis);
k3d/share/shaders/k3d_leather.sl:19:	float Ks = .2;           /* Specular reflection coeff.    */

k3d/share/shaders/k3d_leather.sl:20:	float Kd = 1;            /* Diffuse reflection coeff.     */

k3d/share/shaders/k3d_leather.sl:22:	float Kr = .2;             /* Mirror-like reflection coeff. */

k3d/share/shaders/k3d_leather.sl:37:	color specularcolor = 1;  	/* Specular reflection color     */

k3d/share/shaders/k3d_leather.sl:45:	vector Nf, V, Rdir;

k3d/share/shaders/k3d_leather.sl:49:	color cs, small_speckle, base_color, reflect;

k3d/share/shaders/k3d_leather.sl:75:	#define BASE_SF          1      /* s-factor for big noise          */

k3d/share/shaders/k3d_leather.sl:76:	#define BASE_TF          1      /* t-factor for big noise          */

k3d/share/shaders/k3d_leather.sl:77:	#define BASE_NF          100    /* scaling factor for small noise  */

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

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

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

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

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

k3d/share/shaders/k3d_leather.sl:167:	 * also dented a bit (alas, no real apples are perfectly

k3d/share/shaders/k3d_leather.sl:170:	#define DISP_SF     10             /* s-factor for dent noise */

k3d/share/shaders/k3d_leather.sl:171:	#define DISP_TF     30             /* t-factor for dent noise */

k3d/share/shaders/k3d_leather.sl:185:	 * 'Mirror' reflections

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

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

k3d/share/shaders/k3d_leather.sl:196:		Rdir = normalize(reflect(normalize(I), Nf));

k3d/share/shaders/k3d_leather.sl:197:		reflect = RayTrace(P, Rdir, 0, 1, 1);

k3d/share/shaders/k3d_leather.sl:199:		reflect = 0;

k3d/share/shaders/k3d_leather.sl:202:	reflect = 0;

k3d/share/shaders/k3d_leather.sl:211:	           specularcolor * (Kr * reflect +

k3d/share/shaders/k3d_lensflare.sl:6: *   These effects happen in real cameras when the camera points toward
k3d/share/shaders/k3d_lensflare.sl:7: *   a bright light source, resulting in interreflections within the
k3d/share/shaders/k3d_lensflare.sl:13: *   intensity - overall scale of intensity of all lens flare effects
k3d/share/shaders/k3d_lensflare.sl:14: *   bloomintensity - overall intensity of the "bloom" effect.  Setting
k3d/share/shaders/k3d_lensflare.sl:15: *          this to 0 removes the bloom effect altogether.
k3d/share/shaders/k3d_lensflare.sl:18: *          bloom effect (bloomstarry=0 means perfectly round bloom)
k3d/share/shaders/k3d_lensflare.sl:19: *   starburstintensity - overall intensity of starburst effect (0=none)
k3d/share/shaders/k3d_lensflare.sl:21: *          size and shape of the starburst effect
k3d/share/shaders/k3d_lensflare.sl:22: *   rainbowintensity - intensity of rainbow effect (0=none)
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:48:/* Helper function: compute the aspect ratio of the frame */
k3d/share/shaders/k3d_lensflare.sl:50:aspectratio()
k3d/share/shaders/k3d_lensflare.sl:59:/* Helper function: compute the camera's diagonal field of view */
k3d/share/shaders/k3d_lensflare.sl:63:  uniform vector corner = vector(transform("NDC", "camera", point(1, 1, 0)));
k3d/share/shaders/k3d_lensflare.sl:64:  uniform float halfangle = acos(normalize(corner).vector(0, 0, 1));
k3d/share/shaders/k3d_lensflare.sl:114:  uniform float aspect = abs(aspectratio());
k3d/share/shaders/k3d_lensflare.sl:117:  point Pndc = (transform("NDC", P) - vector(.5, .5, 0)) * 2;
k3d/share/shaders/k3d_lensflare.sl:118:  Pndc *= vector(aspect, 1, 0);
k3d/share/shaders/k3d_lensflare.sl:121:  illuminance(P, vector "camera"(0, 0, 1), PI / 2)
k3d/share/shaders/k3d_lensflare.sl:123:    float atten = acos(zcomp(normalize(vector transform("camera", P + L))));
k3d/share/shaders/k3d_lensflare.sl:132:    point Plight = (transform("NDC", P + L) - vector(.5, .5, 0)) * 2;
k3d/share/shaders/k3d_lensflare.sl:133:    Plight *= vector(aspect, 1, 0);
k3d/share/shaders/k3d_lensflare.sl:135:    vector Lvec = Plight - Pndc;
k3d/share/shaders/k3d_lensflare.sl:139:     * Handle the image of the lamp.  There are 3 effects:
k3d/share/shaders/k3d_lensflare.sl:178:    vector axis = normalize(vector Plight);
k3d/share/shaders/k3d_luna.sl:35:		 float octaves = 8;
k3d/share/shaders/k3d_luna.sl:67:  /* bumpy = fBm (PP, omega, lacunarity, octaves); */
k3d/share/shaders/k3d_luna.sl:71:  for(i = 0; i < octaves; i += 1)
k3d/share/shaders/k3d_luna.sl:100:  /* get normalized vector "v" */
k3d/share/shaders/k3d_lunette.sl:8: *   surfaces placed beneath your scene which act as the ground.  The default
k3d/share/shaders/k3d_lunette.sl:10: *   hero objects that you might wish to show off.  The shader is a copy of a
k3d/share/shaders/k3d_lunette.sl:12: *   which I believe has something to do with spectacles in French.  Hence the
k3d/share/shaders/k3d_lunette.sl:22: *   gridDensity - effective opacity of the grid lines
k3d/share/shaders/k3d_lunette.sl:23: *   noiseScale - scale factor for the fBm noise relative to the grid size
k3d/share/shaders/k3d_lunette.sl:24: *   noiseRandom - randomization factor for the fBm noise
k3d/share/shaders/k3d_lunette.sl:25: *   maxOctaves, lunacrity, gain - work as in the fBm function
k3d/share/shaders/k3d_lunette.sl: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:49: *                           and tt directions.  Also scales the noise in both
k3d/share/shaders/k3d_lunette.sl:50: *                           directions appropriately.
k3d/share/shaders/k3d_lunette.sl:52: *                              respectively; expressed as a fraction of the
k3d/share/shaders/k3d_lunette.sl:59: *   maxOctaves - Maximum number of octaves for the fBm noise.
k3d/share/shaders/k3d_lunette.sl:67: *   gridDensity - Effective opacity of the grid pattern over the underlying
k3d/share/shaders/k3d_lunette.sl:74:	float ssrepeats;	/* number of repeats in the ss direction */
k3d/share/shaders/k3d_lunette.sl:75:	float ttrepeats;	/* number of repeats in the tt direction */
k3d/share/shaders/k3d_lunette.sl:82:	uniform float maxOctaves;	/* maximum number of octives for the noise */
k3d/share/shaders/k3d_lunette.sl:114:		noisePt, noisefilterwidth, maxOctaves, lunacrity, gain
k3d/share/shaders/k3d_lunette.sl:148:	float gridDensity = .5;		/* Effective opacity of the grid */
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_metal.sl:14:  vector V = -normalize(I);
k3d/share/shaders/k3d_mondometal.sl:7: * las partes blancas producen un efecto metalico y donde lo oscuro 

k3d/share/shaders/k3d_mondometal.sl:34:    string abReflectionMap = "";

k3d/share/shaders/k3d_mondometal.sl:35:    float abReflectionUp = 0;

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

k3d/share/shaders/k3d_mondometal.sl:37:    float abReflectionMapBlur = 1;

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

k3d/share/shaders/k3d_mondometal.sl:60:    vector V, D;

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:202:    /* get reflection from environment map **/

k3d/share/shaders/k3d_mondometal.sl:203:    if( abReflectionMap != "" )

k3d/share/shaders/k3d_mondometal.sl:205:        D = reflect(-V, Nf);

k3d/share/shaders/k3d_mondometal.sl:207:        if( abReflectionUp != 0 )

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

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

k3d/share/shaders/k3d_mondometal.sl:212:                color environment(abReflectionMap, D,

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

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

k3d/share/shaders/k3d_mysky.sl:18: *    txtscale - overall scaling factor

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

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

k3d/share/shaders/k3d_mysky.sl:55:	     float octaves = 8, omega = 0.5, lambda = 2;

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

k3d/share/shaders/k3d_mysky.sl:67:  /*  value = fBm (PP, omega, lambda, octaves); */

k3d/share/shaders/k3d_mysky.sl:70:  for (i = 0;  i < octaves;  i += 1) {

k3d/share/shaders/k3d_noisysmoke.sl:13:             /* Optimize: one octave only if not lit */                     \
k3d/share/shaders/k3d_noisysmoke.sl:16:                 for (i=1;  i<octaves;  i+=1) {                             \
k3d/share/shaders/k3d_noisysmoke.sl:35:		      float octaves = 3, freq = 1, smokevary = 1;
k3d/share/shaders/k3d_noisysmoke.sl:40:  /* PRMan and BMRT used to have I reverse of each other, conflict in spec */
k3d/share/shaders/k3d_noisysmoke.sl:42:  vector incident = vtransform("shader", -I);
k3d/share/shaders/k3d_noisysmoke.sl:46:  vector incident = vtransform("shader", I);
k3d/share/shaders/k3d_noisysmoke.sl:49:  vector IN, WIN;
k3d/share/shaders/k3d_oak.sl:12: *   shadingfreq - overall scaling factor for the pattern
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:27: *       grain are weighted.  0 turns one off, 1 makes full effect.
k3d/share/shaders/k3d_oak.sl:39: * Contacts:  lg@pixar.com
k3d/share/shaders/k3d_oak.sl:45:#include "k3d_project.h"
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:7: *    a shifted version of the oaktexture function from oak.h.
k3d/share/shaders/k3d_oakplank.sl:11: *   shadingfreq - overall scaling factor for the pattern
k3d/share/shaders/k3d_oakplank.sl:14: * Parameters for the pattern of the plank structure: 
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:34: *       grain are weighted.  0 turns one off, 1 makes full effect.
k3d/share/shaders/k3d_oakplank.sl:41: *   Kr, blur, eta - reflection parameters for the tile
k3d/share/shaders/k3d_oakplank.sl:50: * Contacts:  lg@pixar.com
k3d/share/shaders/k3d_oakplank.sl:61:#include "k3d_project.h"
k3d/share/shaders/k3d_oakplank.sl:91:   * filtered pulsetrain functions.
k3d/share/shaders/k3d_oakplank.sl:137:    point(splank - 0.5, height - 0.01 * tplank, tplank) + vector(1, 5,
k3d/share/shaders/k3d_oakplank.sl:139:    (vector cellnoise(swhichplank, twhichplank) - 0.5);
k3d/share/shaders/k3d_orange.sl:2: * Actually it is a condensed version of the mango shader from Sig '92 "Writing RenderMan Shaders"
k3d/share/shaders/k3d_orennayar.sl:13: *   tend to act more like retroreflectors than like isotropic scatterers.
k3d/share/shaders/k3d_orennayar.sl:23: *         Reflectance Model," Computer Graphics Annual Conference
k3d/share/shaders/k3d_orennayar.sl:28: *      light from the sources and applies Oren & Nayar's local reflectance
k3d/share/shaders/k3d_orennayar.sl:30: *      or a function and used in any other shader, in place of diffuse().
k3d/share/shaders/k3d_outlet.sl:2: * outlet.sl -- surface shader for an electrical outlet
k3d/share/shaders/k3d_outlet.sl:5: *   Makes an electrical outlet.  Perfect for slapping on a bilinear
k3d/share/shaders/k3d_outlet.sl:21: *      17 Jan 1994 -- recoded by lg in correct shading language.
k3d/share/shaders/k3d_paintedplastic.sl:44:	vector V = -normalize(I);
k3d/share/shaders/k3d_parquet_plank.sl:6: *   like oak plank parquet floor tiles.  The actual wood and plank pattern
k3d/share/shaders/k3d_parquet_plank.sl:12: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_parquet_plank.sl:62:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_parquet_plank2.sl:7: *   like oak plank parquet floor tiles.  The actual wood and plank pattern
k3d/share/shaders/k3d_parquet_plank2.sl:13: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_parquet_plank2.sl:76:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_parquet_tile.sl:8: *   like oak plank parquet floor tiles.  The actual wood and plank pattern
k3d/share/shaders/k3d_parquet_tile.sl:14: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_parquet_tile.sl:91:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_planetclouds.sl:8: *      The shader works by creating a fractal turbulence function over
k3d/share/shaders/k3d_planetclouds.sl:9: *   the surface, then modulating the opacity based on this function in
k3d/share/shaders/k3d_planetclouds.sl:16: *    omega,lambda,octaves - the fractal characteristics of the clouds
k3d/share/shaders/k3d_planetclouds.sl:26: *   2. The best effects are achieved when the clouds not only occlude
k3d/share/shaders/k3d_planetclouds.sl:68:			 float lambda = 2; float octaves = 9;
k3d/share/shaders/k3d_planetclouds.sl:71:  point Pdistortion;		/* "distortion" vector */
k3d/share/shaders/k3d_planetclouds.sl:73:  float l, o, a, i;		/* Loop control for fractal sum */
k3d/share/shaders/k3d_planetclouds.sl:74:  float result;			/* Fractal sum is stored here */
k3d/share/shaders/k3d_planetclouds.sl:79:  /* Add in "distortion" vector */
k3d/share/shaders/k3d_planetclouds.sl:81:  /* Second cirrus: replace DNoise with vector fBm */
k3d/share/shaders/k3d_planetclouds.sl:88:  for(i = 0; i < octaves && o >= VERY_SMALL; i += 1)
k3d/share/shaders/k3d_plank.sl:10: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_plank.sl:57:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_projectionmap_plastic.sl:4:// Contact: tshead@k-3d.com
k3d/share/shaders/k3d_projectionmap_plastic.sl:24:surface k3d_projectionmap_plastic(
k3d/share/shaders/k3d_projectionmap_plastic.sl:35:	vector axis = vector(0, 0, 1);
k3d/share/shaders/k3d_projectionmap_plastic.sl:60:	vector V = -normalize(I);
k3d/share/shaders/k3d_puffyclouds.sl:16: *    txtscale - overall scaling factor
k3d/share/shaders/k3d_puffyclouds.sl:18: *    octaves, omega, lambda - control the fractal appearance of the clouds
k3d/share/shaders/k3d_puffyclouds.sl:23: *    setting the "octaves" parameter based on distance from eye point.
k3d/share/shaders/k3d_puffyclouds.sl:52:	     float octaves = 8, omega = 0.5, lambda = 2;
k3d/share/shaders/k3d_puffyclouds.sl:63:  /* Use fractional Brownian motion to compute a value for this point */
k3d/share/shaders/k3d_puffyclouds.sl:64:/*  value = fBm (PP, omega, lambda, octaves); */
k3d/share/shaders/k3d_puffyclouds.sl:67:  for (i = 0;  i < octaves;  i += 1) {
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:25: * pictures, job offers at Pixar, etc... to:  jmerritt@SpamSucks_warpax.com   :-)
k3d/share/shaders/k3d_redapple.sl:46:	float Ks = .25;           /* Specular reflection coeff.    */
k3d/share/shaders/k3d_redapple.sl:47:	float Kd = .5;            /* Diffuse reflection coeff.     */
k3d/share/shaders/k3d_redapple.sl:49:	float Kr = .05;           /* Mirror-like reflection coeff. */
k3d/share/shaders/k3d_redapple.sl:56:	color specularcolor = 1;  /* Specular reflection color     */
k3d/share/shaders/k3d_redapple.sl:62:	vector Nf, V, Rdir;
k3d/share/shaders/k3d_redapple.sl:66:	color cs, small_speckle, base_color, reflect;
k3d/share/shaders/k3d_redapple.sl:99:	#define BASE_SF          1.2    /* s-factor for big noise          */
k3d/share/shaders/k3d_redapple.sl:100:	#define BASE_TF          3      /* t-factor for big noise          */
k3d/share/shaders/k3d_redapple.sl:101:	#define BASE_NF          100    /* scaling factor for small noise  */
k3d/share/shaders/k3d_redapple.sl:103:	#define BASE_GRC         0.4    /* shift factor for more red       */
k3d/share/shaders/k3d_redapple.sl:133:	 * section sets that coefficient, using a funky yet
k3d/share/shaders/k3d_redapple.sl:136:	#define BLOTCH_SF          20   /* s-factor for blotches  */
k3d/share/shaders/k3d_redapple.sl:137:	#define BLOTCH_TF          15   /* t-factor for blotches  */
k3d/share/shaders/k3d_redapple.sl:159:	#define SPECK_NF        50    /* A noise scaling factor      */
k3d/share/shaders/k3d_redapple.sl:190:	 * noise, affected a little by the brown specks, and
k3d/share/shaders/k3d_redapple.sl:191:	 * also dented a bit (alas, no real apples are perfectly
k3d/share/shaders/k3d_redapple.sl:194:	#define DISP_SF     10             /* s-factor for dent noise */
k3d/share/shaders/k3d_redapple.sl:195:	#define DISP_TF     30             /* t-factor for dent noise */
k3d/share/shaders/k3d_redapple.sl:208:	 * 'Mirror' reflections
k3d/share/shaders/k3d_redapple.sl:210:	 * Here, we raytrace for the slight mirrored reflections
k3d/share/shaders/k3d_redapple.sl:212:	 * may be needed for the 'perfect' apple :-).
k3d/share/shaders/k3d_redapple.sl:219:		Rdir = normalize(reflect(normalize(I), Nf));
k3d/share/shaders/k3d_redapple.sl:220:		reflect = RayTrace(P, Rdir, 0, 1, 1);
k3d/share/shaders/k3d_redapple.sl:222:		reflect = 0;
k3d/share/shaders/k3d_redapple.sl:225:	reflect = 0;
k3d/share/shaders/k3d_redapple.sl:234:	           specularcolor * (Kr * reflect +
k3d/share/shaders/k3d_ridged_multifractal.sl:15:k3d_ridged_multifractal(float H = 0.8, lacunarity = 2.5, octaves = 7, offset = 0.9, sharpness = 4, threshold = 12, Kt = 0.1)

k3d/share/shaders/k3d_ridged_multifractal.sl:20:	for( i=0; i<octaves; i += 1 ) {

k3d/share/shaders/k3d_ridged_multifractal.sl:21:       		/* First octaves */

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

k3d/share/shaders/k3d_roughmetal.sl:5: *   Rough metal without coherent reflections
k3d/share/shaders/k3d_round.sl:21:	   u and in v, and the directions away from those edges. */
k3d/share/shaders/k3d_round.sl:47:	 *  sphere, if we are. We move `center' to the nearest inflection 
k3d/share/shaders/k3d_ruledpaper.sl:33: *   but in my day there's 7. I actually got a piece of loose-leaf paper
k3d/share/shaders/k3d_ruledpaper.sl:37: *   patch 21x29.7 units or at least with an approximate aspect ratio. 
k3d/share/shaders/k3d_ruledpaper.sl:117:		// accurate, aspecty circles.
k3d/share/shaders/k3d_ruledpaper.sl:132:	// Check if it actually needs shading
k3d/share/shaders/k3d_rustymetal.sl:14: *   txtscale - overall scaling factor of the rust pattern.
k3d/share/shaders/k3d_rustymetal.sl:19: *   The fractal sum used to determine the rust pattern chooses a number of
k3d/share/shaders/k3d_rustymetal.sl:20: *   octaves to sum based on the shader sampling rate.  This helps to keep
k3d/share/shaders/k3d_rustymetal.sl:37:/* Maximum number of octaves */
k3d/share/shaders/k3d_rustymetal.sl:52:  point Nf, V;                 /* normal and view vector used for shading */
k3d/share/shaders/k3d_rustymetal.sl:55:  float i, sum = 0, a = 1;     /* Loop control for fractal sum */
k3d/share/shaders/k3d_rustymetal.sl:60:  /* Sum several octaves of abs(snoise), i.e. turbulence.  Limit the
k3d/share/shaders/k3d_rustymetal.sl:61:   * number of octaves by the estimated change in PP between adjacent
k3d/share/shaders/k3d_saturn.sl:10: *   Saturn-like.  The shader works by using a variety of fractal 
k3d/share/shaders/k3d_saturn.sl:16: *    dist_scale - scaling for multifractal distortion
k3d/share/shaders/k3d_saturnring.sl:43:	point Nf;       /* Forward facing Normalized vector of incident light */
k3d/share/shaders/k3d_saturnring.sl:91:			/* Want transparent section */
k3d/share/shaders/k3d_scartissue.sl:14:	point Psh = transform("object",P);
k3d/share/shaders/k3d_scartissue.sl:22:	vector V = normalize(-I);
k3d/share/shaders/k3d_screen_aa.sl:34:  normal Nf;			/* Forward facing Normal vector */
k3d/share/shaders/k3d_screen_aa.sl:35:  vector IN;			/* normalized incident vector */
k3d/share/shaders/k3d_screen_aa.sl:44:  /* Determine how wide in s-t space one pixel projects to */
k3d/share/shaders/k3d_sdixon.sl:34:	   component is increased. This has the effect of transitioning
k3d/share/shaders/k3d_shadowspot.sl:21:	point A = (to - from) / length(to - from); /* direction */
k3d/share/shaders/k3d_shifteddrtile.sl:10: *  roughness -  Contols the specular reflection
k3d/share/shaders/k3d_shiftedmoontile.sl:9: *  roughness - Contols the specular reflection
k3d/share/shaders/k3d_shiny.sl:6: *    Kr - coefficient for mirror-like reflections of environment
k3d/share/shaders/k3d_shiny.sl:7: *    blur - how blurry are the reflections? (0 = perfectly sharp)
k3d/share/shaders/k3d_shiny.sl:9: *    rayjitter, raysamples - ray tracing controls for reflection
k3d/share/shaders/k3d_shiny.sl:20: *   _Advanced RenderMan: Creating CGI for Motion Picture_, 
k3d/share/shaders/k3d_shinymetal.sl:15:  vector V, D;
k3d/share/shaders/k3d_shinymetal.sl:20:  D = reflect(V, Nf);
k3d/share/shaders/k3d_shinyplastic.sl:6: *    Kr - coefficient for mirror-like reflections of environment
k3d/share/shaders/k3d_shinyplastic.sl:7: *    blur - how blurry are the reflections? (0 = perfectly sharp)
k3d/share/shaders/k3d_shinyplastic.sl:8: *    ior - index of refraction (1.5 is a good estimate for most plastics)
k3d/share/shaders/k3d_shinyplastic.sl:10: *    rayjitter, raysamples - ray tracing controls for reflection
k3d/share/shaders/k3d_skin1.sl:13: * Feel free to use this shader to create skin for any character, anywhere and
k3d/share/shaders/k3d_skin1.sl:25: * xdir, angle = control the direction of the specular highlights.
k3d/share/shaders/k3d_skin1.sl:33: * You can replace the header functions by using
k3d/share/shaders/k3d_skin1.sl:35: * NOTE- you must copy the entire subsurface skin function to your
k3d/share/shaders/k3d_skin1.sl:56: * "Measuring and Modeling Anisotropic Reflection," ACM Computer 
k3d/share/shaders/k3d_skin1.sl:61:LocIllumWardAnisotropic (normal N;  vector V;
k3d/share/shaders/k3d_skin1.sl:62:                         vector xdir;  float xroughness, yroughness;)
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: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:78:      vector LN = normalize (L);
k3d/share/shaders/k3d_skin1.sl:81:    vector H = normalize (V + LN);
k3d/share/shaders/k3d_skin1.sl:96: * information about skin reflectance from Hanrahan and Krueger, 
k3d/share/shaders/k3d_skin1.sl:97: * "Reflection from layered surfaces due to subsurface scattering", 
k3d/share/shaders/k3d_skin1.sl:100:/* Evaluate the Henyey-Greenstein phase function for two vectors with
k3d/share/shaders/k3d_skin1.sl:105:float phase(vector v1, v2; float g) {
k3d/share/shaders/k3d_skin1.sl:112:   directions wi and wo, surface normal n, asymmetry value g (see above),
k3d/share/shaders/k3d_skin1.sl:117:float singleScatter(vector wi, wo; normal n; float g, albedo, thickness) {
k3d/share/shaders/k3d_skin1.sl:125:vector efresnel(vector II; normal NN; float eta; output float Kr, Kt;) {
k3d/share/shaders/k3d_skin1.sl:126:    vector R, T;
k3d/share/shaders/k3d_skin1.sl:137:color subsurfaceSkin(vector Vf; normal Nn; color skinColor, sheenColor;
k3d/share/shaders/k3d_skin1.sl:143:  vector T = efresnel(-Vf, Nn, eta, Kr, Kt);
k3d/share/shaders/k3d_skin1.sl:146:      vector Ln = normalize(L);
k3d/share/shaders/k3d_skin1.sl:148:      vector H = normalize(Ln + Vf);
k3d/share/shaders/k3d_skin1.sl:153:      vector T2 = efresnel(-Ln, Nn, eta, Kr2, Kt2);
k3d/share/shaders/k3d_skin1.sl:182:  varying vector xdir = dPdu;
k3d/share/shaders/k3d_skin1.sl:197:  vector Vf = -normalize(I);
k3d/share/shaders/k3d_skin1.sl:277:  vector anisoDir = xdir;
k3d/share/shaders/k3d_skin2.sl:11: * information about skin reflectance from Hanrahan and Krueger, 
k3d/share/shaders/k3d_skin2.sl:12: * "Reflection from layered surfaces due to subsurface scattering", 
k3d/share/shaders/k3d_skin2.sl:19:/* Evaluate the Henyey-Greenstein phase function for two vectors with
k3d/share/shaders/k3d_skin2.sl:24:float phase(vector v1, v2; float g) {
k3d/share/shaders/k3d_skin2.sl:31:   directions wi and wo, surface normal n, asymmetry value g (see above),
k3d/share/shaders/k3d_skin2.sl:36:float singleScatter(vector wi, wo; normal n; float g, albedo, thickness) {
k3d/share/shaders/k3d_skin2.sl:45:vector efresnel(vector II; normal NN; float eta; output float Kr, Kt;) {
k3d/share/shaders/k3d_skin2.sl:46:    vector R, T;
k3d/share/shaders/k3d_skin2.sl:57:   refraction of the incoming ray (typically ~1 for air) to the index
k3d/share/shaders/k3d_skin2.sl:58:   of refraction for the transmitted ray (say something like 1.4 for
k3d/share/shaders/k3d_skin2.sl:60:   over light sources with illuminance() and computes the reflected
k3d/share/shaders/k3d_skin2.sl:63:color subsurfaceSkin(vector Vf; normal Nn; color skinColor, sheenColor;
k3d/share/shaders/k3d_skin2.sl:69:	vector T = efresnel(-Vf, Nn, eta, Kr, Kt);
k3d/share/shaders/k3d_skin2.sl:72:	    vector Ln = normalize(L);
k3d/share/shaders/k3d_skin2.sl:74:	    vector H = normalize(Ln + Vf);
k3d/share/shaders/k3d_skin2.sl:79:	    vector T2 = efresnel(-Ln, Nn, eta, Kr2, Kt2);
k3d/share/shaders/k3d_skin2.sl:88:/* Basic surface shader that uses the skin reflection model implemented
k3d/share/shaders/k3d_skin2.sl:95:	vector Vf = -normalize(I);
k3d/share/shaders/k3d_skymetal.sl:6: *   didn't support vector the vector type.  
k3d/share/shaders/k3d_skymetal.sl:9: * TLSkymetal shader.  Actually, I never could get this oneto work right,
k3d/share/shaders/k3d_skymetal.sl:19:             /* actually should be vector and vtransform if using 3.5 or 
k3d/share/shaders/k3d_skymetal.sl:35:	costheta = normalize (reflect (I, Nf)) . up;
k3d/share/shaders/k3d_slateroof.sl:14:   sfreq: number of tiles on the s direction
k3d/share/shaders/k3d_slateroof.sl:15:   tfreq: number of tiles in the t direction
k3d/share/shaders/k3d_slateroof.sl:19: 	gap: the size of the gap between one tile and the next in the s direction,
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:26: 	factor: a seed used for adjusting the randomness - if you have two roofs with
k3d/share/shaders/k3d_slateroof.sl:27: 		the same sfreq, tfreq change the value of factor to ensure they have a 
k3d/share/shaders/k3d_slateroof.sl:56:							factor = 22.238,
k3d/share/shaders/k3d_slateroof.sl:61:   uniform float swidth = 1 / sfreq, 		/* Tile width in the s directio */
k3d/share/shaders/k3d_slateroof.sl:62:                 twidth = 1 / tfreq, 		/* ditto for the t direction */
k3d/share/shaders/k3d_slateroof.sl:69:			cs, ct; 									/* Coordinates set to the centre of the tile and fed into the noise function */
k3d/share/shaders/k3d_slateroof.sl:72:			disps, dispt, disp, dispo,      	/* Displacements - s direction, t direction, final displacement, and 
k3d/share/shaders/k3d_slateroof.sl:76:   uniform 	float colorfactor = 3.276 * factor;	/* Used in noise calculations */	
k3d/share/shaders/k3d_slateroof.sl:99:	/* the noise function is always taken at the same point in the tile 
k3d/share/shaders/k3d_slateroof.sl:103:	ct = ttile + .5;
k3d/share/shaders/k3d_slateroof.sl:105:	if ((mod(ct,2) >= 1)  && ((stile == 0) || (stile == sfreq)))
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:132:	/* Work out whether the point is in fact in another tile 
k3d/share/shaders/k3d_slateroof.sl:147:			/* Now calculate cs, ct the reference point for the noise calculation */					
k3d/share/shaders/k3d_slateroof.sl:148:			ct = ttile - .5;
k3d/share/shaders/k3d_slateroof.sl:150:			if ((mod(ct,2) >= 1) && ((newstile == 0) || (newstile == sfreq)))
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:156:				/* if t_offset <= newadd we are actually in the overlapping tile */
k3d/share/shaders/k3d_slateroofd.sl:10:    	sfreq: number of tiles on the s direction
k3d/share/shaders/k3d_slateroofd.sl:11:    	tfreq: number of tiles in the t direction
k3d/share/shaders/k3d_slateroofd.sl:15: 		gap: the size of the gap between one tile and the next in the s direction,
k3d/share/shaders/k3d_slateroofd.sl:18: 		factor: a seed used for adjusting the randomness - if you have two roofs with
k3d/share/shaders/k3d_slateroofd.sl:19: 			the same sfreq, tfreq change the value of factor to ensure they have a 
k3d/share/shaders/k3d_slateroofd.sl:24:		This routine produces a random tiled effect. In the s direction the
k3d/share/shaders/k3d_slateroofd.sl:27:		the t direction so that it overlaps the tile 'below' it. No randomness
k3d/share/shaders/k3d_slateroofd.sl:28:		is incorporated in the s direction, which remains regular. The routine
k3d/share/shaders/k3d_slateroofd.sl:33:		point we are considering is actually in the zone of overlap with the
k3d/share/shaders/k3d_slateroofd.sl:50:							factor = 22.838)
k3d/share/shaders/k3d_slateroofd.sl:54:   uniform float swidth = 1 / sfreq, 		/* Tile width in the s directio */
k3d/share/shaders/k3d_slateroofd.sl:55:                 twidth = 1 / tfreq, 		/* ditto for the t direction */
k3d/share/shaders/k3d_slateroofd.sl:61:			cs, ct; 									/* Coordinates set to the centre of the tile and fed into the noise function */
k3d/share/shaders/k3d_slateroofd.sl:64:			disps, dispt, disp, dispo,      	/* Displacements - s direction, t direction, final displacement, and 
k3d/share/shaders/k3d_slateroofd.sl:71:   vector Ndisp = Nf * (1 / max(spacescale,1e-6));
k3d/share/shaders/k3d_slateroofd.sl:91:   	/* the noise function is always taken at the same point in the tile 
k3d/share/shaders/k3d_slateroofd.sl:95:   		ct = ttile + .5;
k3d/share/shaders/k3d_slateroofd.sl:97:   		if ((mod(ct,2) >= 1)  && ((stile == 0) || (stile == sfreq)))
k3d/share/shaders/k3d_slateroofd.sl:100:   		add = noise(cs * factor, ct * factor) * maxadd;
k3d/share/shaders/k3d_slateroofd.sl:124:	/* Work out whether the point is in fact in another tile 	
k3d/share/shaders/k3d_slateroofd.sl:139:			/* Now calculate cs, ct the reference point for the noise calculation */					
k3d/share/shaders/k3d_slateroofd.sl:140:			ct = ttile - .5;
k3d/share/shaders/k3d_slateroofd.sl:142:			if ((mod(ct,2) >= 1) && ((newstile == 0) || (newstile == sfreq)))
k3d/share/shaders/k3d_slateroofd.sl:145:			newadd = noise(cs * factor, ct * factor) * maxadd;
k3d/share/shaders/k3d_slateroofd.sl:147:			/* if t_offset <= newadd we are actually in the overlapping tile */
k3d/share/shaders/k3d_slideprojector.sl:1:light k3d_slideprojector(float intensity = 2000;
k3d/share/shaders/k3d_slideprojector.sl:9:  uniform vector Z = normalize(to - from);
k3d/share/shaders/k3d_slideprojector.sl:10:  uniform vector X = Z ^ up;
k3d/share/shaders/k3d_slideprojector.sl:11:  uniform vector Y = normalize(X ^ Z);
k3d/share/shaders/k3d_smoke.sl:6: *    used to find scattering and extinction.
k3d/share/shaders/k3d_smoke.sl:9: *   opacdensity - overall smoke density control as it affects its ability
k3d/share/shaders/k3d_smoke.sl:11: *   lightdensity - smoke density control as it affects light scattering
k3d/share/shaders/k3d_smoke.sl:13: *   integstart, integend - bounds along the viewing ray direction of the
k3d/share/shaders/k3d_smoke.sl:14: *          integration of atmospheric effects.
k3d/share/shaders/k3d_smoke.sl:16: *   smokefreq, smokeoctaves, smokevary - control the fBm of the noisy smoke
k3d/share/shaders/k3d_smoke.sl:17: *          If either smokeoctaves or smokevary is 0, there is no noise
k3d/share/shaders/k3d_smoke.sl:20: *          extinction coefficients.
k3d/share/shaders/k3d_smoke.sl:36:		  uniform float smokevary, smokefreq, smokeoctaves;
k3d/share/shaders/k3d_smoke.sl:49:  if(smokeoctaves > 0 && smokevary > 0)
k3d/share/shaders/k3d_smoke.sl:54:      /* Optimize: one octave only if not lit */
k3d/share/shaders/k3d_smoke.sl:57:	  0.5 * fBm(Psmoke * 2, stepsize * 2, smokeoctaves - 1, 2, 0.5);
k3d/share/shaders/k3d_smoke.sl:81:		 float smokeoctaves = 0, smokefreq = 1, smokevary = 1;)
k3d/share/shaders/k3d_smoke.sl:90:  vector IN = normalize(vtransform("shader", I));
k3d/share/shaders/k3d_smoke.sl:91:  vector WIN = vtransform("shader", "current", IN);
k3d/share/shaders/k3d_smoke.sl:100:	       smokeoctaves, ss, last_li, last_dtau);
k3d/share/shaders/k3d_smoke.sl:109:		   smokeoctaves, ss, li, dtau);
k3d/share/shaders/k3d_smoke.sl:118:      /* Composite with exponential extinction of background light */
k3d/share/shaders/k3d_smoke2.sl:7: *    used to integrate the GADD to find scattering and extinction.
k3d/share/shaders/k3d_smoke2.sl:11: *   integstart, integend - bounds along the viewing ray direction of the
k3d/share/shaders/k3d_smoke2.sl:12: *          integration of atmospheric effects.
k3d/share/shaders/k3d_smoke2.sl:17: *   freq, octaves, smokevary - control the fBm of the noisy smoke
k3d/share/shaders/k3d_smoke2.sl:30: * * Moved scripts & shaders to the share directory
k3d/share/shaders/k3d_smoke2.sl:39: * Compute only one octave of noise when not lit (big speedup)
k3d/share/shaders/k3d_smoke2.sl:59:             /* Optimize: one octave only if not lit */                     \
k3d/share/shaders/k3d_smoke2.sl:62:                 for (i=1;  i<octaves;  i+=1) {                             \
k3d/share/shaders/k3d_smoke2.sl:84:	    float octaves = 3, freq = 1, smokevary = 1;
k3d/share/shaders/k3d_smoke2.sl:91:#else  /* PRMan and BMRT have I reverse of each other, conflict in spec */
k3d/share/shaders/k3d_softboxes.sl:36:#define OBEY_THIS "Reflectivity"
k3d/share/shaders/k3d_softboxes.sl:51:/*      by  a,b and A,B for the inner and outer ellipses, respectively)	***/
k3d/share/shaders/k3d_softboxes.sl:58:/* this is the identical function used by sqLight etc */
k3d/share/shaders/k3d_softboxes.sl:87:    varying vector	reflVect;
k3d/share/shaders/k3d_softboxes.sl:108:    varying color ct = 1;
k3d/share/shaders/k3d_softboxes.sl:112:    varying vector Vlight = vtransform (boxCoords, reflVect);
k3d/share/shaders/k3d_softboxes.sl:144:		ct = texture(boxTexture,theS,theT,
k3d/share/shaders/k3d_softboxes.sl:148:		    ct = (ct*boxTexStr)+(1-boxTexStr);
k3d/share/shaders/k3d_softboxes.sl:170:    theColor = contrib * ct * boxColor / pow(pDist,decayExp);	/* premultiplied!!!!! */
k3d/share/shaders/k3d_softboxes.sl:301:    string	__category = "reflection";
k3d/share/shaders/k3d_softboxes.sl:308:    vector rv = reflect(I,Nf);
k3d/share/shaders/k3d_softboxes.sl:332:	if (surface("Reflectivity",materiaRefl) == 0) {
k3d/share/shaders/k3d_softboxes.sl:333:	    if (surface("abReflectivity",materiaRefl) == 0) {
k3d/share/shaders/k3d_softboxes.sl:334:		if (surface("reflectivity",materiaRefl) == 0) {
k3d/share/shaders/k3d_softboxes.sl:343:	if (surface("ReflectionMapBlur",materiaBlur) == 0) {
k3d/share/shaders/k3d_softboxes.sl:344:	    if (surface("abReflectionMapBlur",materiaBlur) == 0) {
k3d/share/shaders/k3d_softboxes.sl:345:		if (surface("reflectionMapBlur",materiaBlur) == 0) {
k3d/share/shaders/k3d_softboxes.sl:410:		varying vector Rs = normalize (vtransform (theEnvSpace, normalize(-L)));
k3d/share/shaders/k3d_softboxes.sl:414:		    varying float pl = vector(PShd).vector(PShd);
k3d/share/shaders/k3d_softboxes.sl:415:		    varying float pdotv = -vector(PShd).Rs;
k3d/share/shaders/k3d_softboxes.sl:416:		    Rs = vector( PShd + (pdotv + sqrt (abs (1 - pl + ((pdotv)*(pdotv)))))*Rs );
k3d/share/shaders/k3d_softboxes.sl:419:		    Rs = vector (-zcomp (Rs), xcomp (Rs), ycomp (Rs));
k3d/share/shaders/k3d_softboxes.sl:455:	    varying vector Ln = normalize(L);
k3d/share/shaders/k3d_softboxes.sl:456:	    varying vector Nn = normalize(N);
k3d/share/shaders/k3d_softboxes.sl:457:	    varying vector In = normalize(I);
k3d/share/shaders/k3d_spacecloud.sl:2: * TLSpaceCloud.sl - perform turbulence function to add more dimension to
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:11: *   startPulse -- start of pulse function.
k3d/share/shaders/k3d_spacecloud.sl:12: *   endPulse -- end of pulse function
k3d/share/shaders/k3d_spacecloud.sl:14: *   minAdjust -- amount that can be subtracted from value
k3d/share/shaders/k3d_spacecloud.sl:19: *  Only tested on rectanglar patch.
k3d/share/shaders/k3d_spacecloud.sl:72:	PP = transform ("object", P);
k3d/share/shaders/k3d_spacecloud.sl:73:  /* fractalsum */
k3d/share/shaders/k3d_spacecloud.sl:82:	fBm (P, noiseScale, octaves, PP, freq, i, size, adjust);
k3d/share/shaders/k3d_spaceshiphull1.sl:4:float fractalsum(point Q)
k3d/share/shaders/k3d_spaceshiphull1.sl:45:  platecolor -= grime * fractalsum(P);
k3d/share/shaders/k3d_spotlight.sl:18:  uniform vector A = normalize(to - from);
k3d/share/shaders/k3d_square_ridges.sl:4:// Contact: tshead@k-3d.com
k3d/share/shaders/k3d_square_ridges.sl:66:	vector Nn = normalize(N);
k3d/share/shaders/k3d_srfdeformation.sl:9:   projects a texture through the camera onto the Pref
k3d/share/shaders/k3d_srfdeformation.sl:10:   object and deforms it to the P position
k3d/share/shaders/k3d_srfdeformation.sl:23:	       vector L; 
k3d/share/shaders/k3d_srfdeformation.sl:27:    vector Ln;
k3d/share/shaders/k3d_srfdeformation.sl:36:fnc_projectCurrentCamera(point P;
k3d/share/shaders/k3d_srfdeformation.sl:48:    string texname = "";        /* Texture to project */
k3d/share/shaders/k3d_srfdeformation.sl:51:				   2 = output lighting of the P object
k3d/share/shaders/k3d_srfdeformation.sl:52:				   3 = output lighting of the Pref object
k3d/share/shaders/k3d_srfdeformation.sl:66:    fnc_projectCurrentCamera(Pref, x, y);
k3d/share/shaders/k3d_srfdeformation.sl:83:       specular or reflection maps if needed */
k3d/share/shaders/k3d_srfdeformation.sl:93:    /* Difference in lighting acts as brightness control*/
k3d/share/shaders/k3d_star.sl:14:#include "k3d_proctext.h"
k3d/share/shaders/k3d_star.sl:22:    uniform float sctr = 0.5;
k3d/share/shaders/k3d_star.sl:23:    uniform float tctr = 0.5;
k3d/share/shaders/k3d_star.sl:37:    ss = s - sctr; tt = t - tctr;
k3d/share/shaders/k3d_starfield.sl:13:	// Work in object coordinates ...
k3d/share/shaders/k3d_starfield.sl:14:	point PP = transform("object", frequency * P);
k3d/share/shaders/k3d_stones.sl:15: * Feel free to use this shader to create skin for any character, anywhere and
k3d/share/shaders/k3d_stones.sl:66:    color Chsv = ctransform ("hsv", Cin);
k3d/share/shaders/k3d_stones.sl:74:    return ctransform ("hsv", "rgb", clamp(Chsv,color 0, color 1));
k3d/share/shaders/k3d_stones.sl:105: vector V;
k3d/share/shaders/k3d_stones.sl:183: /*compute normals and vectors for shading*/
k3d/share/shaders/k3d_strata.sl:9: *    txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_strata.sl:13: *    octaves - number of octaves of noise to sum for the turbulence
k3d/share/shaders/k3d_strata.sl:39:		   float octaves = 8;
k3d/share/shaders/k3d_strata.sl:51:  for(i = 0; i < octaves; i += 1)
k3d/share/shaders/k3d_superplank.sl:7: *   reflections (either traced or via reflection map), and bumps.
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:16: *   Km - overall scaling factor for bumpiness.
k3d/share/shaders/k3d_superplank.sl:40: *          current contact address: gritzl@acm.org
k3d/share/shaders/k3d_superplank.sl:56:			color specularcolor = 1;	/* Spec reflection color */
k3d/share/shaders/k3d_superplank.sl:58:			float Ktrace = 1, Krefl = 0;	/* trace and reflection map */
k3d/share/shaders/k3d_superplank.sl:61:			float txtscale = 1;	/* Overall scaling factor */
k3d/share/shaders/k3d_superplank.sl:62:			float Km = 1;	/* Overall bumpiness factor */
k3d/share/shaders/k3d_superplank.sl:104:  vector IN;			/* normalized I vector */
k3d/share/shaders/k3d_superplank.sl:107:  vector R, T_dummy;		/* Refl (and tummy transmit) from fresnel */
k3d/share/shaders/k3d_superplank.sl:108:  float fresnelKr, fresnelKt;	/* Fresnel reflection coefficients */
k3d/share/shaders/k3d_superplank.sl:112:  vector V;
k3d/share/shaders/k3d_superplank.sl:135:   * strictly tied to the scale of the object.
k3d/share/shaders/k3d_superplank.sl:187:  /* compute half width & length of groove as fraction of plank size */
k3d/share/shaders/k3d_superplank.sl:206:   * interact subtly.
k3d/share/shaders/k3d_superplank.sl:289:   * The wood itself behaves like plastic, the varnish overtop reflects
k3d/share/shaders/k3d_superplank.sl:290:   * using the fresnel formula (grazing angles reflect like mirrors).
k3d/share/shaders/k3d_superplank.sl:291:   * Have some subtle interaction between grain and specularity.
k3d/share/shaders/k3d_superplank.sl:306:	vector H = normalize(normalize(L) + V);
k3d/share/shaders/k3d_superplank.sl:316:  /* Only compute reflections if Kr > 0 */
k3d/share/shaders/k3d_superpplastic.sl:28:  vector V;
k3d/share/shaders/k3d_supertexmap.sl:13: *    projection - specifies the projection type, one of "st", "planar",
k3d/share/shaders/k3d_supertexmap.sl:14: *                 "perspective", "cylindrical", "spherical".
k3d/share/shaders/k3d_supertexmap.sl:15: *    textureprojspace - the space in which the texture projection is
k3d/share/shaders/k3d_supertexmap.sl:19: *                projected point before texture coordinates are extracted.
k3d/share/shaders/k3d_supertexmap.sl:25: *   _Advanced RenderMan: Creating CGI for Motion Picture_, 
k3d/share/shaders/k3d_supertexmap.sl:31:#include "k3d_project.h"
k3d/share/shaders/k3d_supertoon.sl:10: * clamping, the inflection points are lim2, lim3 and lim4. This shader is very cheap, 

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

k3d/share/shaders/k3d_supertoon.sl:34:                        lim2 = 0.3,      /* inflection points  */

k3d/share/shaders/k3d_supertoon.sl:40:    vector NI = normalize(I);

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:21:		   float spectral_exp = 0.5;
k3d/share/shaders/k3d_terran.sl:22:		   float lacunarity = 2, octaves = 7;
k3d/share/shaders/k3d_terran.sl:23:		   float multifractal = 0; float dist_scale = .2;
k3d/share/shaders/k3d_terran.sl:49:   * Note: this section of code must be identical to "terranbump" if you
k3d/share/shaders/k3d_terran.sl:50:   *       expect these two shaders to work well together.
k3d/share/shaders/k3d_terran.sl:53:  if(multifractal == 0)
k3d/share/shaders/k3d_terran.sl:54:    {				/* use a "standard" fBm bump function */
k3d/share/shaders/k3d_terran.sl:58:      for(i = 0; i < octaves; i += 1)
k3d/share/shaders/k3d_terran.sl:62:	  o *= spectral_exp;
k3d/share/shaders/k3d_terran.sl:66:    {				/* use a "multifractal" fBm bump function */
k3d/share/shaders/k3d_terran.sl:67:      /* get "distortion" vector, as used with clouds */
k3d/share/shaders/k3d_terran.sl:69:      /* compute bump vector using MfBm with displaced point */
k3d/share/shaders/k3d_terran.sl:70:      o = spectral_exp;
k3d/share/shaders/k3d_terran.sl:74:      for(i = 1; i < octaves && weight >= VERY_SMALL; i += 1)
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:102:  /* fractally purturb color map offset using "chaos" */
k3d/share/shaders/k3d_terran.sl:116:       * so I used a scanned photo of the real Earth to select some
k3d/share/shaders/k3d_terran2.sl:10: *   Earth-like.  The shader works by using a variety of fractal 
k3d/share/shaders/k3d_terran2.sl:13: *   which is necessary to get the best effect.  If you do this, it is
k3d/share/shaders/k3d_terran2.sl:21: *    spectral_exp, lacunarity, octaves - control the fractal characteristics
k3d/share/shaders/k3d_terran2.sl:24: *    multifractal - zero uses fBm noise, nonzero uses multifractal
k3d/share/shaders/k3d_terran2.sl:25: *    dist_scale - scaling for multifractal distortion
k3d/share/shaders/k3d_terran2.sl:28: *    mtn_scale - scaling factor for mountains
k3d/share/shaders/k3d_terran2.sl:32: *    depth_scale, depth_max - scaling factor and max depth of oceans
k3d/share/shaders/k3d_terran2.sl:78:	  float spectral_exp = 0.5;
k3d/share/shaders/k3d_terran2.sl:79:	  float lacunarity = 2, octaves = 7;
k3d/share/shaders/k3d_terran2.sl:81:	  float multifractal = 0;
k3d/share/shaders/k3d_terran2.sl:112:   * Note: this section of code must be identical to "terranbump" if you
k3d/share/shaders/k3d_terran2.sl:113:   *       expect these two shaders to work well together.
k3d/share/shaders/k3d_terran2.sl:116:  if (multifractal == 0) {	/* use a "standard" fBm bump function */
k3d/share/shaders/k3d_terran2.sl:118:      for (i = 0;  i < octaves;  i += 1) {
k3d/share/shaders/k3d_terran2.sl:121:	  o *= spectral_exp;
k3d/share/shaders/k3d_terran2.sl:124:  else {			/* use a "multifractal" fBm bump function */
k3d/share/shaders/k3d_terran2.sl:125:      /* get "distortion" vector, as used with clouds */
k3d/share/shaders/k3d_terran2.sl:127:      /* compute bump vector using MfBm with displaced point */
k3d/share/shaders/k3d_terran2.sl:128:      o = spectral_exp;  tp = Ptexture;
k3d/share/shaders/k3d_terran2.sl:131:      for (i = 1;  i < octaves  &&  weight >= VERY_SMALL;  i += 1) {
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:157:  /* fractally purturb color map offset using "chaos" */
k3d/share/shaders/k3d_terran2.sl:169:       * so I used a scanned photo of the real Earth to select some
k3d/share/shaders/k3d_terranbump.sl:17:displacement k3d_terranbump(float spectral_exp = 0.5;
k3d/share/shaders/k3d_terranbump.sl:18:			    float lacunarity = 2, octaves = 7;
k3d/share/shaders/k3d_terranbump.sl:19:			    float bump_scale = 0.04; float multifractal = 0;
k3d/share/shaders/k3d_terranbump.sl:31:  if(multifractal == 0)
k3d/share/shaders/k3d_terranbump.sl:32:    {				/* use a "standard" fBm bump function */
k3d/share/shaders/k3d_terranbump.sl:36:      for(i = 0; i < octaves; i += 1)
k3d/share/shaders/k3d_terranbump.sl:40:	  o *= spectral_exp;
k3d/share/shaders/k3d_terranbump.sl:44:    {				/* use a "multifractal" fBm bump function */
k3d/share/shaders/k3d_terranbump.sl:45:      /* get "distortion" vector, as used with clouds */
k3d/share/shaders/k3d_terranbump.sl:47:      /* compute bump vector using MfBm with displaced point */
k3d/share/shaders/k3d_terranbump.sl:48:      o = spectral_exp;
k3d/share/shaders/k3d_terranbump.sl:52:      for(i = 1; i < octaves && weight >= VERY_SMALL; i += 1)
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:4:#include "k3d_project.h"
k3d/share/shaders/k3d_texblender.sl:7:#include "k3d_reflections.h"
k3d/share/shaders/k3d_texblender.sl:14:    extern vector I;
k3d/share/shaders/k3d_texblender.sl:21:myEnvironment (point P;  vector R;  float Kr, blur;  DECLARE_ENVPARAMS;)
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:150:		string Gspace[5]={"object","object","object","object","object"};
k3d/share/shaders/k3d_texblender.sl:159:    vector V ,D,badN,corr,dispDir,ndir;
k3d/share/shaders/k3d_texblender.sl:200:		env=myEnvironment(P,normalize(reflect(V,Nf)),1,Rblur,ENVPARAMS);
k3d/share/shaders/k3d_texblender.sl:206:		benv=myEnvironment(P,refract(V,Nf,(V.Nf > 0) ? 1.0/eta : eta),1,RFblur,ENVPARAMS);
k3d/share/shaders/k3d_tooledsteel.sl:8: *  A vector is computed from the gradient of the distance function,
k3d/share/shaders/k3d_tooledsteel.sl:9: *  and then used as the vector of anisotropy. works best on parametric
k3d/share/shaders/k3d_tooledsteel.sl:18: *          		  the swirls. set this to zero for a perfect grid.
k3d/share/shaders/k3d_tooledsteel.sl:22: *  Kr			- coefficient of reflectivity
k3d/share/shaders/k3d_tooledsteel.sl:27: *  mapspread		- the spread of the reflection map streaking
k3d/share/shaders/k3d_tooledsteel.sl:29: *  twist		- allows you to twist the direction of anisotropy
k3d/share/shaders/k3d_tooledsteel.sl:35:vector
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:43:  vector udir = vector(1,0,0);
k3d/share/shaders/k3d_tooledsteel.sl:44:  vector vdir = vector(0,1,0);
k3d/share/shaders/k3d_tooledsteel.sl:55:  vector offset, nzoff, out;
k3d/share/shaders/k3d_tooledsteel.sl:69:	offset = vector(a,b,c);
k3d/share/shaders/k3d_tooledsteel.sl:71:	nzoff = ((vector cellnoise(surrcell)-.5)*Nzscale);
k3d/share/shaders/k3d_tooledsteel.sl:89:anisospecular (vector VA; float specspread; float specwidth)
k3d/share/shaders/k3d_tooledsteel.sl:92:    extern vector I;
k3d/share/shaders/k3d_tooledsteel.sl:97:    vector V = normalize(-I);
k3d/share/shaders/k3d_tooledsteel.sl:104:        extern vector L;  
k3d/share/shaders/k3d_tooledsteel.sl:110:            vector LN = normalize (L);
k3d/share/shaders/k3d_tooledsteel.sl:111:	    vector H = normalize (V + LN);
k3d/share/shaders/k3d_tooledsteel.sl:136:        vector VA = getvec(mult,Nzscale);
k3d/share/shaders/k3d_tooledsteel.sl:137:	point Po = transform("object",P);
k3d/share/shaders/k3d_tooledsteel.sl:139:	vector D, V= normalize(-I);
k3d/share/shaders/k3d_tooledsteel.sl:140:	vector Nf, Ntmp;
k3d/share/shaders/k3d_tooledsteel.sl:157:	      D = reflect(-V, Ntmp);
k3d/share/shaders/k3d_toonmap.sl:108:toonspec(vector N, V; float roughness)
k3d/share/shaders/k3d_toonmap.sl:111:vector H;
k3d/share/shaders/k3d_toonmap.sl:123:vector normI, half;
k3d/share/shaders/k3d_translucency.sl:12:*		translucency texture for each side of a flat object
k3d/share/shaders/k3d_translucency.sl:23:*	 If you use it in some production please email me the result.
k3d/share/shaders/k3d_translucency.sl:62:	vector H;
k3d/share/shaders/k3d_translucency.sl:63:	vector ln;
k3d/share/shaders/k3d_translucency.sl:69:	/*XMB vector assignment*/
k3d/share/shaders/k3d_translucency.sl:72:	vector V = -normalize(I);
k3d/share/shaders/k3d_uberlight.sl:9: * position and direction of the light (as spotlight does), this light
k3d/share/shaders/k3d_uberlight.sl:13: * coordinate system in effect when the light source is declared.
k3d/share/shaders/k3d_uberlight.sl:23: *       those that point in a particular direction (+z in local light
k3d/share/shaders/k3d_uberlight.sl:24: *       space, for this light).  Omni lights throw light in all directions.
k3d/share/shaders/k3d_uberlight.sl:25: *       Area lights are emitted from actual geometry (this only works on
k3d/share/shaders/k3d_uberlight.sl:30: *       light coordinates) over which the light is active.  Outside
k3d/share/shaders/k3d_uberlight.sl:38: *       (which is physically correct for point-like sources, but
k3d/share/shaders/k3d_uberlight.sl:40: *   falloffdist - the distance at which the incident energy is actually
k3d/share/shaders/k3d_uberlight.sl:42: *       is actually given by:   I = (falloffdist / distance) ^ falloff
k3d/share/shaders/k3d_uberlight.sl:51: * Shaping of the cross-section.  The cross-section of the light cone
k3d/share/shaders/k3d_uberlight.sl:52: * is actually described by a superellipse with the following
k3d/share/shaders/k3d_uberlight.sl:55: *       cone direction.  Default is 0, meaning that the center of the
k3d/share/shaders/k3d_uberlight.sl:58: *       They are the cross-sectional dimensions at a distance of 1
k3d/share/shaders/k3d_uberlight.sl:62: *       respectively.  Values of 0 will make a sharp cutoff, larger
k3d/share/shaders/k3d_uberlight.sl:65: *       are.  If this value is 0, the cross-section will be a perfect
k3d/share/shaders/k3d_uberlight.sl:66: *       rectangle.  If the value is 1, the cross-section will be a
k3d/share/shaders/k3d_uberlight.sl:67: *       perfect ellipse.  In-between values control the roundness of
k3d/share/shaders/k3d_uberlight.sl:71: *       of 1 is roughly physically correct for a spotlight and 
k3d/share/shaders/k3d_uberlight.sl:76: *       This parameter has no effect for omni lights.
k3d/share/shaders/k3d_uberlight.sl:81: *       by that color, much like a slide projector.  If you want to
k3d/share/shaders/k3d_uberlight.sl:87: * Projected noise on the light:
k3d/share/shaders/k3d_uberlight.sl:90: *       of the projected noise.
k3d/share/shaders/k3d_uberlight.sl:117: * "Fake" shadows from a blocker object.  A blocker is a superellipse
k3d/share/shaders/k3d_uberlight.sl:118: * in 3-space which effectively blocks light.  But it's not really
k3d/share/shaders/k3d_uberlight.sl:119: * geometry, the shader just does the intersection with the
k3d/share/shaders/k3d_uberlight.sl:130: *       control as the "roundness" parameter that affects the light
k3d/share/shaders/k3d_uberlight.sl:136: *       blocker) don't actually have to block light.  In fact, in
k3d/share/shaders/k3d_uberlight.sl:137: *       this shader, shadowed regions actually just change the color
k3d/share/shaders/k3d_uberlight.sl:139: *       (0,0,0), it effectively blocks all light.  But if you set it
k3d/share/shaders/k3d_uberlight.sl:144: *       somewhat bluish.  Another effect of shadows is to set the
k3d/share/shaders/k3d_uberlight.sl:155: *       correctly acting upon, this parameter.  The built-in functions
k3d/share/shaders/k3d_uberlight.sl:164: *       makes specular highlights, without affecting the rest of the
k3d/share/shaders/k3d_uberlight.sl:166: *       respect to the surface shader, as described above for
k3d/share/shaders/k3d_uberlight.sl:191: * tried to avoid Shading Language constructs which wouldn't work on
k3d/share/shaders/k3d_uberlight.sl:193: * "vector" type and I often declare variables where they are used,
k3d/share/shaders/k3d_uberlight.sl:196: * substitute "point" for all occurrances of "vector", and move the
k3d/share/shaders/k3d_uberlight.sl:202: * Contacts:  {lg|ronen}@pixar.com
k3d/share/shaders/k3d_uberlight.sl:220: *        a,b and A,B for the inner and outer ellipses, respectively)
k3d/share/shaders/k3d_uberlight.sl:274: *   - attenuation factor based on the falloff and shaping
k3d/share/shaders/k3d_uberlight.sl:278:		       vector axis;	/* light axis */
k3d/share/shaders/k3d_uberlight.sl:283:		       float shearx, sheary;	/* shear the direction */
k3d/share/shaders/k3d_uberlight.sl:324:    atten *= pow(zcomp(normalize(vector PL)), beamdistribution);
k3d/share/shaders/k3d_uberlight.sl:356:      vector Vlight = (Pb1 - Pb2);
k3d/share/shaders/k3d_uberlight.sl:378:		     /* xy shaping of the cross-section and angle falloff */
k3d/share/shaders/k3d_uberlight.sl:383:		     /* Cookie or slide to control light cross-sectional color */
k3d/share/shaders/k3d_uberlight.sl:387:		     vector noiseoffset = 0;
k3d/share/shaders/k3d_uberlight.sl:395:		     vector shadowcheat = vector "shader"(0, 0, 0);
k3d/share/shaders/k3d_uberlight.sl:408:   * space and aimed in the +z direction.  So to move or orient the
k3d/share/shaders/k3d_uberlight.sl: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:440:    {				/* Omnidirectional light */
k3d/share/shaders/k3d_uberlight.sl:447:    /* Accumulate attenuation of the light as it is affected by various
k3d/share/shaders/k3d_uberlight.sl:455:     * in the ShapeLightVolume function.
k3d/share/shaders/k3d_uberlight.sl:463:    /* Project a slide or use a cookie */
k3d/share/shaders/k3d_urbermap.sl:26:string abReflectionMap="I:/ArtWorks/Textures/Batik_1.4.tif"; 
k3d/share/shaders/k3d_urbermap.sl:27:float abReflectionUp=0; 
k3d/share/shaders/k3d_urbermap.sl:28:float abReflectivity=0.1; 
k3d/share/shaders/k3d_urbermap.sl:29:float abReflectionMapBlur=1; 
k3d/share/shaders/k3d_urbermap.sl:41:vector V, D;
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:183:if( abReflectionMap != "" )
k3d/share/shaders/k3d_urbermap.sl:185:D = reflect(-V, Nf);
k3d/share/shaders/k3d_urbermap.sl:187:if( abReflectionUp != 0 )
k3d/share/shaders/k3d_urbermap.sl:189:D = vector(-zcomp(D), xcomp(D), ycomp(D));
k3d/share/shaders/k3d_urbermap.sl:191:Crefl = abReflectivity *
k3d/share/shaders/k3d_urbermap.sl:192:color environment(abReflectionMap, D,
k3d/share/shaders/k3d_urbermap.sl:193:"swidth", abReflectionMapBlur,
k3d/share/shaders/k3d_urbermap.sl:194:"twidth", abReflectionMapBlur );
k3d/share/shaders/k3d_veinedmarble.sl:55:  /* Now calculate the veining function for the lookup area */
k3d/share/shaders/k3d_velvet.sl:9: *   - A retroreflective lobe (back toward the light source)
k3d/share/shaders/k3d_velvet.sl:10: *   - Scattering near the horizon, regardless of incident direction
k3d/share/shaders/k3d_velvet.sl:14: *   Ks:	controls retroreflective lobe
k3d/share/shaders/k3d_velvet.sl:16: *   Ka:	ambient component (affects diffuse color only)
k3d/share/shaders/k3d_velvet.sl:17: *   sheen:	color of retroreflective lobe and horizon scattering
k3d/share/shaders/k3d_velvet.sl:18: *   roughness: shininess of fabric (controls retroreflection only)
k3d/share/shaders/k3d_velvet.sl:26: *			Fixed retroreflection lobe (sign error); added
k3d/share/shaders/k3d_velvet.sl:46:  normal Nf;                     /* Normalized normal vector */
k3d/share/shaders/k3d_velvet.sl:47:  vector V;                      /* Normalized eye vector */
k3d/share/shaders/k3d_velvet.sl:48:  vector H;                      /* Bisector vector for Phong/Blinn */
k3d/share/shaders/k3d_velvet.sl:49:  vector Ln;                     /* Normalized vector to light */
k3d/share/shaders/k3d_velvet.sl:59:    /* Retroreflective lobe */
k3d/share/shaders/k3d_venus.sl:8: *      The shader works by creating a fractal turbulence function over
k3d/share/shaders/k3d_venus.sl:18: *    omega - controls the fractal characteristics of the clouds
k3d/share/shaders/k3d_venus.sl:19: *    octaves - the number of octaves of noise to sum for the clouds.
k3d/share/shaders/k3d_venus.sl:57:		  float octaves = 8;)
k3d/share/shaders/k3d_venus.sl:65:  float l, o, a, i;		/* Loop control for fractal sum */
k3d/share/shaders/k3d_venus.sl:66:  float value;			/* Fractal sum is stored here */
k3d/share/shaders/k3d_venus.sl:85:  for(i = 0; i < octaves; i += 1)
k3d/share/shaders/k3d_venus2.sl:10: *      The shader works by creating a fractal turbulence function over
k3d/share/shaders/k3d_venus2.sl:20: *    omega - controls the fractal characteristics of the clouds
k3d/share/shaders/k3d_venus2.sl:21: *    octaves - the number of octaves of noise to sum for the clouds.
k3d/share/shaders/k3d_venus2.sl:58:       float octaves = 8;
k3d/share/shaders/k3d_venus2.sl:67:  float l, o, a, i;         /* Loop control for fractal sum */
k3d/share/shaders/k3d_venus2.sl:68:  float value;              /* Fractal sum is stored here */
k3d/share/shaders/k3d_venus2.sl:85:  for (i = 0;  i < octaves;  i += 1) {
k3d/share/shaders/k3d_volcube.sl:1:/* srf_vol_cube - Brian Steiner - Sony Pictures Imageworks
k3d/share/shaders/k3d_volcube.sl:14:   ShowActiveVol       - if 1 show the active volume instead of density.
k3d/share/shaders/k3d_volcube.sl:21:/* fnc_traceBox returns an intersection point on a box */
k3d/share/shaders/k3d_volcube.sl:30:	      string refractSpace;)
k3d/share/shaders/k3d_volcube.sl:33:    extern vector I;
k3d/share/shaders/k3d_volcube.sl:35:    vector Rd,Ro;
k3d/share/shaders/k3d_volcube.sl:37:    vector Pn;
k3d/share/shaders/k3d_volcube.sl:40:    vector IN;
k3d/share/shaders/k3d_volcube.sl:45:    Rd = vtransform(refractSpace,IN);
k3d/share/shaders/k3d_volcube.sl:46:    Ro = transform(refractSpace,P);
k3d/share/shaders/k3d_volcube.sl:102:/* active_volume - controls animation in the volume */
k3d/share/shaders/k3d_volcube.sl:104:active_volume(point Pos; float vol_mult, vol_offset;)
k3d/share/shaders/k3d_volcube.sl:112:/* density function will return the final volume density */
k3d/share/shaders/k3d_volcube.sl:117:    float activeVol = 0;
k3d/share/shaders/k3d_volcube.sl:118:    float offset_active = .1;
k3d/share/shaders/k3d_volcube.sl:119:    float mult_active = 20;
k3d/share/shaders/k3d_volcube.sl:120:    activeVol = active_volume(Pos,vol_mult,vol_offset);
k3d/share/shaders/k3d_volcube.sl:123:    return activeVol + (dens-2);
k3d/share/shaders/k3d_volcube.sl:138:    Nd = ntransform("object","current",Nd);
k3d/share/shaders/k3d_volcube.sl:146:/* shading function returns diffuse ans specular */
k3d/share/shaders/k3d_volcube.sl:149:		  vector V;
k3d/share/shaders/k3d_volcube.sl:154:    extern vector L;
k3d/share/shaders/k3d_volcube.sl:196:	     float  ShowActiveVol  = 0;
k3d/share/shaders/k3d_volcube.sl:200:    point  inPoint_obj  = transform("object",P);
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:202:    vector V  = normalize(-I);
k3d/share/shaders/k3d_volcube.sl:209:    vector step_obj     = (outPoint_obj-inPoint_obj)/numOfSteps;
k3d/share/shaders/k3d_volcube.sl:210:    vector step_cur     = vtransform("object","current",step_obj);
k3d/share/shaders/k3d_volcube.sl:233:	/*--- Run Density Function ---*/
k3d/share/shaders/k3d_volcube.sl:234:	if(ShowActiveVol == 1)
k3d/share/shaders/k3d_volcube.sl:235:	    cur_density = active_volume(Pcur_obj,Vol_Mult,Vol_Offset);
k3d/share/shaders/k3d_wallpaper.sl:29:    float sctr, tctr, scell, tcell;
k3d/share/shaders/k3d_wallpaper.sl:30:    float scellctr, tcellctr;
k3d/share/shaders/k3d_wallpaper.sl:40:    scellctr = floor(s*NCELLS);
k3d/share/shaders/k3d_wallpaper.sl:41:    tcellctr = floor(t*NCELLS);
k3d/share/shaders/k3d_wallpaper.sl:46:	    scell = scellctr + i;
k3d/share/shaders/k3d_wallpaper.sl:47:	    tcell = tcellctr + j;
k3d/share/shaders/k3d_wallpaper.sl:49:                sctr = CELLSIZE * (scell + 0.5
k3d/share/shaders/k3d_wallpaper.sl:51:                tctr = CELLSIZE * (tcell + 0.5
k3d/share/shaders/k3d_wallpaper.sl:53:                ss = s - sctr;
k3d/share/shaders/k3d_wallpaper.sl:54:                tt = t - tctr;
k3d/share/shaders/k3d_wallpaper.sl:69:    /* "matte" reflection model */
k3d/share/shaders/k3d_warningstripes.sl:4:// Contact: tshead@k-3d.com
k3d/share/shaders/k3d_warningstripes.sl:54:	vector Nf = normalize(faceforward(N, I));
k3d/share/shaders/k3d_water.sl:14: *   reflections of the environment.

k3d/share/shaders/k3d_water.sl:18: *    Kr - coefficient for mirror-like reflections of environment

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

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

k3d/share/shaders/k3d_water.sl:46:    normal Nf;               /* Forward facing normal vector */

k3d/share/shaders/k3d_water.sl:47:    vector IN;               /* normalized incident vector */

k3d/share/shaders/k3d_water.sl:48:    vector uoffset, voffset; /* Offsets for blur */

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

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

k3d/share/shaders/k3d_water.sl:54:    /* Construct a forward facing surface normal */

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

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

k3d/share/shaders/k3d_water.sl:62:	Rdir = normalize (reflect (IN, Nf));

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

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

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

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

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

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

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

k3d/share/shaders/k3d_watercolor.sl:20:	vector nI = normalize(I);

k3d/share/shaders/k3d_watercolor.sl:21:	vector nN = normalize(Ng);

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

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

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

k3d/share/shaders/k3d_watercolor.sl:37:	vector dPE = P-E;

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

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

k3d/share/shaders/k3d_waterlight.sl:5:A cheap trick to simulate underwater caustics - best used for deep-sea effects
k3d/share/shaders/k3d_waterlight.sl:22:	solar(vector "shader" (0, -1, 0), 0)
k3d/share/shaders/k3d_windowlight.sl:12: *   up, in - vectors which define the orientation of the window
k3d/share/shaders/k3d_windowlight.sl:13: *   from, to - the direction that the light falls
k3d/share/shaders/k3d_windowlight.sl:34:		      vector up = vector "shader"(0, 0, 1);
k3d/share/shaders/k3d_windowlight.sl:35:		      vector in = vector "shader"(0, 1, 0);
k3d/share/shaders/k3d_windowlight.sl:42:  uniform vector inv, right, upv;
k3d/share/shaders/k3d_windowlight.sl:43:  uniform vector path;
k3d/share/shaders/k3d_windowlight.sl:44:  float offset, modulus, yfract, xfract;
k3d/share/shaders/k3d_windowlight.sl:64:	yfract =
k3d/share/shaders/k3d_windowlight.sl:69:      yfract = 0;
k3d/share/shaders/k3d_windowlight.sl: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_wood2.sl:9: *   txtscale - overall scaling factor for the texture
k3d/share/shaders/k3d_woodcut.sl:25:vector Nf, V; 
k3d/share/shaders/k3d_woodcut.sl:88: vector Ndisp = normalize(N) * (0 / max(spacescale,1e-6));
