MovingBlocks/Terasology — Issue #126: Geometry Shader based Rendering
Author: KaiKratz
Created: 2012-02-22 16:01:39+00:00
State: open

By Beglas request ill leave this here:
In order to reduce the memory footprint (esp. on the GPU) we might utilize geometry shaders to render cubes from points.

NOTE: I have no idea about the performance implications. I would like to test it but i currently have no suitable machine available

Idea:
- Find all surface blocks and send centerpoint + texid to the gpu.
- Determine the3 (max) visible surfaces. this will be at max one per primary plane (xy, xz, yz) can be done with 3x dot product
- user geometry shader to expand point to 2-6(1-3 planes) triangles textured according to tex id and identified plane

While this approach might increase the burden on the shading units, it might significantly reduce the amount of data to send to the gpu. Worst Case improvement (for geom data) is 75% reduction (4 vertices -> 1 vertex) Best Case reduction is 85% ( 7 vertices -> 1 vertex)