gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] libvob/vob/fillet light3d.py


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob/vob/fillet light3d.py
Date: Sun, 29 Jun 2003 04:29:34 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Tuomas J. Lukka <address@hidden>        03/06/29 04:29:34

Modified files:
        vob/fillet     : light3d.py 

Log message:
        abstract

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/fillet/light3d.py.diff?tr1=1.17&tr2=1.18&r1=text&r2=text

Patches:
Index: libvob/vob/fillet/light3d.py
diff -u libvob/vob/fillet/light3d.py:1.17 libvob/vob/fillet/light3d.py:1.18
--- libvob/vob/fillet/light3d.py:1.17   Sun Jun 29 04:26:51 2003
+++ libvob/vob/fillet/light3d.py        Sun Jun 29 04:29:34 2003
@@ -57,6 +57,20 @@
 ]
 
 edgefp = GL.createProgram(cg.compile("""
+float dep(float2 tc, uniform samplerRECT tex0) {
+    float4 dotvec = {
+           1./(256*256)
+           ,
+           1./(256)
+           , 
+           1
+           , 
+           0
+           };
+    float4 d = texRECT(tex0, tc);
+    return dot(d, dotvec);
+}
+
 void main(
     float4 incol: COLOR0,
     float4 qpos : TEXCOORD0,
@@ -71,19 +85,8 @@
     // tc.y += (1-768/1024.0);
     float2 tc = wpos.xy;
 
-    float4 dotvec = {
-           1./(256*256)
-           ,
-           1./(256)
-           , 
-           1
-           , 
-           0
-           };
-
-    float4 d = texRECT(tex0, tc);
+    float de = dep(tc, tex0);
 
-    float de = dot(d, dotvec);
 
 //    float d1 = tex2D(tex0, tc + float2(0,2/1024.0)).x;
 //    float d2 = tex2D(tex0, tc + float2(0,-2/1024.0)).x;
@@ -110,7 +113,6 @@
 
 */
     float4 color;
-    color.xyz = d;
     color.xyz = (de-.00199) * 1000;
     // 10000 *abs(d1-d);
     /*




reply via email to

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