k3d/share/shaders/k3d_brushedmetal2.sl:8: *  stochasticly spreads the map, so it looks a little grainy.
k3d/share/shaders/k3d_map_pattern_1.sl:12:float grainy=1; 
k3d/share/shaders/k3d_map_pattern_1.sl:63:r2 = grainy * (1.3 - noise (PQ)) + (1-grainy);
k3d/share/shaders/k3d_oak.sl:5: *    wood grain.  The rings surround the z axis, so to position the
k3d/share/shaders/k3d_oak.sl:17: *   Cdarkwood - the darker color in the ring/grain
k3d/share/shaders/k3d_oak.sl:20: *   grainfreq - frequency of the fine grain
k3d/share/shaders/k3d_oak.sl:26: *   ringy, grainy - overall scale on the degree to which rings and
k3d/share/shaders/k3d_oak.sl:27: *       grain are weighted.  0 turns one off, 1 makes full effect.
k3d/share/shaders/k3d_oak.sl:29: *       ring or grain.
k3d/share/shaders/k3d_oak.sl:58:		float grainfreq = 25;
k3d/share/shaders/k3d_oak.sl:64:		float ringy = 1, grainy = 1;
k3d/share/shaders/k3d_oak.sl:73:    oaktexture(Pshad, dPshad, ringfreq, ringunevenness, grainfreq, ringnoise,
k3d/share/shaders/k3d_oak.sl:75:	       angularwobblefreq, ringy, grainy);
k3d/share/shaders/k3d_oakplank.sl:22: * Parameters for the color and pattern of the wood grain: 
k3d/share/shaders/k3d_oakplank.sl:24: *   Cdarkwood - the darker color in the ring/grain
k3d/share/shaders/k3d_oakplank.sl:27: *   grainfreq - frequency of the fine grain
k3d/share/shaders/k3d_oakplank.sl:33: *   ringy, grainy - overall scale on the degree to which rings and
k3d/share/shaders/k3d_oakplank.sl:34: *       grain are weighted.  0 turns one off, 1 makes full effect.
k3d/share/shaders/k3d_oakplank.sl:36: *       ring or grain.
k3d/share/shaders/k3d_oakplank.sl:108:		     float grainfreq = 25;
k3d/share/shaders/k3d_oakplank.sl:115:		     float ringy = 1, grainy = 1;
k3d/share/shaders/k3d_oakplank.sl:141:  float wood = oaktexture(Ppat, dPshad, ringfreq, ringunevenness, grainfreq,
k3d/share/shaders/k3d_oakplank.sl:144:			  angularwobblefreq, ringy, grainy);
k3d/share/shaders/k3d_parquet_plank.sl:16: *   grainscale - scaling for the fine grain
k3d/share/shaders/k3d_parquet_plank.sl:21: *   grainy - relative graininess (0 = no fine grain)
k3d/share/shaders/k3d_parquet_plank.sl:33:			  float ringscale = 15, grainscale = 60;
k3d/share/shaders/k3d_parquet_plank.sl:41:			  float grainy = 1, wavy = 0.08;)
k3d/share/shaders/k3d_parquet_plank.sl:93:   * are grooves, 1 where the wood grain is visible.  Do some simple
k3d/share/shaders/k3d_parquet_plank.sl:131:       * Multiply the ring pattern by the fine grain
k3d/share/shaders/k3d_parquet_plank.sl:133:      fade = smoothstep(2 / grainscale, 8 / grainscale, fwidth);
k3d/share/shaders/k3d_parquet_plank.sl:136:	  r2 = 1.3 - noise(ss * grainscale, (tt * grainscale / 4));
k3d/share/shaders/k3d_parquet_plank.sl:137:	  r2 = grainy * r2 * r2 + (1 - grainy);
k3d/share/shaders/k3d_parquet_plank.sl:147:  /* Mix the light and dark wood according to the grain pattern */
k3d/share/shaders/k3d_parquet_plank2.sl:17: *   grainscale - scaling for the fine grain
k3d/share/shaders/k3d_parquet_plank2.sl:22: *   grainy - relative graininess (0 = no fine grain)
k3d/share/shaders/k3d_parquet_plank2.sl:47:	       float ringscale = 15, grainscale = 60;
k3d/share/shaders/k3d_parquet_plank2.sl:55:	       float grainy = 1, wavy = 0.08; )
k3d/share/shaders/k3d_parquet_plank2.sl:100:   * are grooves, 1 where the wood grain is visible.  Do some simple
k3d/share/shaders/k3d_parquet_plank2.sl:130:       * Multiply the ring pattern by the fine grain
k3d/share/shaders/k3d_parquet_plank2.sl:132:      fade = smoothstep (2/grainscale, 8/grainscale, fwidth);
k3d/share/shaders/k3d_parquet_plank2.sl:134:	  r2 = 1.3 - noise (ss*grainscale, (tt*grainscale/4));
k3d/share/shaders/k3d_parquet_plank2.sl:135:	  r2 = grainy * r2*r2 + (1-grainy);
k3d/share/shaders/k3d_parquet_plank2.sl:143:  /* Mix the light and dark wood according to the grain pattern */
k3d/share/shaders/k3d_parquet_tile.sl:18: *   grainscale - scaling for the fine grain
k3d/share/shaders/k3d_parquet_tile.sl:23: *   grainy - relative graininess (0 = no fine grain)
k3d/share/shaders/k3d_parquet_tile.sl:55: *   - grainscale from 60 to 55
k3d/share/shaders/k3d_parquet_tile.sl:62:	       float ringscale = 25, grainscale = 55;
k3d/share/shaders/k3d_parquet_tile.sl:70:	       float grainy = 1, wavy = 0.08; )
k3d/share/shaders/k3d_parquet_tile.sl:115:   * are grooves, 1 where the wood grain is visible.  Do some simple
k3d/share/shaders/k3d_parquet_tile.sl:145:       * Multiply the ring pattern by the fine grain
k3d/share/shaders/k3d_parquet_tile.sl:147:      fade = smoothstep (2/grainscale, 8/grainscale, fwidth);
k3d/share/shaders/k3d_parquet_tile.sl:149:	  r2 = 1.3 - noise (ss*grainscale, (tt*grainscale/4));
k3d/share/shaders/k3d_parquet_tile.sl:150:	  r2 = grainy * r2*r2 + (1-grainy);
k3d/share/shaders/k3d_parquet_tile.sl:158:  /* Mix the light and dark wood according to the grain pattern */
k3d/share/shaders/k3d_plank.sl:12: *   grainscale - scaling for the fine grain
k3d/share/shaders/k3d_plank.sl:19: *   grainy - relative graininess (0 = no fine grain)
k3d/share/shaders/k3d_plank.sl:31:		  float ringscale = 15, grainscale = 60;
k3d/share/shaders/k3d_plank.sl:38:		  float grainy = 1, wavy = 0.08;)
k3d/share/shaders/k3d_plank.sl:79:   * are grooves, 1 where the wood grain is visible.  Do some simple
k3d/share/shaders/k3d_plank.sl:117:       * Multiply the ring pattern by the fine grain
k3d/share/shaders/k3d_plank.sl:119:      fade = smoothstep(2 / grainscale, 8 / grainscale, fwidth);
k3d/share/shaders/k3d_plank.sl:122:	  r2 = 1.3 - noise(ss * grainscale, (tt * grainscale));
k3d/share/shaders/k3d_plank.sl:123:	  r2 = grainy * r2 * r2 + (1 - grainy);
k3d/share/shaders/k3d_plank.sl:133:  /* Mix the light and dark wood according to the grain pattern */
k3d/share/shaders/k3d_rustymetal.sl:8: *   the corrosion is kind of grainy).  Where there is no rust, shade like
k3d/share/shaders/k3d_superplank.sl:6: *   like varnished oak planks, with staggered planks, rings and grain,
k3d/share/shaders/k3d_superplank.sl:30: *   grainy - relative graininess (0 = no fine grain)
k3d/share/shaders/k3d_superplank.sl:31: *   grainscale - scaling for the fine grain
k3d/share/shaders/k3d_superplank.sl:32: *   graindepth - depth of grain and ring grooves
k3d/share/shaders/k3d_superplank.sl:78:			float grainy = 1;	/* Relative graininess */
k3d/share/shaders/k3d_superplank.sl:79:			float grainscale = 60;	/* Larger makes smaller "grains" */
k3d/share/shaders/k3d_superplank.sl:80:			float graindepth = 0.0001;	/* Depth of divots where grains are */
k3d/share/shaders/k3d_superplank.sl:87:  float grain_s, grain_t, ring_s, ring_t, plank_s, plank_t;
k3d/share/shaders/k3d_superplank.sl:101:  float grain;			/* 1 inside a grain bit, 0 elsewhere */
k3d/share/shaders/k3d_superplank.sl:183:   * are grooves, 1 where the wood grain is visible.  Do some simple
k3d/share/shaders/k3d_superplank.sl:203:   * 3. Ring and grain patterns, color and specularity adjustment.
k3d/share/shaders/k3d_superplank.sl:205:   * The wood has rings at one scale, grain at a finer scale.  They
k3d/share/shaders/k3d_superplank.sl:227:      fwidth = max(swidth * grainscale, twidth * grainscale);
k3d/share/shaders/k3d_superplank.sl:231:	  grain_s = ss * grainscale;
k3d/share/shaders/k3d_superplank.sl:232:	  grain_t = tt * grainscale;
k3d/share/shaders/k3d_superplank.sl:233:	  r2 = 1.3 - noise(12 * grain_s, grain_t);
k3d/share/shaders/k3d_superplank.sl:234:	  r2 = grainy * r2 * r2 + (1 - grainy);
k3d/share/shaders/k3d_superplank.sl:235:	  grain = (1 - fade) * r2 + (0.75 * fade);
k3d/share/shaders/k3d_superplank.sl:238:	grain = 0.75;
k3d/share/shaders/k3d_superplank.sl:243:      grain = 0.75;
k3d/share/shaders/k3d_superplank.sl:245:  grain *= (.85 + .15 * ring);
k3d/share/shaders/k3d_superplank.sl:252:  /* Darken the wood according to the ring and grain patterns */
k3d/share/shaders/k3d_superplank.sl:253:  woodcolor *= (1 - 0.25 * ring) * (1 - .5 * grain);
k3d/share/shaders/k3d_superplank.sl:254:  /* Combine the rings, grain, plank variation into one surface color */
k3d/share/shaders/k3d_superplank.sl:257:  adjustedKs = Ks * (1 + .2 * ring) * (1 + .3 * grain) * groovy;
k3d/share/shaders/k3d_superplank.sl:263:   * We do some bump mapping to make the grooves and grain depressed,
k3d/share/shaders/k3d_superplank.sl:276:      /* Depressions due to grain & rings */
k3d/share/shaders/k3d_superplank.sl:277:      disp -= graindepth * (.75 * grain + ring);
k3d/share/shaders/k3d_superplank.sl:291:   * Have some subtle interaction between grain and specularity.
k3d/share/shaders/k3d_texblender.sl:75:	float grainy = 1;
k3d/share/shaders/k3d_texblender.sl:86:    float r2 = grainy * (1.3 - noise (PQ)) + (1-grainy);
k3d/share/shaders/k3d_wood2.sl:12: *   grainy - relative graininess (0 = no fine grain)
k3d/share/shaders/k3d_wood2.sl:27:		  color darkwood = color(0.35, 0.22, 0.08); float grainy = 1;)
k3d/share/shaders/k3d_wood2.sl:47:  /* \/--  extra line added for fine grain */
k3d/share/shaders/k3d_wood2.sl:49:  r2 = grainy * (1.3 - noise(PQ)) + (1 - grainy);
