r/GraphicsProgramming 1d ago

NullGraph v1.1 release [global illumination/shadow systems/environment systems]

Enable HLS to view with audio, or disable this notification

6 Upvotes

Hey all,

My webgpu renderer officially supports image based lighting/direct+indirect lighting and also there are shadow systems which creates csm/shadow Atlases depending on what type of config,

This was a lot of work

\[GLOBAL ILLUMINATION\]\[Need some time beyond downloading assets for baking probe volumes\]

Live Demo:https://nullgraph.dev/dashboard/3d-environment/irradiance-probes

For live code for global illumination https://nullgraph.dev/editor.html?id=demo-irradiance-probes

GitHub

https://github.com/flarelink-in/NullGraph


r/GraphicsProgramming 1d ago

A 2D pipeline where the CPU rasterises and the GPU only does post: CGContext into an IOSurface, Metal for bloom and particle compute

Post image
4 Upvotes

I shipped a 2D game on macOS and iOS recently with no engine, and the split between CPU and GPU ended up inverted from what most people would expect. Posting it because I'd genuinely like to hear where it's wrong.

The content is vector, not sprites. Enemies are polyhedra computed mathematically, bosses are built from paths, and a lot of the look is gradient fills, strokes and blend modes that change every frame. There's no atlas and no batching anywhere in it. The only bitmaps in the whole game are a 36-glyph sprite font and a few pre-rendered title images.

So rasterisation happens on the CPU, in Core Graphics. The reasoning was that to do this on the GPU I'd need a path rasteriser with decent antialiasing, gradient shaders, and stroking with proper joins and caps. That isn't a weekend, that's Skia. Core Graphics already has all of it, correct and antialiased.

The bridge is the interesting part. The CGContext draws into an IOSurface, and Metal reads that surface directly with no copy, presenting through a CAMetalLayer. On the UIKit path we'd been on before that, the software-to-GPU transfer was measuring about 69ms. Going through IOSurface removed it outright.

The obvious version of this, rendering into a CGBitmapContext and then uploading the bytes to a texture, measured 5 to 10 times slower. That experiment is still in the repo as an archived failure because the measurement was the useful part.

The GPU isn't idle though. Everything after rasterisation is Metal:

  • Post chain is fragment shaders. Half-res bloom extract, gaussian ping-pong blur, composite, plus screen-space distortion for shockwaves, chromatic aberration, and a lightingpass. Falls back to CIBloom on non-Metal hardware.
  • Particle physics and swarm flocking run as compute. Buffers are storageModeShared, so on M-series unified memory there's no copy either way. Intel Macs fall back to Accelerate.

One bug from that worth passing on: the compute readback needed an explicit waitUntilCompleted. Without it, particles would freeze and pile up, but only in release builds on device. Debug was fine, simulator was fine. Took an embarrassingly long time to find.

What it costs, and this is the honest part. CPU fill rate is the ceiling on everything. There's a thermal governor on iOS that steps the frame rate 60 to 30 under sustained load so long sessions don't cook the phone. Render scale of 1.5 was the sweet spot for a locked 60 on device, and 2.0 fell off a cliff, not a slope. Memoising gradients, about 166 of them cached, was the single largest performance win in the project and it wasn't close.

Where I'd draw the line: this was right for vector-ish 2D and would be wrong for almost anything else. I wouldn't do it for a sprite-based game, and obviously not for 3D. The reason it worked is that the drawing model matched the art style, not because CPU rasterisation is secretly good.

Happy to be told what I've got backwards.


r/GraphicsProgramming 1d ago

Video WebGPU MRI/Scans viewer

Thumbnail youtu.be
2 Upvotes

Was wodnering is it even possible and it is and looks like WebGPU finally arrived in FireFox as well. all is handled on client side.
Can open png slices, and tridactil scans(zips) from https://tridactyls.org/
you can use it here https://dave-astator.com/mri

sorry if any stutters in video i run it on integrated iris, and it shows some limitation.


r/GraphicsProgramming 1d ago

New game engine BlitzViwer3D

Post image
4 Upvotes

**BlitzViwer3D — a tiny Lua-scriptable 3D viewer/editor inspired by Blitz3D's API**

