[fluxus] hollow spheres + a blur fix

dave dave at pawfal.org
Sat Dec 17 07:22:44 PST 2005


* a commit to fix blurring on non-black clear-colour

also, if you're wanting to use alpha to cut out shapes from a primitive
and see the reverse side, it won't work all the time, due to the order
the triangles are drawn in and alpha compositing.

this is a solution:

(clear)
(texture (load-texture "a-texture-with-alpha-cutouts.png"))
(hint-unlit) 

(push)
(colour (vector 1 0 0)) ; colour the inside red
(scale (vector -0.99 -0.99 -0.99))
(build-sphere 10 10)
(pop)

(colour (vector 0 1 0)) ; colour the outside green
(build-sphere 10 10)

so two spheres, one slightly smaller than the other and scaled inverted
so the normals face the other way. this also means you can use different
textures for the inside - but deformations will have to be applied to
both spheres.

cheers,

dave




More information about the Fluxus mailing list