[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx demo/paperbasis.py libpaper/textures.py...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz/gfx demo/paperbasis.py libpaper/textures.py... |
Date: |
Tue, 26 Nov 2002 06:58:41 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/11/26 06:58:39
Modified files:
gfx/demo : paperbasis.py
gfx/libpaper : textures.py
gfx/libtexture : geometric.texture
Log message:
Better...
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/paperbasis.py.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/textures.py.diff?tr1=1.39&tr2=1.40&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libtexture/geometric.texture.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/paperbasis.py
diff -u gzz/gfx/demo/paperbasis.py:1.25 gzz/gfx/demo/paperbasis.py:1.26
--- gzz/gfx/demo/paperbasis.py:1.25 Tue Nov 26 06:35:20 2002
+++ gzz/gfx/demo/paperbasis.py Tue Nov 26 06:58:39 2002
@@ -10,7 +10,7 @@
execfile("gfx/libcolor/spaces.py")
import gfx.libpaper.textures
-gfx.libpaper.textures.init(3, "RGB")
+gfx.libpaper.textures.init(4, "RGBA")
# execfile("gfx/libpaper/textures.py")
execfile("gfx/libpaper/texcoords.py")
execfile("gfx/libpaper/colors.py")
@@ -81,9 +81,9 @@
alpha = 1
"""),
"SHAPEX_2" : nvcode.parseCombiner("""
- SPARE0 = ((2*TEX0-1) * (2*TEX1-1)) * 4
+ SPARE0 = ((TEX0) * (2*TEX1-1)) * 4
- SPARE0 = ((+SPARE0).(2*CONST0-1)) * 1
+ SPARE0 = ((SPARE0).(CONST0)) * 1
color = SPARE0
alpha = 1
@@ -100,6 +100,17 @@
color = SPARE0 * COL0 + (1-SPARE0) * COL1 + EF
alpha = 1
"""),
+ "SHAPEX_3B" : nvcode.parseCombiner("""
+ SPARE0 = ((2*TEX0-1) * (2*TEX1-1)) * 1
+ SPARE1 = COL0 * TEX0.a
+
+ SPARE0 = ((+SPARE0).(2*CONST0-1)) * 1
+ COL0 = FOG * (1-TEX0.a)
+
+ EF = SPARE0 * SPARE1
+ color = SPARE0 * COL0 + (1-SPARE0) * COL1 + EF
+ alpha = 1
+ """),
}
@@ -229,7 +240,7 @@
def place(self, vs, into, t1, c, t2):
pq = getpaper(self.vecs, self.cols,
- "pyramid", "triangle",
+ "pyramid", "turb",
t1, c, t2)
@@ -342,8 +353,12 @@
"RGB0", "SHAPEX_2", "RGB1")
self.pt.place(vs,
- vs.orthoCS(0, "S9", 0, 700, 350, 400, 400),
+ vs.orthoCS(0, "S9", 0, 700, 200, 400, 400),
"RGB0", "SHAPEX_3", "RGB1")
+
+ self.pt.place(vs,
+ vs.orthoCS(0, "S9S", 0, 700, 450, 400, 400),
+ "RGB0", "SHAPEX_3B", "RGB1")
print texcodes["SHAPEX_3"]
Index: gzz/gfx/libpaper/textures.py
diff -u gzz/gfx/libpaper/textures.py:1.39 gzz/gfx/libpaper/textures.py:1.40
--- gzz/gfx/libpaper/textures.py:1.39 Tue Nov 26 05:28:49 2002
+++ gzz/gfx/libpaper/textures.py Tue Nov 26 06:58:39 2002
@@ -14,8 +14,8 @@
import java
from math import exp
-texture_format = "RGB"
-texture_components = 3
+texture_format = "RGBA"
+texture_components = 4
isNV2X = 0
Index: gzz/gfx/libtexture/geometric.texture
diff -u gzz/gfx/libtexture/geometric.texture:1.6
gzz/gfx/libtexture/geometric.texture:1.7
--- gzz/gfx/libtexture/geometric.texture:1.6 Thu Oct 17 09:03:29 2002
+++ gzz/gfx/libtexture/geometric.texture Tue Nov 26 06:58:39 2002
@@ -116,6 +116,7 @@
if (components >= 2) data[ind++] = stripe(y);
if (components >= 3) data[ind++] = stripe(1 - xstep - x);
if (components >= 4) data[ind++] = stripe(1 - ystep - y);
+ break;
case 7:
if (components >= 1) data[ind++] = rand() / (RAND_MAX + 1.0);
if (components >= 2) data[ind++] = rand() / (RAND_MAX + 1.0);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/gfx demo/paperbasis.py libpaper/textures.py...,
Tuomas J. Lukka <=