gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] libvob/vob/demo fpfil.py


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob/vob/demo fpfil.py
Date: Tue, 29 Apr 2003 08:21:47 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Changes by:     Tuomas J. Lukka <address@hidden>        03/04/29 08:21:47

Modified files:
        vob/demo       : fpfil.py 

Log message:
        Closer to the look

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/fpfil.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: libvob/vob/demo/fpfil.py
diff -u libvob/vob/demo/fpfil.py:1.2 libvob/vob/demo/fpfil.py:1.3
--- libvob/vob/demo/fpfil.py:1.2        Tue Apr 29 07:41:03 2003
+++ libvob/vob/demo/fpfil.py    Tue Apr 29 08:21:47 2003
@@ -57,9 +57,28 @@
     float4 x2 = mul(glstate.matrix.program[1], x);
 
     float4 p = lerp(x1, x2, pos.y);
+
+    float4 pin1 = mul(glstate.matrix.inverse.program[0], p);
+    float4 pin2 = mul(glstate.matrix.inverse.program[1], p);
+
+    pin1 /= pin1.w;
+    pin2 /= pin2.w;
+
+    pin1 -= .5; 
+    pin2 -= .5;
+
+    pin1 = abs(pin1) * 2;
+    pin2 = abs(pin2) * 2;
+
+    pin1 = max(pin1.x, pin1.y);
+    pin2 = max(pin2.x, pin2.y);
+
     opos = mul(glstate.matrix.projection, p);
     ocol.xy = pos.xy; 
     ocol.z = shri;
+
+    ocol.w = min(pin1, pin2);
+
 //    ocol.w = .5;
  //   oc.z = 1;
 }
@@ -73,8 +92,12 @@
        out float4 ocol: COLOR,
        uniform sampler2D t0: TEXUNIT0
 ) {
-    ocol = tex2D(t0, p.xy * float2(4, 1));
-    ocol.w = .5;
+    float3 dark = float3(186, 71, 18) / 255.0;
+    float3 light = float3(249, 233, 50) / 255.0;
+
+    float4 dtex = tex2D(t0, p.xy * float2(4, 1));
+    ocol.xyz = lerp(dark, light, dtex.x);
+    ocol.w = .1 + .8*smoothstep(.5, 1.3, p.w);
 }
 """, "arbfp1")),
 ]
@@ -110,6 +133,7 @@
 
        Enable BLEND
        Disable DEPTH_TEST
+       AlphaFunc GREATER 0
        BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA
 
        BindTexture TEXTURE_2D %s
@@ -123,7 +147,7 @@
                noise.getTexId(),
                    )))
 
-       vs.put(GLRen.createQuad(20,20,1), 
+       vs.put(GLRen.createQuad(40,40,1), 
            vs.orthoCS(0, "C", 0, 100, 500, 20, 20))
 
         putnoc(vs, getDListNocoords("PopAttrib"))




reply via email to

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