gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] libvob/vob demo/multifil/fillet3d.py fillet/lig...


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob/vob demo/multifil/fillet3d.py fillet/lig...
Date: Sat, 28 Jun 2003 09:33:45 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Tuomas J. Lukka <address@hidden>        03/06/28 09:33:45

Modified files:
        vob/demo/multifil: fillet3d.py 
        vob/fillet     : light3d.py 
        vob/putil      : texture.py 

Log message:
        twids

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/fillet3d.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/fillet/light3d.py.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/putil/texture.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: libvob/vob/demo/multifil/fillet3d.py
diff -u libvob/vob/demo/multifil/fillet3d.py:1.7 
libvob/vob/demo/multifil/fillet3d.py:1.8
--- libvob/vob/demo/multifil/fillet3d.py:1.7    Fri Jun 27 07:53:14 2003
+++ libvob/vob/demo/multifil/fillet3d.py        Sat Jun 28 09:33:45 2003
@@ -53,6 +53,7 @@
             *light3d.commonkeys
        )
     def scene(self, vs):
+       # vob.putil.texture.printTex(self.depthTexture.getTexId())
        vs.put( background((.8,.4,0)))
        vs.put(getDListNocoords("""
            PushAttrib POLYGON_BIT ENABLE_BIT
Index: libvob/vob/fillet/light3d.py
diff -u libvob/vob/fillet/light3d.py:1.12 libvob/vob/fillet/light3d.py:1.13
--- libvob/vob/fillet/light3d.py:1.12   Fri Jun 27 10:48:13 2003
+++ libvob/vob/fillet/light3d.py        Sat Jun 28 09:33:45 2003
@@ -59,11 +59,15 @@
 edgefp = GL.createProgram(cg.compile("""
 void main(
     float4 incol: COLOR0,
-    float4 wpos : WPOS,
+    float4 qpos : TEXCOORD0,
     uniform sampler2D tex0,
     out float4 col : COLOR) {
-    float2 tc = wpos.xy / 1024.0;
-    tc.y = tc.y + 1 - 768 / 1024.0;
+    // float2 tc = wpos.xy / 1024.0;
+    // tc.y = tc.y + 1 - 768 / 1024.0;
+    float2 tc = qpos.xy;
+    tc.y = 1-tc.y;
+    tc.y = tc.y * 768 / 1024;
+    tc.y += (1-768/1024.0);
     float d = tex2D(tex0, tc).x;
     float d1 = tex2D(tex0, tc + float2(0,2/1024.0)).x;
     float d2 = tex2D(tex0, tc + float2(0,-2/1024.0)).x;
@@ -71,7 +75,7 @@
     float d4 = tex2D(tex0, tc + float2(-2/1024.0,0)).x;
 
     float4 color;
-    float lim = .01;
+    float lim = .001;
     float diff = (
        (abs(d1-d)>lim ? 1 : 0) + 
        (abs(d2-d)>lim ? 1 : 0) + 
@@ -86,12 +90,22 @@
 
     // color.xyz = diff > .01 ? 0 : 1;
     color.w = diff > 0 ? 1 : 0;
-    // color.w = 1;
+    color.w = 1;
+
+    color.xyz = (d-.53) * 100 + .5;
+    // 10000 *abs(d1-d);
+    float f = max(
+       abs(d1-d),
+       max(
+           abs(d2-d),
+           max( 
+               abs(d3-d),
+               abs(d4-d))));
 
     col = color;
 }
     
-""", "fp30"))
+""", "arbfp1"))
 
 
 commonkeys = [
Index: libvob/vob/putil/texture.py
diff -u libvob/vob/putil/texture.py:1.2 libvob/vob/putil/texture.py:1.3
--- libvob/vob/putil/texture.py:1.2     Thu Jun 26 04:52:53 2003
+++ libvob/vob/putil/texture.py Sat Jun 28 09:33:45 2003
@@ -45,6 +45,7 @@
            "TEXTURE_GREEN_SIZE",
            "TEXTURE_BLUE_SIZE",
            "TEXTURE_ALPHA_SIZE",
+           "TEXTURE_DEPTH_SIZE",
            "TEXTURE_LUMINANCE_SIZE",
            "TEXTURE_INTENSITY_SIZE",
                        ):




reply via email to

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