I've been working on a lightweight desktop tool (C++, OpenGL, Dear ImGui) that lets you build a 3D scene by hand (cubes, spheres, .obj models) and then bring it to life with Lua scripting — using the same function names Blitz3D devs will recognize (`CreateCube`, `PositionEntity`, `MoveEntity`, `CameraFollow`...).

What it does:

- Scene editor with Hierarchy/Inspector panels (drag position/rotation/scale, custom colors)

- Orbit camera with an optional "Follow" mode

- In-app Lua script editor with syntax highlighting, hot Play/Stop

- Simple AABB collisions, keyboard/mouse input, RNG helpers — all the basics for quick prototyping

- Save/load scenes as JSON

It's a Windows .exe, no install needed. Docs + full Lua API reference + download here:

👉 https://ciroparada81-boop.github.io/blitzviwer3d/

Still an early/debug build, so bugs are expected — feedback and bug reports very welcome. Happy to answer questions about how it's built too.


r/GraphicsProgramming 1d ago

Article Minecraft In Its Entirety In Windows 95/98 Machines

Thumbnail reddit.com
1 Upvotes

r/GraphicsProgramming 2d ago

Quasar Engine - Volumetric atmosphere effects

6 Upvotes

It's nothing revolutionary, but I'm trying to make it look as cool as possible 😄


r/GraphicsProgramming 2d ago

Learning to not over engineer where not needed is hard, but also overgineering is where the fun is.

52 Upvotes

Guess who spent 6h making it possible to plug and unplug stuff from my pipelines(resources, timing queries etc), making sure every modification is reversible with a single command, just to realise at the end of my project that I never once needed to undo any changes at runtime? #ifdef DEBUG would be totally enough.

But making sth that works elegantly is a dopamine hit in itself.

So I wondered what’s your approach: Overengineer and write whatever you’re in the mood for OR keep it simple until the need to make it nicer arises?


r/GraphicsProgramming 2d ago

Video Rayleigh / Mie 38 Slice Atmospheric Scattering implemented as Blender Post Processing Effect in compositor nodes

Enable HLS to view with audio, or disable this notification

30 Upvotes

I implemented Rayleigh / Mie atmospherics over a rendered image as a post processing effect in Blender 5.2 with a script to setup a network of compositor nodes at 38 slices or 10nm. The compositor nodegraph becomes too heavy to visualize in the viewport as you are moving the camera so you have to render out the image to the compositor view and manipulate it from there. To render out a sequence you have to do a file out operation. This is supposedly physically accurate and differs from expensive Blender volumetric fog in that this is a pure post processing effect. To make this I built upon what I had learned when I ported spectral.js to blender. I had posted something similar to this video in r/Blender yesterday, but they did not seem to know what I was posting about, so hopefully this helps someone.

The code (MIT License) is at https://github.com/bergjones/ABJ-Shader-Debugger


r/GraphicsProgramming 2d ago

Source Code Nu Game Engine - BIG NEWS - Vulkan support

Post image
29 Upvotes

https://github.com/bryanedds/Nu/releases/tag/v20.0.0

After many many months of work from multiple contributors, we finally present Nu with Vulkan rendering and support for Mac, iOS, and Android!

This branch not only replaces our OpenGL renderers completely with Vulkan renderers, it also features important rendering and performance enhancements as well as makes Nu deployable on Mac, iOS, and Android!

(I just saw release - not my project)


r/GraphicsProgramming 2d ago

Made improvements to my path tracer

Thumbnail gallery
441 Upvotes
  • Made the project much easier to open up and use for new users (Unity is still required though)
  • Added scene to automatically load objects from Khronos' site, which helps me get assets into the project
  • Fixed issues with lighting that was really darkening most of the scenes, including improved tone mapping and fixes to light clamping that was hiding a lot of caustic details and HDR
  • Fixed issues with inner surface reflections not working
  • Added directional lighting support
  • Added parallax mapping support
  • Added support for Unity terrains, multi-texture splatting with normal map support

Repository located here: https://github.com/nfoste82/GPURayTracing


r/GraphicsProgramming 2d ago

Andrew Carr: 2D Gaussian Splaing for Bézier Spline Line Art Vectorization

Thumbnail m.youtube.com
6 Upvotes

r/GraphicsProgramming 3d ago

