gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gfx libpaper/texcomb_NV1X.py libpaper/textu...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz/gfx libpaper/texcomb_NV1X.py libpaper/textu...
Date: Tue, 03 Sep 2002 07:15:14 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/09/03 07:15:14

Modified files:
        gfx/libpaper   : texcomb_NV1X.py textures.py 
        gfx/libtexture : binmain.cxx 
Added files:
        gfx/libtexture : fnoise.texture 

Log message:
        Add fourier synthesis noise

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/texcomb_NV1X.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/textures.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libtexture/fnoise.texture?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libtexture/binmain.cxx.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: gzz/gfx/libpaper/texcomb_NV1X.py
diff -c gzz/gfx/libpaper/texcomb_NV1X.py:1.3 
gzz/gfx/libpaper/texcomb_NV1X.py:1.4
*** gzz/gfx/libpaper/texcomb_NV1X.py:1.3        Tue Sep  3 06:14:47 2002
--- gzz/gfx/libpaper/texcomb_NV1X.py    Tue Sep  3 07:15:13 2002
***************
*** 98,104 ****
        c = (c.replace("CI0", "CombinerInputNV COMBINER0_NV").
                replace("CI1", "CombinerInputNV COMBINER1_NV").
                replace("FCI", "FinalCombinerInputNV"))
!       print "c: ",c
        return c
  
  
--- 98,104 ----
        c = (c.replace("CI0", "CombinerInputNV COMBINER0_NV").
                replace("CI1", "CombinerInputNV COMBINER1_NV").
                replace("FCI", "FinalCombinerInputNV"))
!       # print "c: ",c
        return c
  
  
Index: gzz/gfx/libpaper/textures.py
diff -c gzz/gfx/libpaper/textures.py:1.1 gzz/gfx/libpaper/textures.py:1.2
*** gzz/gfx/libpaper/textures.py:1.1    Mon Sep  2 08:56:56 2002
--- gzz/gfx/libpaper/textures.py        Tue Sep  3 07:15:13 2002
***************
*** 31,37 ****
  #    ("rgbn", [512, 512, 0, 3, "RGB", "RGB",
  #       "noise", ["type", "turbulence", "freq", "40", "scale", "-3", "bias", 
"2"]]),
      ("rgbw", [512, 512, 0, 3, "RGB", "RGB",
!         "waves", ["abs", "1", "freq0", "1", "freq1", "1"]]),
  ]]
  
  def getPaperTexture(type, gen):
--- 31,39 ----
  #    ("rgbn", [512, 512, 0, 3, "RGB", "RGB",
  #       "noise", ["type", "turbulence", "freq", "40", "scale", "-3", "bias", 
"2"]]),
      ("rgbw", [512, 512, 0, 3, "RGB", "RGB",
!         "fnoise", ["scale", 2]]),
!     ("rgbw", [512, 512, 0, 3, "RGB", "RGB",
!         "fnoise", ["freq", 2, "df", 2, bias=0.2]]),
  ]]
  
  def getPaperTexture(type, gen):
Index: gzz/gfx/libtexture/binmain.cxx
diff -c gzz/gfx/libtexture/binmain.cxx:1.3 gzz/gfx/libtexture/binmain.cxx:1.4
*** gzz/gfx/libtexture/binmain.cxx:1.3  Fri Aug 16 07:32:55 2002
--- gzz/gfx/libtexture/binmain.cxx      Tue Sep  3 07:15:13 2002
***************
*** 34,55 ****
        params.setParam(argv[i], argv[i+1]);
      }
  
!     float *data = new float[width*height*depth*ncomp];
!     for(int i=0; i<width*height*depth*ncomp; i++)
        data[i] = 0.0001;
      bin_texture->render(&params, width, height, depth, ncomp, data);
  
  
      if(bytes) { 
!       unsigned char *bdata = new unsigned char[width*height*depth*ncomp];
!       for(int i=0; i<width*height*depth*ncomp; i++) {
            int v = (int)( 255 * data[i] );
            if(v > 255) v = 255;
            if(v < 0) v = 0;
            bdata[i] = v;
        }
!       fwrite(bdata, sizeof(unsigned char), width*height*depth*ncomp, stdout);
      } else {
!       fwrite(data, sizeof(float), width*height*depth*ncomp, stdout);
      }
  }
--- 34,57 ----
        params.setParam(argv[i], argv[i+1]);
      }
  
!     int d = (depth==0 ? 1 : depth);
! 
!     float *data = new float[width*height*d*ncomp];
!     for(int i=0; i<width*height*d*ncomp; i++)
        data[i] = 0.0001;
      bin_texture->render(&params, width, height, depth, ncomp, data);
  
  
      if(bytes) { 
!       unsigned char *bdata = new unsigned char[width*height*d*ncomp];
!       for(int i=0; i<width*height*d*ncomp; i++) {
            int v = (int)( 255 * data[i] );
            if(v > 255) v = 255;
            if(v < 0) v = 0;
            bdata[i] = v;
        }
!       fwrite(bdata, sizeof(unsigned char), width*height*d*ncomp, stdout);
      } else {
!       fwrite(data, sizeof(float), width*height*d*ncomp, stdout);
      }
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]