I've been posting about this
on the GameDev.new forums (details in that link), but seeing Horde made it so easy to prototype this effect I've got to thank you here
Just quickly (in case you don't want to read that link
), this technique involves drawing a grid of quads over the screen. The grid data is static - it's updated by fetching data from a texture in the vertex shader.
Unfortunately my prototype is utterly CPU bound, because I implemented my screen-space quads really quickly with the overlay system:
Code:
for( int y=0; y<appHeight; y+=16 )
{
for( int x=0; x<appWidth; x+=16 )
{
float left, top, bottom, right;
top = bottom = (y+8)/(float)appHeight;
left = right = (x+8)/(float)appWidth;
h3dShowOverlay( left, top, 0, 1, left, bottom, 0, 0, right, bottom, 1, 0, right, top, 1, 1,
1, 1, 1, 1, _bokehMatRes, (x*3+y*2)%5 );
}
}
h3dRender( _cam );
h3dFinalizeFrame();
h3dClearOverlays();
I'm guessing that my best bet will be to procedurally create a H3DG file and mesh/model nodes that contain this vertex data? I can then just place them in my scene as usual, but with a special class name on the material, so the pipeline can render them in the right stage.
Does that sound like the best solution?
Thanks again for the flexible renderer - this prototype would have taken me much longer on some other engines!