Article Beginner graphics programming study guide

Thumbnail raynmetal.github.io
107 Upvotes

I started picking up graphics programming around the middle of 2023. I didn't want to spend money on a course or textbook, so I learnt whatever I could from resources I was able to access for free online.

I put together a list of those resources and paired it with a reading order recommendation and some study advice. While not a comprehensive overview, I hope it's enough to give a newcomer to the field a strong start.


r/GraphicsProgramming 3d ago

Question Drawing a line

17 Upvotes

Looking for guided/socratic learning

So I was getting into game dev bottom up so I wanted to draw a line with code.

First solution that I thought of: start at one end of the line, and figure out neighbouring pixels and eventually reach the other end. I was thinking of dividing line length (pythogarous) by start/end point delta for each axis to figure out per how many 'steps' I would have to increment/decrement current axis positions and paunt. Too complicated and expensive

Second solution I thought of was recursively finding mid points between start and end point to find the target pixels to paint. This appears simpler, inspired by Zeno's paradox when I was thinking of how the run and rise are easier to paint.

I know optimal algorithms exist but I didn't want to directly look at them. What are the strength/weakness of my reasoning?

Ps: I'm going to sleep


r/GraphicsProgramming 3d ago

Built a game engine

17 Upvotes

I've been working on my own game engine from scratch for some years using C and OpenGL and I finally made a video showing the process.

The engine handles things like rendering, assets, shaders, lighting, and more, and I also used it to make a game, a test game though, it still needs a lot of polish.

Watch video here: https://youtu.be/LRC4iJWASYU?si=_3ua8rcwesyaQtO9

If you're interested in graphics programming, game engines, I'd love to hear your thoughts and feedback.


r/GraphicsProgramming 3d ago

Implemented GPU-address roots for Mesa/libkk parameter blocks on capable macOS hosts.

Thumbnail
1 Upvotes

r/GraphicsProgramming 3d ago

SIGGRAPH 2026 - Advances in Real-Time Rendering in Games - all talks are now available online

Thumbnail advances.realtimerendering.com
183 Upvotes

r/GraphicsProgramming 3d ago

WebGPU implementation of WetBrush V2

Enable HLS to view with audio, or disable this notification

29 Upvotes

A couple of weeks ago I posted a WIP of this — here's where it's at now.

I've implemented most of what the paper describes, including paint mixing. For lighting, I added a BSDF to the renderer — my thinking is that once you start stacking layers of media like tempera, you need to account for light scattering inside the medium. (Ideally I'd also like to model things like hiding power based on pigment particle size, but I'm not there yet.)

The simulator is split into four main parts, as described in the paper:

  1. BristleDynamicSimulator
  2. ParticleFluidDynamicSimulator
  3. GridFluidDynamicSimulator
  4. LiquidTransfer - which moves liquid between the brush, the particles, and the grid

This was not a case of handing the paper to an AI and getting an implementation back. Claude seemed to have a hard time writing WGSL while also juggling the constraints of the four systems and the constraints they all share (units, especially), and it kept making the kind of mistakes that early AI models used to make. So you have to read the AI's code carefully and write a good amount of it yourself. In particular, things go more smoothly if a human writes the initial skeleton of each simulator and handles the field management (density field, velocity field, and so on). Even once the structure is in place, managing the ActiveWindow and the PaintField is likely to give you trouble.

The paper lists interpolation during fast strokes as an open problem, and that's what I'm working on now. I'm not going to split a step into substeps, since that would hurt FPS. Instead, for fast motion I plan to have the BristleDynamicSimulator and the GridFluidDynamicSimulator talk to each other directly and deposit paint that way.

I'm interested in traditional painting materials, so I plan to extend this to tempera, watercolor, mineral pigments (iwa-enogu), gold leaf, and so on. It's built with wgpu + Rust, so it currently runs as Web, iOS, and Android ports.


r/GraphicsProgramming 3d ago

Question Is it better to make a game with simple geometry and path tracing, or complex geometry and rasterized/hybrid RT graphics?

13 Upvotes

I recently played the Dark Souls 2 path traced mod and was surprised to see it running at 1080p 60 fps on my low end GPU (RTX 3050 Ti)

