5 ms·
Question aside... Does anyone know if it is still possible to do 100% software rendering on today's hardware? I'm really interested in doing graphics but direct
by liendolucas 6y ago
Question aside... Does anyone know if it is still possible to do 100% software rendering on today's hardware? I'm really interested in doing graphics but directly talking to the video card (e.g: draw a point, line, polygon, etc) in BSD or Linux and get something like the original Quake and Quake 2 software renderers did. I think those are masterpieces that pushed to the limit the capabilities of the PC at the time. I also think it could be a great way to learn graphics from scratch. Some time ago I played: https://jonathanwhiting.com/games/knossu/ https://jonathanwhiting.com/games/knossu/ which captures the way Quake engines used to render on DOS.
- GiorgioG 6y agoAs long as you have access to a 2D API, of course: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API https://news.ycombinator.com/item?id=14778497 https://news.ycombinator.com/item?id=14778497
- liendolucas 6y agoSure, but that depends on a browser (something that I really dislike). I was thinking more about building something completely from scratch (near zero dependencies) and low footprint (maybe a tiny 3D C engine).
- GiorgioG 6y agohttps://github.com/ssloy/tinyraycaster https://github.com/ssloy/tinyraycaster
- pjmlp 6y agoGet yourself a PI and have fun coding like I and others used to do. in Assembly no less. :) https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/ https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/ And if you happen to be motivated enough, maybe you end up doing something like this, https://www.raspberrypi.org/blog/pifox-bare-metal-arm-assembly-language-star-fox/ https://www.raspberrypi.org/blog/pifox-bare-metal-arm-assemb...
- speps 6y agoLook into Larabee's architecture: https://tomforsyth1000.github.io/larrabee/larrabee.html https://tomforsyth1000.github.io/larrabee/larrabee.html It's another one involving Michael Abrash and it has inspired many research papers. For example, Intel developed a CPU rasterizer to handle occlusion culling and it can be faster than the GPU equivalent as it doesn't need retrieve data back from GPU to cull the draw calls: https://software.intel.com/content/www/us/en/develop/articles/software-occlusion-culling.html https://software.intel.com/content/www/us/en/develop/article...
- smcl 6y agoDefinitely, as long as you have a way to draw pixels you can write a software renderer. You can even do this on simple hardware like an Arduino: https://blog.mclemon.org/8-bit-graphics-with-arduino-and-ssd1306 https://blog.mclemon.org/8-bit-graphics-with-arduino-and-ssd...
- thristian 6y agoIt's absolutely still possible, but note that screen resolution has increased much faster than CPU speed - if you want software-rendered 320x240 like Quake II, or even 1024x768, you'll probably be OK, but if you want to go to full HD even modern CPUs will struggle, and 4K or higher is right out. A common solution is to make a low-resolution texture (like 800x480), draw onto it with a software renderer, then use hardware rendering to scale it up to full-screen. You can even add filtering like faux scanlines or a convex CRT effect.
- Sharlin 6y agoSure! All you need is a way to display a buffer of pixels on the screen. No other communication with the video card required, it's all CPU until the frame is ready. Incidentally, I have an ongoing hobby project that does just that: a pure software platform-agnostic 3D renderer with zero non-optional dependencies written in Rust. It comes with a few example programs that use SDL2 and ncurses(!) to handle display and events. I'm planning to add a Wasm example at some point as well. The project is heavily work-in-progress, and definitely not yet optimized nearly to Quake levels, but on the other hand the code should be relatively clean and useful for learning purposes. https://github.com/jdahlstrom/retrofire https://github.com/jdahlstrom/retrofire
- Zardoz84 6y agoModern Doom source ports (Zdoom, Zandronum, etc) keeps the capacity of using software rendering and they work on any modern computer.
- leoc 6y agoWith Google's SwiftShader Crysis is somwhat playable at low, low specs on a 64-core EPYC Rome CPU: https://youtu.be/HuLsrr79-Pw?t=705 https://youtu.be/HuLsrr79-Pw?t=705 MS also includes a SW renderer in Win10, apparently for use as a fallback: https://docs.microsoft.com/en-us/windows/win32/direct3darticles/directx-warp https://docs.microsoft.com/en-us/windows/win32/direct3dartic...