Dear list,<div><br></div><div>I was just playing with a old example by Gabor that I modified a bit. This is what I have now;</div><div><br></div><div><div>(clear)</div><div><br></div><div>; create a new pixel primitive with active renderer</div>
<div>(define p (build-pixels 256 256 #t))</div><div><br></div><div>;(with-primitive p (hide 1))</div><div><br></div><div>(define (animate)</div><div>   ; draw a cube in the pixel primitive</div><div>   (with-pixels-renderer p</div>
<div>       (identity)</div><div>       (clear-colour 0)</div><div>       (blur .01)</div><div>       (rotate (vector (* 82 (time))</div><div>                       (* 11 (time))</div><div>                       (* 8 (time))))</div>
<div>       (scale 5)</div><div>       (hint-none)</div><div>        (hint-wire)</div><div>       (draw-cube))</div><div>   ; use the pixel primitive as a texture on a cube</div><div>   (texture (pixels->texture p))</div>
<div>   (translate (vector 2 0.5 0))</div><div>   (hint-unlit)</div><div>   (backfacecull 0)</div><div>   (draw-cube))</div><div><br></div><div>(every-frame (animate))</div></div><div>------------------------</div><div>Now for the questions;</div>
<div><br></div><div>* For some reason hiding p also makes the animation go away. Is that expected behaviour? If at all realistic I'd like to be able to hide p yet still have a animated texture.</div><div><br></div><div>
* Something here is causing transparency of the texture, but not of the pixel primitive. This looks cool but I don't understand where it comes from. For a moment I thought that (colour x) was being translated to (colour (vector x x x x)) where x=0 would lead to transparency, but (colour 1) also gives transparency.</div>
<div><br></div><div>* I also don't understand why it's inconsistent, with some faces being transparent when "looking in", others only "looking out". You'll probably have to rotate the whole thing about a bit to see what I mean.</div>
<div><br></div><div>Yours,</div><div>Kas.</div>