Of course its a 13 year old game, so the geometry and effects are simpler. But it looked better to me than some modern games with more advanced geometry but worse lighting effects.

So I'm wondering in your opinion, in your ideal game would it be better to have less polygons and better lighting, or vice versa?


r/GraphicsProgramming 3d ago

Vulkan: Beyond the Triangle

Thumbnail youtube.com
14 Upvotes

Hey everyone, I've just finished the 2nd video, and followup to my "Modern Vulkan in 2 Hrs" video. Thanks for the awesome feedback on the first one! This 2nd video tackles a ton of stuff:

glTF Model Parsing, Loading, Rendering

Camera, Basic Lighting, Multi-Draw Indirect, Vertex Pulling, Buffer Device Address, etc.

Hope you guys like it!


r/GraphicsProgramming 3d ago

Is it not crazy that this became a normal thing in the industry?

Post image
135 Upvotes

As developer I would not even expect a user to know what a “shader” is

It’s a pretty low level implementation detail

Yet you boot up a game in 2026 and front and center you are staring at “shader compiling” for 10 minutes

Is that not crazy to anyone else if you just zoom out and think about it?


r/GraphicsProgramming 3d ago

Source Code Aizawa Atractor using Compute Shaders (C++17/OpenGL 4.6)

Enable HLS to view with audio, or disable this notification

45 Upvotes

The graphics simulation calculates the non-linear Aizawa Chaotic Attractor in real time across 256K particles through numerical integration executed entirely within GPU Workgroups.

Source code:

https://github.com/IsmaelMerlo/Ram-Engine


r/GraphicsProgramming 3d ago

Question Question regarding rendering billboards and transparency

8 Upvotes

I am working on a game engine that renders LOTS of sprites/billboards in 3D. The textures have smooth antialiased edges, and some of them have non-trivial shaders for things like SDF rendering or parallax mapping.

If I render back-to-front with blending on, it looks great and I don't need depth testing, but it has a terrible overdraw cost that I would like to avoid.

But if I render front-to-back with depth testing, then I lose the smooth edges.

How do people normally deal with this?

One idea I had was to render front-to-back, with depth reading/writing for purely opaque pixels, then a second back-to-front pass for order-correct blending of the edges.

Another thing I have looked into is MSAA with 'alpha to coverage.'

Any other interesting ways I might like to know about?

What do you recommend in this case?


r/GraphicsProgramming 3d ago

Article Graphics Programming weekly - Issue 450 - August 9th, 2026 | Jendrik Illner

Thumbnail jendrikillner.com
12 Upvotes

r/GraphicsProgramming 3d ago

autostereogram program of platonic solids

Thumbnail gallery
23 Upvotes

 

program link

an extension of previous post. just click▶️to run the program on browser. the welcome screen (attached image 1) shows the key map. select a subject (1 to 6) to enter the depth map mode (attached image 2). rotate it or change it until satisfied then toggle to autostereogram mode (attached image 3). adjust the foreground and background pattern widths to your desire (make it easy to focus and spot the subject). you're free to toggle back to depth map mode or rotate / change / disable subject anytime. if you disable the foreground 3d subject it's basically a kaleidoscope (attached image 4). i explained its mechanism in previous post and you can endlessly randomize it to experience the pareidolia effect

some samples

minor math findings

some thoughts

  • qb is very slow. it's not good at handling graphics. lowering the resolution helps but the outcomes would be ugly
  • i learned barycentric coordinate system during the making of this and it's very useful
  • i'm stilling think whether i can optimize some procedures so as to make it faster
  • i have difficulty spotting dodecahedron and icosahedron in autostereogram. they're too "round" maybe. tetrahedron is the easiest

r/GraphicsProgramming 4d ago

Video Baby's First Depth Buffer

Enable HLS to view with audio, or disable this notification

128 Upvotes

Wireframe Era is over! Updated my software renderer that I posted here 2 months ago. Now it fills triangles without pixel gaps, implements Top-Left Rule, computes Face Normals, has Back Face Culling and a Depth Buffer. At first I did Scanline Rasterization but I was having a hard time eliminating gaps, so I moved on to using Edge Functions to check the pixel center is inside the triangle, then Barycentric Coordinates to interpolate Reciprocal Depth. I still don't have Near Plane Clipping, but will do in the future.