VoxelSpaceSDL
VoxelSpaceSDL copied to clipboard
Distorted geometry facing down.
Thanks for this, much better than my implementation from 2008.
One problem with the algorithm is the geometry when facing down. Stretched about 2:1
Have you any ideas how to render downward facing with less distortion?
Cheers igor.
Huh, that's weird... What os, compiler and video driver you use? Also could you try run it with software rendering mode?
You need to add the SDL_RENDERER_SOFTWARE flag to the rflags variable in engine.c:99
Just tested it on Windows 10, latest AMD video driver, SDL 2.0.20 and 2.26.2 (hardware/software acceleration) and I can't reproduce this issue. Honestly, I haven't touched this project for like a year and I have no idea what could cause such artefacts. I would be grateful tho if you track down the issue on your end and send a PR :)
GridMap.zip Thanks for reply. I added the square lines to a map to illustrate the distortion. The map is C5W.bmp expanded to 4096x4096, with gridlines i added. You can also see the stretching in the y-axis by flying over the square temple in the original default map and looking down. This isn't an error in the backend, but I added the SDL_RENDERER_SOFTWARE flag and confirm I have identical results. INFO: Using software software renderer gcc is gcc-9 Anyway the issue is with the algorithm itself and I'd like to get it making un-stretched views. I'll update if I solve.
Oh, I misunderstood you, sorry (haven't slept in quite a while). I thought these lines were graphics artifacts. I tried to fix this distortion long time ago but I couldn't.