r/GraphicsProgramming • • Jul 11 '26

Source Code I made a fully software rasterized voxel engine inspired by Minecraft

Thumbnail
gallery
161 Upvotes

Hello everyone!

Over the course of this year, I built a fully software-rasterized voxel engine heavily inspired by Minecraft.

This was a very interesting project for me because I had to build almost everything from the ground up, while also adapting to the very different constraints of doing computer graphics on a CPU rather than a GPU.

In short, CPUs are far less powerful than GPUs for this kind of workload, but they are also much more flexible. This makes it possible to implement some fairly unconventional optimizations to compensate for the performance gap.

You can try the project here:

https://github.com/Algorithmonaut/software-rasterized-voxel-engine

There are still a few minor bugs.

My main regret is that I did not spend enough time properly benchmarking the different optimizations I tried, or documenting my findings and the knowledge I gained along the way.

The lack of documentation is particularly unfortunate because most textbooks focus heavily on the GPU pipeline and therefore skip many of the fundamentals involved in writing a software rasterizer: barycentric coordinates, edge equations, perspective-correct interpolation, tile-based rasterization, efficient SIMD usage, parallelization, and much more.

I found only two good general sources of information:

  • Scratchapixel, which I found useful but often not detailed enough.

  • Fabian Giesen’s Optimizing Software Occlusion Culling series, which contains excellent practical information but does not cover every topic and generally does not include mathematical proofs.

There are also a few features I may implement later:

  • Lighting.

  • A small OS that interfaces directly with UEFI to provide framebuffer access and input handling, allowing the engine to run without Linux or SDL and become truly bare-metal.

I am making this post mainly to ask whether anyone has:

  • Recommendations for scientific papers, articles, or books that I might find useful.

  • Suggestions for computer graphics projects to work on after this one.

  • Ideas for fun or unusual features that could make the project more original.

Feasibility does matter: for example, a CPU-based post-processing CRT effect would probably destroy performance.

And, of course, if you find the project interesting, a star on GitHub would be greatly appreciated.

Thanks for reading. I hope this inspires someone to experiment with software rendering as well!


r/GraphicsProgramming • • Dec 08 '24

My new volumetric clouds for my Minecraft shader

161 Upvotes

Basically raymarched clouds with a multiscattering approximation from Oz


r/GraphicsProgramming • • Sep 07 '23

Is graphics just one big illusion?

161 Upvotes

Working on learning OpenGL and finally got past the hump of understanding how to draw a triangle (somewhat), and I used that knowledge to draw a cube, and it was kind of cool, because my brain KNOWS that it’s really just 6 triangles of slightly different shades of white, but my eyes can’t help but see a 3D cube.

It’s a big old sham. There ARE no cubes. Everything is a triangle.

Do I understand graphics now?


r/GraphicsProgramming • • Oct 15 '25

Choose your first triangle.

Post image
160 Upvotes

Just updating my lectures for the new year. Have decided to allow any graphics api that works on our Linux lab machines. Just got python first triangles for OpenGL core profile. WebGPU and Vulkan.

Think I’m going to recommend either OpenGL for ease or WebGPU for more modern. I find Vulkan hard work.


r/GraphicsProgramming • • Dec 07 '23

