1
General / Re: Why anything after "while (window.pollEvent(Event))" kills framerate ?
« on: April 17, 2024, 01:23:22 am »
I like pixel rendering too, but mine tend to be slower (like raytracing) where even 1fps would be great.
A few possibilities:
- multithreading. My understanding is raycasters are usually pretty independent between columns, so dividing the screen into vertical stripes based on core count could help without too much complexity.
- compute shaders. SFML doesn't have them natively, but they let you write algorithms slightly closer to typical CPU style but with GPU backed performance (they don't have the same restrictions as regular shaders).
A few possibilities:
- multithreading. My understanding is raycasters are usually pretty independent between columns, so dividing the screen into vertical stripes based on core count could help without too much complexity.
- compute shaders. SFML doesn't have them natively, but they let you write algorithms slightly closer to typical CPU style but with GPU backed performance (they don't have the same restrictions as regular shaders).