libretro-samples - OpenGL 4.3 compute shaders

Channel:
Subscribers:
32,700
Published on ● Video Link: https://www.youtube.com/watch?v=MMfvR252RR4



Duration: 1:38
1,198 views
18


One of the samples from libretro-samples - an OpenGL 4.3 + compute shader tech demo.

Link - https://github.com/libretro/libretro-samples/tree/master/graphics/opengl/gl43_compute_shaders

OpenGL 4.3 compute shaders on Linux with an nVidia GTX760.

Compute shader does frustum culling (per block), LOD sorting and quasi-physics.

The number of blocks here is 96 * 96 * 96 = ~850k
FPS for 720p with 4xMSAA is ~400-500.

The nearest LOD is drawn with a "complex" mesh (blender monkey because I'm lazy).
The LOD after that is a cube. The last one is point sprites which try to approximate the cubes.

glDrawElementsIndirect and glDrawArraysIndirect are used to draw geometry, so no query is done from CPU side on how many instances to draw. The number-of-instances counter is updated using atomic counters from the compute shader.







Tags:
libretro-samples
Libretro
OpenGL
OpenGL 4.3
Compute shaders
Instancing