  sub MinTextureA(sys n,f,h,b)
  ===========================
  static long v[16]
  v<=
  b,b,b,b,
  b,f,h,b,
  b,h,h,b,
  b,b,b,b
  MakeTexture @v, 4, 4, n
  End sub
  '
  '
  % WhiteCloudTex   1
  % SmokeTex        2
  % LightShadowTex  3
  % MediumShadowTex 4
  % DarkShadowTex   5
  % MarbleTex       10
  % VegTex          11
  % MarbleTranspTex 12
  '
  '
  sub BuildTextures(sys n,res)
  ============================
  glGenTextures n, texn
  seed=0x12345678
  indexbase 1
  MinTexture  texn[1],0xffffffff,0x80ffffff,0x00ffffff 'whitecloud
  MinTexture  texn[2],0xffffffff,0x80ffffff,0x00000000 'smoke
  MinTextureA texn[3],0x80000000,0x40000000,0x00000000 'soft light shadow
  MinTextureA texn[4],0xc0000000,0x60000000,0x00000000 'soft medium shadow
  MinTextureA texn[5],0xff000000,0x80000000,0x00000000 'soft intense shadow
  texe=5
  '
  sys img
  string imgs
  imgs = nuls res*res*4
  img  = strptr imgs
  'LoadPixImage "../images/crate.jpg",res,imgs
  '
  'pixbase,width,height,stride,colorval/mode,offset,mode
  ------------------------------------------------------
  'MARBLE
  AddNoiseC   img,res,res,32,060,060,100,255,0x53535353,1
  AddNoiseC   img,res,res,16,060,060,100, 0,0x35353535 
  AddNoiseC   img,res,res,08,070,070,050, 0,0x53535353 
  AddNoiseC   img,res,res,02,010,010,005, 0,0x53535353 
  MakeTexture img,res,res,texn[10]
  'GREEN PLANE
  AddNoiseC   img,res,res,08,100,100,000,255,0x35353535,1
  AddNoiseC   img,res,res,02,100,100,000, 0,0x35353535 
  AddNoiseC   img,res,res,01,050,050,000, 0,0x35353535 
  MakeTexture img,res,res,texn[11]
  'MARBLE TRANSLUCENT
  AddNoiseC   img,res,res,32,060,060,100, 200,0x53535353,1
  AddNoiseC   img,res,res,16,060,060,100, 0,0x35353535 
  AddNoiseC   img,res,res,08,070,070,050, 0,0x53535353 
  AddNoiseC   img,res,res,02,010,010,005, 0,0x53535353 
  MakeTexture img,res,res,texn[12]
  texe=12
  '
  end sub