spinners and loaders set for ImGui, no textures, only math (https://github.com/dalerank/imspinner)

160 Upvotes

r/GraphicsProgramming • • Dec 23 '20

Efficient CPU rasterizer. I decided to improve my C++ skills by implementing a rasterizer which uses AVX2 8 pixels. Together with other optimization methods (tiled rendering, lock-free threading) I got this results. Maybe some of you would like to join project and explore more? Link in the comment.

160 Upvotes

r/GraphicsProgramming • • Oct 24 '26

LSGI: lightweight Screen-Space Ray Marched Global Illumination

Thumbnail
gallery
159 Upvotes
  • Costs ~3.5ms (optical flow for reprojection + SSGI) @4K on my modest 4070 Ti.

  • 1SPP (+infinite bounces) cosine-weighted hemi monte-carlo ray marching in SS.

  • Denoiser does a pretty good job of cleaning it up. Result is very very decent for the cost..

  • Keeps lighting details sharp, final result is noise-free, no grain, boil, flicker or speckle.

https://github.com/umar-afzaal/LumeniteFX/


r/GraphicsProgramming • • Aug 03 '26

My first graphics project in DirectX 11 based on Acerola's "How Games Fake Water" Youtube video.

159 Upvotes

This was my first ever dive into using a graphics API and I used Acerola's video on rendering water in video games as a jumping on point to begin learning DirectX 11.

Link to Original Video: https://youtu.be/PH9q0HNBjT4?si=pKOS0SeqhLnw1mhc


r/GraphicsProgramming • • Jun 23 '26

TinyBVH 1.7.2

159 Upvotes

TinyBVH is once again making rapid progress!

For those new to it: TinyBVH is a free, state-of-the-art library for building BVHs, which lets you trace rays efficiently against millions of triangles. TinyBVH builds a BVH in milliseconds, and traces it with state-of-the-art performance on CPU or GPU. The 'library' is super easy to use: It's a single header file, cross-platform, and without any dependencies. There's also tons of examples, and a manual.

Recent developments:

  • You could already (optionally) 'bring your own vector math library', but now you can also bring your own threadpool. Totally optional; TinyBVH works out-of-the-box with its own job system.

  • Pre-splitting: A high-quality BVH can now be obtained faster by using 'pre-splitting' combined with the full-sweep SAH builder. About 30ms for Crytek Sponza.

  • The gold standard for BVH quality, SBVH, is now much faster: About 60ms for Crytek Sponza.

  • Peak CPU build performance is achieved with the AVX builder: ~8ms for Crytek Sponza for a good SAH-based BVH.

  • TinyBVH gets used! See README for a list of 'customers'.

TinyBVH also happily builds a BVH for GPU (including a TLAS), and examples for GPU ray tracing are included. These do not depend on ray tracing hardware, and still achieve billions of rays per second.

Link to the Github repo: https://github.com/jbikker/tinybvh

Related: my articles on BVH construction: https://jacco.ompf2.com/2022/04/13/how-to-build-a-bvh-part-1-basics/

If you are already using TinyBVH in a project: Let me know! I will be happy to link back to you from the README, and of course feedback is greatly appreciated.


r/GraphicsProgramming • • Apr 11 '26

Video Started a path-tracing project in Metal4. Very simple stuffs for now.

159 Upvotes

r/GraphicsProgramming • • Dec 30 '25

Wrote a deep dive on GPU cache hierarchy - how memory access patterns affect shader performance

159 Upvotes

Covers L1/L2/VRAM latency, cache lines, spatial locality, mipmaps as cache optimization, dependent reads, and latency hiding. Includes interactive demos.

https://charlesgrassi.dev/blog/gpu-cache-hierarchy/


r/GraphicsProgramming • • Nov 10 '25

Voxel Global illumination in my vulkan renderer

Thumbnail
gallery
159 Upvotes

Currently a work in progress, but here are some screenshots showing of diffuse, soft shadows, specular and vxao in that order.
Link to my engine: https://github.com/Silver-will/Black_Key


r/GraphicsProgramming • • Apr 23 '25

accidentaly made a portal do my pc's memory

159 Upvotes

i was playing with voxel space rendering again but this time in C, and i forgot to do proper map wraping ans well... (the funniest part is that you can see the height or color changing indicating that stuff is happening lol)

tbh ive never tought i would see such a amazing looking bug


r/GraphicsProgramming • • May 03 '20

Camera obscura in Minecraft RTX - A natural image projector phenomenon

159 Upvotes

r/GraphicsProgramming • • Aug 18 '26

Render engine written entirely using DirectX 12, focusing on high details and real-time GI lumen like, for mid-lower PC/Laptop. (Demo running on Xe Graphics 11th GPU)

158 Upvotes

Implemented simple GLB parser from this Github repo: salvatorespoto/gLTFViewer: A glTF file viewer in Directx 12 .

Global Illumination using hybrid Surfel GI and SSGI.
Lens flare are modeled after Panavision styled lens flare (Anamorphic types with distinct hue ray light propagation inside lens it's flare), and grass are inspired from this IcterusGames/SimpleGrassTextured: Plugin to make grass on Godot 4.

My main point of the game is about GI and Nanite-like culling on low end devices, and yet i barely see ones, so i decided to implement it without using any modern techniques such as Primitive Shader or Mesh Shader. Pure Compute Shader dispatch, with many fused Shader optimizations instead of separate pass, simple workgroup tiling optimizations. It tooks me almost 3 months for this project just for the optimization workaround with the help of Codex (Claude sucks at this lol). I'm also planning to open source this if this thing is stable enough, modular, and scalable.

All of that combined to make this engine runs 40-60 FPS on my Xe 11th gen Graphics laptop, because why not.. (i don't have better GPU than this for now lol). This might be also potentially be a complete game engine after all.


r/GraphicsProgramming • • Aug 15 '25

We added a big new feature to Shader Learning: Custom Shader Tasks are now live!

158 Upvotes

Our interactive platform Shader Learning for learning computer graphics now allows users to create and share custom tasks for free (here). Each task lets you build an graphics scene with full control over its components:

🎥 Scene Setup

  • Configure the camera and its animation

  • Add objects to the scene and define their geometry

  • Upload textures and assign them to material

🧱 Shader Editing

  • Write and edit both vertex and fragment shaders

  • Add a post-processing shader for screen effects

📚 Task Content

  • Write a description for your task

  • Add supporting theory or background information

✅ Validation Settings

  • Choose which files the user can edit

  • Set the number of frames and frame intervals

  • Define linting rules to guide correct solutions

🚀 Publishing & Sharing Once your task is created and published, it becomes instantly available. You can share the link with others right away.

📊 Task Statistics For each task you publish, you can track:

  • Number of views

  • Number of successful solutions

  • Likes and dislikes

  • Written feedback from users

✏️ Task Management At any time, you can:

  • Edit your task

  • Hide it from public view

  • Republish it when ready

This is the first version of the task creation system. Both the functionality and the UI will be refined and expanded over time. If you have suggestions or need specific features or data to build your tasks, feel free to reach out. I'm always open to improving the platform to better support your ideas. I'm excited to see the tasks you create!


r/GraphicsProgramming • • Aug 16 '25

Learn particle manipulation in shaders with interactive challenges

157 Upvotes

We’ve been working on a set of 7 shader challenges focused on particles — starting from point-cloud based particles up to textured quads. The idea is to learn by manipulating them directly in GLSL, with real-time feedback.

You can try challenges like:

  • moving particles with various formulas

  • adding textures and color variations

  • simulating simple gravity

All challenges run in the browser — you write GLSL code in a live editor and see the result instantly.

If you’re curious, go here to see the challenges: 👉 shaderacademy.com

You'll find exercises for particles and many other graphics fields !

Would love feedback or ideas !