[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx libpaper/texcomb_NV1X.py librenderables...
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx libpaper/texcomb_NV1X.py librenderables... |
Date: |
Thu, 05 Sep 2002 08:34:25 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 02/09/05 08:34:25
Modified files:
gfx/libpaper : texcomb_NV1X.py
gfx/librenderables: renderables.py
Log message:
Add transparency to the band-like textures, create a three-way color
interpolation NV1X combiner
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/texcomb_NV1X.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/renderables.py.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
Patches:
Index: gzz/gfx/libpaper/texcomb_NV1X.py
diff -c gzz/gfx/libpaper/texcomb_NV1X.py:1.6
gzz/gfx/libpaper/texcomb_NV1X.py:1.7
*** gzz/gfx/libpaper/texcomb_NV1X.py:1.6 Tue Sep 3 17:15:32 2002
--- gzz/gfx/libpaper/texcomb_NV1X.py Thu Sep 5 08:34:25 2002
***************
*** 83,95 ****
FCI G SPARE0_NV UNSIGNED_INVERT_NV ALPHA
""")
! else:
# Band-like texture.
#
# A little different from what Tjl and Jvk originally
# planned, where the EF product would have been used;
# Sadly, we forgot that E and F are not signed(!).
# Stage 0: multiply the two textures
c = ("""
CI0 RGB A TEXTURE%(t0)s EXPAND_NORMAL_NV RGB
--- 83,101 ----
FCI G SPARE0_NV UNSIGNED_INVERT_NV ALPHA
""")
! elif 1:
# Band-like texture.
#
# A little different from what Tjl and Jvk originally
# planned, where the EF product would have been used;
# Sadly, we forgot that E and F are not signed(!).
+ # Make outside of the bands transparent if trans > 0
+ if trans > 0:
+ finalG = "SPARE1_NV"
+ else:
+ finalG = "ZERO"
+
# Stage 0: multiply the two textures
c = ("""
CI0 RGB A TEXTURE%(t0)s EXPAND_NORMAL_NV RGB
***************
*** 100,106 ****
CI1 RGB B SPARE0_NV SIGNED_IDENTITY_NV RGB
CI1 RGB C TEXTURE%(t0)s EXPAND_NORMAL_NV RGB
CI1 RGB D CONSTANT_COLOR0_NV EXPAND_NORMAL_NV RGB
! CO1 RGB SPARE1_NV SPARE0_NV DISCARD_NV SCALE_BY_FOUR_NV NONE
FALSE TRUE FALSE
FCI E SPARE1_NV UNSIGNED_INVERT_NV RGB
FCI F SPARE0_NV UNSIGNED_IDENTITY_NV RGB
--- 106,112 ----
CI1 RGB B SPARE0_NV SIGNED_IDENTITY_NV RGB
CI1 RGB C TEXTURE%(t0)s EXPAND_NORMAL_NV RGB
CI1 RGB D CONSTANT_COLOR0_NV EXPAND_NORMAL_NV RGB
! CO1 RGB SPARE1_NV SPARE0_NV DISCARD_NV SCALE_BY_TWO_NV NONE
FALSE TRUE FALSE
FCI E SPARE1_NV UNSIGNED_INVERT_NV RGB
FCI F SPARE0_NV UNSIGNED_IDENTITY_NV RGB
***************
*** 110,119 ****
FCI C SECONDARY_COLOR_NV UNSIGNED_IDENTITY_NV RGB
FCI D ZERO UNSIGNED_IDENTITY_NV RGB
! FCI G ZERO UNSIGNED_INVERT_NV ALPHA
""")
! foo = ("""
""")
c = (constantcode + c) % locals()
c = (c.replace("CI0", "CombinerInputNV COMBINER0_NV").
replace("CI1", "CombinerInputNV COMBINER1_NV").
--- 116,150 ----
FCI C SECONDARY_COLOR_NV UNSIGNED_IDENTITY_NV RGB
FCI D ZERO UNSIGNED_IDENTITY_NV RGB
! FCI G %(finalG)s UNSIGNED_INVERT_NV BLUE
""")
! else:
! # Interpolate between three colors:
! # d0 = t0 . r0
! # d1 = r1 . r1
! # lerp(d1, lerp(d0, c0, c1), c2)
! c = ("""
! CI0 RGB A TEXTURE%(t0)s EXPAND_NORMAL_NV RGB
! CI0 RGB B CONSTANT_COLOR0_NV EXPAND_NORMAL_NV RGB
! CI0 RGB C TEXTURE%(t1)s EXPAND_NORMAL_NV RGB
! CI0 RGB D CONSTANT_COLOR1_NV EXPAND_NORMAL_NV RGB
! CO0 RGB SPARE0_NV SPARE1_NV DISCARD_NV NONE NONE TRUE TRUE FALSE
!
! CI1 RGB A PRIMARY_COLOR_NV UNSIGNED_IDENTITY_NV RGB
! CI1 RGB B SPARE0_NV UNSIGNED_IDENTITY_NV RGB
! CI1 RGB C SECONDARY_COLOR_NV UNSIGNED_IDENTITY_NV RGB
! CI1 RGB D SPARE0_NV UNSIGNED_INVERT_NV RGB
! CO1 RGB DISCARD_NV DISCARD_NV PRIMARY_COLOR_NV NONE NONE FALSE
FALSE FALSE
!
! FCI A SPARE1_NV UNSIGNED_IDENTITY_NV RGB
! FCI B PRIMARY_COLOR_NV UNSIGNED_IDENTITY_NV RGB
! FCI C FOG UNSIGNED_IDENTITY_NV RGB
! FCI D ZERO UNSIGNED_IDENTITY_NV RGB
!
! FCI G ZERO UNSIGNED_INVERT_NV ALPHA
""")
+
+
c = (constantcode + c) % locals()
c = (c.replace("CI0", "CombinerInputNV COMBINER0_NV").
replace("CI1", "CombinerInputNV COMBINER1_NV").
Index: gzz/gfx/librenderables/renderables.py
diff -c gzz/gfx/librenderables/renderables.py:1.17
gzz/gfx/librenderables/renderables.py:1.18
*** gzz/gfx/librenderables/renderables.py:1.17 Wed Sep 4 09:07:52 2002
--- gzz/gfx/librenderables/renderables.py Thu Sep 5 08:34:25 2002
***************
*** 397,403 ****
for(Paper::Paper::iterator it = paper->begin(); it != paper->end();
++it) {
! cout << "Pass\n";
(*it).setUp(&lightParam);
GLERR
--- 397,403 ----
for(Paper::Paper::iterator it = paper->begin(); it != paper->end();
++it) {
! if (dbg) cout << "Pass\n";
(*it).setUp(&lightParam);
GLERR
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/gfx libpaper/texcomb_NV1X.py librenderables...,
Janne V. Kujala <=