Open WayneKeenan opened 7 years ago
There is ~20% frame rate improvement on the Abbey demo when the display_rotate
in config.txt
isn't being used.
Still need to make the downstream OpenGL ES rendering changes thought.
this isn't needed on a Pi4 and as Pi4 is now the minimum supported hardware I'm closing this.
This isn't needed on a Pi4 for PSVR, but rotation is still needed for DK2 (see#14)
Is it possible the rotation slowdown for 90 and 270 is because the frame buffer is stored vertically in RAM but then is read horizontally? Sorry if I didn’t explain clearly
Edit: from the Lodev raycasting page: Raycasting works with vertical stripes, but the screen buffer in memory is laid out with horizontal scanlines. So drawing vertical stripes is bad for memory locality for caching (it is in fact a worst case scenario), and the loss of good caching may hurt the speed more than some of the 3D computations on modern machines. It may be possible to program this with better caching behavior (e.g. processing multiple stripes at once, using a cache-oblivious transpose algorithm, or having a 90 degree rotated raycaster), but for simplicity the rest of this tutorial ignores this caching issue.
It was reported that the HDMI rotation in config.txt has a performance impact. Proposed solution is to instead specify the rotation at the OpenGL ES level. Either in the Pi3D StereoCamera setup, or, if that API doesn't quite work as expected then perform the rotation 'manually' in the barrel and a copy of uv_flat GL ES shaders.