[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/demo irregu3.py
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx/demo irregu3.py |
Date: |
Tue, 05 Nov 2002 09:04:30 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 02/11/05 09:04:29
Modified files:
gfx/demo : irregu3.py
Log message:
Fix bugs in "flood fill" fp
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/irregu3.py.diff?tr1=1.45&tr2=1.46&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/irregu3.py
diff -u gzz/gfx/demo/irregu3.py:1.45 gzz/gfx/demo/irregu3.py:1.46
--- gzz/gfx/demo/irregu3.py:1.45 Tue Nov 5 08:23:40 2002
+++ gzz/gfx/demo/irregu3.py Tue Nov 5 09:04:29 2002
@@ -150,9 +150,9 @@
"""
if profile == "NV_PROG2":
- # "Flood fill" implementation; NOT TESTED
+ # "Flood fill" implementation
- code = """
+ code = """!!FP1.0
# f[TEX0].xyw texture coordinates
# f[TEX2].xy texture HI and LO component weights
# f[TEX2].w displacement (added to the weighted texture value)
@@ -160,7 +160,7 @@
# Read texture
TXP R0, f[TEX0], TEX0, 2D;
- # Weight, add displacement, and use as output color
+ # Weight and add displacement
DP4 R0, R0, f[TEX2];
# R0 <- (R0 >= 1.0)
@@ -170,15 +170,18 @@
DDX R1.x, R0;
DDY R1.y, R0;
DP4 R1, R1.xyxy, R1.xyxy;
-
+
# R2 <- 2 grad(R1) . grad(R1)
DDX R2.x, R1;
- DDY R2.x, R1;
+ DDY R2.y, R1;
DP4 R2, R2.xyxy, R2.xyxy;
- # Use R1 + R2 > 0 as the output color
ADD R1, R1, R2;
- SGE o[COLR], R1, 0.0;
+
+ # Use (R1 > 0) as the output color
+ SGT o[COLR], R1, 0.0;
+
+ END
"""
prog_outer = GL.createProgram(code)
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/11/01
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/11/01
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/11/01
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/11/02
- [Gzz-commits] gzz/gfx/demo irregu3.py,
Janne V. Kujala <=
- [Gzz-commits] gzz/gfx/demo irregu3.py, Janne V. Kujala, 2002/11/05
- [Gzz-commits] gzz/gfx/demo irregu3.py, Tuomas J. Lukka, 2002/11/08