/[gzz]/gzz/gfx/libpaper/texcomb_NV1X.py
ViewVC logotype

Diff of /gzz/gfx/libpaper/texcomb_NV1X.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by jvk, Tue Sep 24 16:11:41 2002 UTC revision 1.14 by jvk, Mon Sep 30 14:04:26 2002 UTC
# Line 47  class TransparentCombinerPass: Line 47  class TransparentCombinerPass:
47          type = rnd.nextInt(3)          type = rnd.nextInt(3)
48          # types: 0=BAND-LIKE, 1=3-COL-LERP, 2=FRACTION-LINE          # types: 0=BAND-LIKE, 1=3-COL-LERP, 2=FRACTION-LINE
49    
50    
51          # Then, select the combiner path type.          # Then, select the combiner path type.
52          if 0:          if 0:
53              # Stage 0: calculate dot products of the textures, and of              # Stage 0: calculate dot products of the textures, and of
# Line 91  class TransparentCombinerPass: Line 92  class TransparentCombinerPass:
92    
93              """)              """)
94          elif type == 0:          elif type == 0:
95                #scale = "SCALE_BY_ONE_HALF_NV"
96                #scale = "NONE"
97                #scale = "SCALE_BY_TWO_NV"
98                scale = "SCALE_BY_FOUR_NV"
99    
100              # Band-like texture.              # Band-like texture.
101              #              #
102              # A little different from what Tjl and Jvk originally              # A little different from what Tjl and Jvk originally
# Line 117  class TransparentCombinerPass: Line 123  class TransparentCombinerPass:
123                  CI1 RGB B SPARE0_NV SIGNED_IDENTITY_NV RGB                  CI1 RGB B SPARE0_NV SIGNED_IDENTITY_NV RGB
124                  CI1 RGB C TEXTURE%(t0)s EXPAND_NORMAL_NV RGB                  CI1 RGB C TEXTURE%(t0)s EXPAND_NORMAL_NV RGB
125                  CI1 RGB D CONSTANT_COLOR0_NV EXPAND_NORMAL_NV RGB                  CI1 RGB D CONSTANT_COLOR0_NV EXPAND_NORMAL_NV RGB
126                  CO1 RGB SPARE1_NV SPARE0_NV DISCARD_NV SCALE_BY_TWO_NV NONE FALSE TRUE FALSE                  CO1 RGB SPARE1_NV SPARE0_NV DISCARD_NV %(scale)s NONE FALSE TRUE FALSE
127    
128                  # EF <- SPARE0 * SPARE1                  # EF <- SPARE0 * SPARE1
129                  FCI E SPARE1_NV UNSIGNED_INVERT_NV RGB                  FCI E SPARE1_NV UNSIGNED_INVERT_NV RGB
# Line 132  class TransparentCombinerPass: Line 138  class TransparentCombinerPass:
138                  FCI G %(finalG)s UNSIGNED_INVERT_NV BLUE                  FCI G %(finalG)s UNSIGNED_INVERT_NV BLUE
139              """)              """)
140          elif type == 1:          elif type == 1:
141                #scale = "SCALE_BY_ONE_HALF_NV"
142                #scale = "NONE"
143                scale = "SCALE_BY_TWO_NV"
144                #scale = "SCALE_BY_FOUR_NV"
145    
146              # Interpolate between three colors:              # Interpolate between three colors:
147              # d0 = t0 . r0              # d0 = t0 . r0
148              # d1 = t1 . r1              # d1 = t1 . r1
# Line 152  class TransparentCombinerPass: Line 163  class TransparentCombinerPass:
163                  CI0 RGB B CONSTANT_COLOR0_NV EXPAND_NORMAL_NV RGB                  CI0 RGB B CONSTANT_COLOR0_NV EXPAND_NORMAL_NV RGB
164                  CI0 RGB C TEXTURE%(t1)s EXPAND_NORMAL_NV RGB                  CI0 RGB C TEXTURE%(t1)s EXPAND_NORMAL_NV RGB
165                  CI0 RGB D CONSTANT_COLOR1_NV EXPAND_NORMAL_NV RGB                  CI0 RGB D CONSTANT_COLOR1_NV EXPAND_NORMAL_NV RGB
166                  CO0 RGB SPARE0_NV SPARE1_NV DISCARD_NV NONE NONE TRUE TRUE FALSE                  CO0 RGB SPARE0_NV SPARE1_NV DISCARD_NV %(scale)s NONE TRUE TRUE FALSE
167    
168                  # PRI_COL <- lerp(SPARE0, PRI_COL, SEC_COL)                  # PRI_COL <- lerp(SPARE0, PRI_COL, SEC_COL)
169                  CI1 RGB A PRIMARY_COLOR_NV UNSIGNED_IDENTITY_NV RGB                  CI1 RGB A PRIMARY_COLOR_NV UNSIGNED_IDENTITY_NV RGB
# Line 177  class TransparentCombinerPass: Line 188  class TransparentCombinerPass:
188                  FCI G %(finalG)s ALPHA                  FCI G %(finalG)s ALPHA
189              """)              """)
190          else:          else:
191                #scale = "SCALE_BY_ONE_HALF_NV"
192                scale = "NONE"
193                #scale = "SCALE_BY_TWO_NV"
194                #scale = "SCALE_BY_FOUR_NV"
195    
196              # Interpolate on the fraction line c0,c1,c2:              # Interpolate on the fraction line c0,c1,c2:
197              # d0 = t0 . t1              # d0 = t0 . t1
198              # c(d0) =              # c(d0) =
# Line 201  class TransparentCombinerPass: Line 217  class TransparentCombinerPass:
217                  CI0 RGB B TEXTURE%(t1)s EXPAND_NORMAL_NV RGB                  CI0 RGB B TEXTURE%(t1)s EXPAND_NORMAL_NV RGB
218                  CI0 RGB C TEXTURE%(t0)s EXPAND_NEGATE_NV RGB                  CI0 RGB C TEXTURE%(t0)s EXPAND_NEGATE_NV RGB
219                  CI0 RGB D TEXTURE%(t1)s EXPAND_NORMAL_NV RGB                  CI0 RGB D TEXTURE%(t1)s EXPAND_NORMAL_NV RGB
220                  CO0 RGB SPARE0_NV SPARE1_NV DISCARD_NV SCALE_BY_ONE_HALF_NV NONE TRUE TRUE FALSE                  CO0 RGB SPARE0_NV SPARE1_NV DISCARD_NV %(scale)s NONE TRUE TRUE FALSE
221    
222                  # PRI_COL <- lerp(SPARE1, SEC_COL, PRI_COL)                  # PRI_COL <- lerp(SPARE1, SEC_COL, PRI_COL)
223                  CI1 RGB A PRIMARY_COLOR_NV UNSIGNED_IDENTITY_NV RGB                  CI1 RGB A PRIMARY_COLOR_NV UNSIGNED_IDENTITY_NV RGB

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26