gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz/gfx demo/fontfilter2.py util/demokeys.py


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz/gfx demo/fontfilter2.py util/demokeys.py
Date: Tue, 04 Mar 2003 04:49:24 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        03/03/04 04:49:24

Modified files:
        gfx/demo       : fontfilter2.py 
        gfx/util       : demokeys.py 

Log message:
        Halo is now good

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/fontfilter2.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/util/demokeys.py.diff?tr1=1.9&tr2=1.10&r1=text&r2=text

Patches:
Index: gzz/gfx/demo/fontfilter2.py
diff -u gzz/gfx/demo/fontfilter2.py:1.3 gzz/gfx/demo/fontfilter2.py:1.4
--- gzz/gfx/demo/fontfilter2.py:1.3     Tue Mar  4 04:29:31 2003
+++ gzz/gfx/demo/fontfilter2.py Tue Mar  4 04:49:22 2003
@@ -44,9 +44,12 @@
     Enable REGISTER_COMBINERS_NV
 
     SPARE0 = (1-TEX0)
+    SPARE1 = (TEX0) * (TEX0)
 
-    color = COL0 * SPARE0
-    alpha = SPARE0.blue
+    SPARE1 = (1-SPARE1)
+
+    color = COL0 
+    alpha = SPARE1.blue
 """)
 
 print PageSpanPaper.setupOnlyPass
@@ -65,22 +68,25 @@
        paperOnce(vs, 0, layoutBg, scale)
 
     if currentScene.halo:
-       sz = 10
+       sz = 6
+       mul = math.sqrt(scale / 2.0)
+       mul = 1.4 * (scale / 2.0)
        for x in range(-sz,sz+1):
            for y in range(-sz,sz+1):
                if x==0 and y==0: continue
-               into = vs.translateCS(0, str((x,y)), x, y)
+               into = vs.translateCS(0, str((x,y)), mul * x, mul * y)
 
                dist = math.hypot(x, y)
                if dist > sz: continue
 
                # f = .15*(1 - dist / sz)
-               f = .02
+               f = .01
 
                vs.put(getDListNocoords("""
                    Enable BLEND
                    Disable DEPTH_TEST
-                   Disable ALPHA_TEST
+                   Enable ALPHA_TEST
+                   AlphaFunc GREATER .02
                    BlendFunc ONE ONE_MINUS_SRC_COLOR
                    TexParameter TEXTURE_2D TEXTURE_MIN_FILTER 
LINEAR_MIPMAP_LINEAR
                    Color %(f)s %(f)s %(f)s
@@ -90,8 +96,8 @@
     vs.put(getDListNocoords("""
        Enable BLEND
        Disable DEPTH_TEST
-       BlendFunc ONE ONE
-       BlendFunc ONE ONE_MINUS_SRC_ALPHA
+       BlendFunc SRC_ALPHA ONE
+       BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA
        TexParameter TEXTURE_2D TEXTURE_MIN_FILTER LINEAR_MIPMAP_LINEAR
        Color 0 0 0
     """ % locals()))
Index: gzz/gfx/util/demokeys.py
diff -u gzz/gfx/util/demokeys.py:1.9 gzz/gfx/util/demokeys.py:1.10
--- gzz/gfx/util/demokeys.py:1.9        Fri Feb 21 15:02:36 2003
+++ gzz/gfx/util/demokeys.py    Tue Mar  4 04:49:24 2003
@@ -170,9 +170,9 @@
     def move(self, dir, scene, key):
        v = getattr(scene, self.attr)
        if dir > 0:
-           v *= 1.1
+           v *= 1.03
        else:
-           v /= 1.1
+           v /= 1.03
        print "SlideLog: ",v
        setattr(scene, self.attr, v)
 




reply via email to

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