21 |
t.shade(128, 128, 0, 4, "RGBA", "RGBA", |
t.shade(128, 128, 0, 4, "RGBA", "RGBA", |
22 |
"fnoise", ["scale", "0.05", "freq", "4", "df", "4", "bias", "0.5"]) |
"fnoise", ["scale", "0.05", "freq", "4", "df", "4", "bias", "0.5"]) |
23 |
|
|
24 |
|
if 0: |
25 |
|
Stencil.initStencil = getDListNocoords(""" |
26 |
|
PushAttrib ENABLE_BIT STENCIL_BUFFER_BIT COLOR_BUFFER_BIT |
27 |
|
Enable STENCIL_TEST |
28 |
|
StencilFunc EQUAL 0 15 |
29 |
|
StencilOp ZERO ZERO INCR |
30 |
|
StencilMask 1 |
31 |
|
ColorMask 0 0 0 0 |
32 |
|
Disable DEPTH_TEST |
33 |
|
""") |
34 |
|
|
35 |
|
Stencil.initOutside = getDListNocoords(""" |
36 |
|
StencilFunc EQUAL 0 15 |
37 |
|
ColorMask 1 1 1 1 |
38 |
|
StencilMask 0 |
39 |
|
""") |
40 |
|
|
41 |
class IrreguScene: |
class IrreguScene: |
42 |
def key(self, key): |
def key(self, key): |
43 |
pass |
pass |
44 |
def scene(self, vs): |
def scene(self, vs): |
45 |
putnoc(vs, background((0.1,0.4,0.5))) |
putnoc(vs, background((0.1,0.4,0.5))) |
46 |
|
|
47 |
for i in range(0,20): |
for i in range(0,2): |
48 |
|
|
49 |
rs = 10 |
rs = 10 |
50 |
ro = 50 |
ro = 50 |
113 |
Disable REGISTER_COMBINERS_NV |
Disable REGISTER_COMBINERS_NV |
114 |
"""%(t.getTexId())), stencs) |
"""%(t.getTexId())), stencs) |
115 |
|
|
116 |
putnoc(vs, getDListNocoords("Disable DEPTH_TEST\nColor 0 0 0\n"+ |
putnoc(vs, getDListNocoords("Disable DEPTH_TEST\nColor 1 1 1\n")) |
117 |
"Translate -2 0 0\n")) |
|
118 |
simplemask().run() |
class outside(Runnable): |
119 |
putnoc(vs, getDListNocoords("Translate 4 0 0")) |
def run(self): |
120 |
simplemask().run() |
putnoc(vs, getDListNocoords("Color 0 0 0\n"+ |
121 |
putnoc(vs, getDListNocoords("Translate -2 2 0")) |
"Translate -2 0 0\n")) |
122 |
simplemask().run() |
simplemask().run() |
123 |
putnoc(vs, getDListNocoords("Translate 0 -4 0")) |
putnoc(vs, getDListNocoords("Translate 4 0 0")) |
124 |
simplemask().run() |
simplemask().run() |
125 |
putnoc(vs, getDListNocoords("Translate 0 2 0\nColor 1 1 1\n")) |
putnoc(vs, getDListNocoords("Translate -2 2 0")) |
126 |
simplemask().run() |
simplemask().run() |
127 |
|
putnoc(vs, getDListNocoords("Translate 0 -4 0")) |
128 |
|
simplemask().run() |
129 |
|
putnoc(vs, getDListNocoords("Translate 0 2 0\nColor 1 1 1\n")) |
130 |
|
|
131 |
|
Stencil.drawStenciled(vs, simplemask(), None, outside(), None, 0) |
132 |
|
|
133 |
|
vs.dump() |
134 |
|
|
135 |
currentScene = IrreguScene() |
currentScene = IrreguScene() |