 ui.gadgets accessors sequences ui.render ui math locals arrays
 generalizations combinators ui.gadgets.worlds
 literals ui.pixel-formats ;
-FROM: opengl.demo-support => rect-vertices ;
 IN: spheres
 
 STRING: plane-vertex-shader

    reflection-framebuffer reflection-depthbuffer
    reflection-texture ;

M: spheres-world near-plane ( gadget -- z )
    drop 1.0 ;
M: spheres-world far-plane ( gadget -- z )
    drop 512.0 ;
M: spheres-world distance-step ( gadget -- dz )
    drop 0.5 ;

: (reflection-dim) ( -- w h )

    } cleave ] with-framebuffer ;

M: spheres-world draw-world*
    {
        [ (draw-reflection-texture) ]
        [ demo-world-set-matrix ]
        [ sphere-scene ]
