Uriopass / Egregoria

3D City Builder without a grid
http://douady.paris/blog/
GNU General Public License v3.0
1.52k stars 52 forks source link

Moving sample_sphere to a global const variable in ssao.wgsl #71

Closed sirpalee closed 1 year ago

sirpalee commented 1 year ago

The following change solves SSAO performance problems on M1 for me. With this change, I get stable 120 fps, without roughly around 30 fps on an M1 Max.

xcode's profiler tells me that we spend a lot of time in initializing the sample_sphere value in the SSAO kernel. Maybe it is reserving registers for it, so that destroys occupancy? Just a guess.

Screenshot 2022-11-26 at 9 08 34 pm
Uriopass commented 1 year ago

Thanks !