[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/libpaper texcomb_NV1X.py
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx/libpaper texcomb_NV1X.py |
Date: |
Thu, 10 Oct 2002 11:07:14 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 02/10/10 11:07:14
Modified files:
gfx/libpaper : texcomb_NV1X.py
Log message:
Fix bandlike texture, the texture product scale constant was too small
and we didn't get any recognizable bands; now it is random with mean 2
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/texcomb_NV1X.py.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
Patches:
Index: gzz/gfx/libpaper/texcomb_NV1X.py
diff -c gzz/gfx/libpaper/texcomb_NV1X.py:1.19
gzz/gfx/libpaper/texcomb_NV1X.py:1.20
*** gzz/gfx/libpaper/texcomb_NV1X.py:1.19 Thu Oct 10 10:35:26 2002
--- gzz/gfx/libpaper/texcomb_NV1X.py Thu Oct 10 11:07:14 2002
***************
*** 52,66 ****
type = rnd.nextInt(3)
# types: 0=BAND-LIKE, 1=3-COL-LERP, 2=FRACTION-LINE
!
# Random scaling of (dot) products
if trans > 0:
# Try to keep the textures non-fuzzy
! rndscale1 = exp(.3*abs(rnd.nextGaussian()))
else:
! rndscale1 = exp(.5*rnd.nextGaussian())
!
! rndscale2 = exp(.3*abs(rnd.nextGaussian()))
def avg(*args):
sum = 0
--- 52,64 ----
type = rnd.nextInt(3)
# types: 0=BAND-LIKE, 1=3-COL-LERP, 2=FRACTION-LINE
!
# Random scaling of (dot) products
if trans > 0:
# Try to keep the textures non-fuzzy
! rndscale = exp(.3*abs(rnd.nextGaussian()))
else:
! rndscale = exp(.5*rnd.nextGaussian())
def avg(*args):
sum = 0
***************
*** 69,75 ****
# Then, select the combiner path type.
if type == 0:
! scale = nvcode.combinerscale(avg(*texscales) * 8.0 * rndscale1)
# Band-like texture.
#
--- 67,74 ----
# Then, select the combiner path type.
if type == 0:
! scale = nvcode.combinerscale(avg(*texscales) * 8.0 * rndscale)
! bandscale = nvcode.combinerscale(2.0 * exp(.5 *
rnd.nextGaussian()))
# Band-like texture.
#
***************
*** 89,98 ****
# SPARE0 <- (TEX0 . TEX1)
CI0 RGB A TEXTURE%(t0)s EXPAND_NORMAL_NV RGB
CI0 RGB B TEXTURE%(t1)s EXPAND_NORMAL_NV RGB
! CO0 RGB SPARE0_NV DISCARD_NV DISCARD_NV NONE NONE TRUE FALSE
FALSE
! # SPARE1 <- SPARE0 * SPARE0 * 2
! # SPARE0 <- (TEX0 . CONST0) * 2
CI1 RGB A SPARE0_NV SIGNED_IDENTITY_NV RGB
CI1 RGB B SPARE0_NV SIGNED_IDENTITY_NV RGB
CI1 RGB C TEXTURE%(t0)s EXPAND_NORMAL_NV RGB
--- 88,97 ----
# SPARE0 <- (TEX0 . TEX1)
CI0 RGB A TEXTURE%(t0)s EXPAND_NORMAL_NV RGB
CI0 RGB B TEXTURE%(t1)s EXPAND_NORMAL_NV RGB
! CO0 RGB SPARE0_NV DISCARD_NV DISCARD_NV %(bandscale)s NONE TRUE
FALSE FALSE
! # SPARE1 <- SPARE0 * SPARE0
! # SPARE0 <- (TEX0 . CONST0)
CI1 RGB A SPARE0_NV SIGNED_IDENTITY_NV RGB
CI1 RGB B SPARE0_NV SIGNED_IDENTITY_NV RGB
CI1 RGB C TEXTURE%(t0)s EXPAND_NORMAL_NV RGB
***************
*** 112,119 ****
FCI G %(finalG)s UNSIGNED_INVERT_NV BLUE
""")
elif type == 1:
! scale = nvcode.combinerscale(avg(*texscales) * 8.0 * rndscale1)
! alphascale = nvcode.combinerscale(1.0)
# Interpolate between three colors:
# d0 = t0 . r0
--- 111,118 ----
FCI G %(finalG)s UNSIGNED_INVERT_NV BLUE
""")
elif type == 1:
! scale = nvcode.combinerscale(avg(*texscales) * 8.0 * rndscale)
! alphascale = nvcode.combinerscale(exp(.3 *
abs(rnd.nextGaussian())))
# Interpolate between three colors:
# d0 = t0 . r0
***************
*** 160,166 ****
FCI G %(finalG)s ALPHA
""")
else:
! scale = nvcode.combinerscale(avg(*texscales) * 4.0 * rndscale1)
# Interpolate on the fraction line c0,c1,c2:
# d0 = t0 . t1
--- 159,165 ----
FCI G %(finalG)s ALPHA
""")
else:
! scale = nvcode.combinerscale(avg(*texscales) * 4.0 * rndscale)
# Interpolate on the fraction line c0,c1,c2:
# d0 = t0 . t1