r/GraphicsProgramming • • Aug 19 '26

Video Wind Tunnel Simulation | Vulkan and C++

186 Upvotes

It’s the first step in my attempt to simulate an F1 car. Right now, the simulation is very low-resolution and quite slow, so there’s still a lot of optimization to do. It’s also my first time working with compute shaders, so there’s plenty to learn and improve along the way.


r/GraphicsProgramming • • Jun 27 '26

Moderation Announcement: I'm Unusually Busy

186 Upvotes

Hey r/GraphicsProgramming,

I was laid off yesterday. But don't worry about that too much, I'll be fine.

I'll still be here, just a bit busy also. Not going anywhere.

I just wanted to give you the heads up that my moderation response times might be a bit slower than usual. I'm busy helping a few hundred of my fellow (former) game developers professionally network and put the pieces of their lives back together. My inattention has impacts on you too.

What can you do to help?
Same thing you always do. Report bad posts, ask OP to add some implementation details to their post, hold each-other to a professionally kind standard.

Also, once I'm done with giant piles of emotions and paperwork, I'll have somewhat copious amounts of free time. I plan to spend some time digging into Unreal Engine, Bevy, learning Services code in Rust, and get back to doing a little graphics too. Seems like a good time to author that graphics programming education roadmap I've been meaning to do for 11 years. :P

Thank you all for keeping this place so nice and calm. It's easy to trust you to handle things for a bit while my attention is drawn away. You all have high professionalism and trustworthiness, and you have my thanks.

Sincere Thanks for Being Awesome,
Cody Duncan


r/GraphicsProgramming • • May 27 '26

Question Why do graphics apis need so many layers of abstractions like buffer, descriptors, bindings etc, instead of just passing a pointer to the shader?

186 Upvotes

If I want to pass data to a shader: I first need to create a buffer, whatever that is, then bind that buffer to a memory location, then create a descriptor for it, but not before I explicitly mention a descriptor layout before creating the pipeline, then finally bind the descriptor to a shader during the render pass.

Why exactly are these things needed in a GPU, when CPUs work just fine with pointers?


r/GraphicsProgramming • • Sep 13 '25

Learn Shader Programming for Free with Shader Academy - New Features, Fresh Challenges, and Easier Ways to Support

186 Upvotes

For those who haven't come across our site yet - https://shaderacademy.com/explore is a free interactive platform for learning shader programming through bite-sized challenges. Over the past weeks, we’ve been working hard, and our latest update is packed with exciting improvements:

👀 3D Challenges now support rotation + zoom (spin them around & zoom in/out)
💎6 New Challenges to test your skills
🔘Filter challenges by topic
✔️ Multiple bug fixes
🐣We’re on X! Added quick buttons in our website so you can follow us easily
🔑Discord login authentication is live

And one more thing, if you’ve been enjoying the project, we added easier ways to support us right on top of our page (Revolut, Google Pay, Apple Pay, cards). Totally optional, but it helps us keep shipping updates fast! 💙

Join our discord to discuss challenges and give feedback: https://discord.com/invite/VPP78kur7C


r/GraphicsProgramming • • Mar 14 '25

Question Fortnite’s New Clouds

Post image
186 Upvotes

Booted up Fortnite for the first time in forever and was greeted with some pretty stellar looking clouds in the skybox.

I know Unreal has been working on VDB support for a little while, but I have a hard time believing they got it to run at 4K 60FPS on my Xbox One X.

Anyone taken a frame capture lately and know how they accomplished this? Is it some sort of fancy alpha card? Or does it plug into their normal volumetric clouds system?


r/GraphicsProgramming • • Aug 14 '24

[Timelapse] Drawing Deadpool procedurally with GLSL, code in the comments

186 Upvotes

r/GraphicsProgramming • • May 08 '24

Made a real-time black hole ray tracer and mesh rendering with rust and wgpu

Post image
186 Upvotes

r/GraphicsProgramming • • 26d ago

We released an UE5 plugin to render Stable 3D Pixel Art (No severe pixel jitter)

185 Upvotes

Hi devs today we wanna share with you our plugin about making 3D pixel art render truly possible.

We started creating this plugin after seeing the trailers of Project Shadowglass as well as the recent 3D pixel art discoveries of Dylan Ebert and Lunar Blank, and after 3 month of work we managed to create an advanced cubemap based pixel art rendering system that focus on rendering 3D Pixel art in First Person View (also third / top down) in a Stable way (No severe flickering due to 3D movement).

You can try it out here (Tech demo): Itch.io tech demo link

and find the plugin & more info here: Plugin page link

Extra explanation about how it works:

We are rendering the game trough a post process that make uses cubemaps to remove the pixel jittering from camera rotation, then for camera translation / movement, we make those cubemaps capture at slow rate like every 0.25 sec, and use the disoclusion technique discovered by Lunar Blank / Dylan Ebert that allow keeping a fluid render even with this slow cubemap capture rate. The whole render is also layered based on distance with a different raymarching method for far / background elements to solve the non pixel art edges issue of the disoclusion technique. We also use custom depth pass with stencil to render dynamic elements as well as a "3D billboard" technique.

(this is a brief explanation, there is a lot more going on)

Music used in video: space cadet by congusbongus


r/GraphicsProgramming • • Jul 16 '25

Magik spectral Pathtracer update

Thumbnail
gallery
185 Upvotes

Aloa !

There have been a lot of improvements since last time around.

Goal

Magik is part of our broader afford to make the most realistic Black Hole visualizer out there, VMEC. Her job is to be the physically accurate beauty rendering engine. Bothering with conventional renders may seem like a waste then, but we do them in order to ensure Magik produces reasonable results. Since it is much easier to confirm our implementation of various algorithms in conventional scenes, as opposed to a Black Hole one.

This reasoning is behind many occult decisions, such as going the spectral route or how Magik handles conventional path tracing.

Magik can render in either Classic or Kerr. In Kerr she solves the equations of motion for a rotating black hole using numerical integration. Subsequently light rays march through the scene in discrete steps as dictated by the integrator, in our case the fabled RKF45 method. Classic does the exact same. I want to give you two examples to illustrate what Magik does under the hood, and then a case study as to why.

Normally the direction a ray moves in is easy to derive using trig. We derive the ray direction from the geodesic equations of motion instead. Each ray is described by a four-velocity vector which is used to solve the equations of motion one step ahead. The result is two geodesic points in Boyer-Lindquist coordinates which we transform into cartesian and span a vector between. The vector represents our ray direction. This means even in renders like the one above, the Kerr equations of motion are solved to derive cartesian quantities.

Intersections are handled with special care too. Each object is assigned a three-velocity vector, describing its motion relative to the black hole, which intern means no object is assumed to be stationary. Whenever a ray intersects an object, we transform the incoming direction and associated normal vector into the objects rest frame before evaluating local effects like scattering.

The long and short of it is that Magik does the exact same relativistic math in Kerr and Classic, even though it is not needed in the latter. We do this to ensure our math is correct. Kerr and Classic use the exact same formulars and thus any inaccuracy appears in both.
An illustrative example are the aforementioned normal vectors. It is impossible to be stationary in the Kerr metric, which means every normal vector is deflected by aberration. This caused Nan´s in Classic when we tried to implement the Fresnel equations as angles would exceed pi/2. This is the kind of issue which would potentially be very hard to spot in Kerr, but trivial in Classic.

Improvements

We could talk about them for hours, so i will keep it brief.

The material system was completely overhauled. We implemented the full Fresnel Equations in their complex form to distinguish between Dielectrics and Conductors. A nice side effect of this is that we can import measured data for materials and render it. This has lead to a system of material presets for Dielectrics and Conductors. The Stanford dragon gets its gorgeous gold from this measured data, which is used as the wavelength dependent complex IOR in Magik. We added a similar preset system for Illuminants as well.
Sadly the scene above is not the best to showcase dispersion, the light source is too diffuse. But when it comes between unapologetic simping and technical showcases, i know where i stand. More on that later.

We added the Cook-Torrance lobe with the MS GGX distribution for specular reflections. This is part of our broader afford to make a "BXDF", BSDF in disguise.

The geometry system and intersection logic got a makeover too. We now use the BVH described in this great series of articles. The scene above contains ~350k triangles and renders like a charm*. We also added smooth shading after an embarrassing number of attempts.

Performance

This is where the self-glazing ends. The performance is abhorrent. The frame above took 4 hours to render at 4096 spp. While i would argue it looks better than Cycles, especially the gold, and other renderers, we are getting absolutly demolished in the performance category. Cycles needs seconds to get a similarly "converged" result.

The horrendous convergence is why we have such a big light source by the way. Its not just to validate the claim in the 2nd image.

Evaluating complex relativistic expressions and spectral rendering certainly do not help the situation, but there is little we can do about those. VMEC is for Black holes, and we are dealing with strongly wavelength dependent scenes, so Hero wavelength sampling is out. Neither of these mean we have to live with slow renders though !

Looking Forward

For the next few days we will focus on adding volumetrics to Magik using the null tracking algorithm. Once that is in we will have officially hit performance rock bottom.

The next step is to resolve some of these performance issues. Aside from low hanging fruit like optimizing some functions, reducing redundancy etc. we will implement Metropolis light transport.

One of the few unsolved problems we have to deal with is how the Null tracking scheme, in particular its majorant, changes with the redshift value. Figuring this out will take a bit of time, during which I can focus on other rendering aspects.

These include adding support for Fluorescence, Clear coat, Sheen, Thin-film interference, nested dielectrics, Anisotropy, various quality of life materials like "holdout", an improved temperature distribution for the astrophysical jet and accretion disk, improved BVH traversal, blue noise sampling, ray-rejection and a lot of maintenance.


r/GraphicsProgramming • • Oct 12 '24

Video Grass renderer: Covering a 4km x 4km terrain in ~ 10 ms (Github source)

185 Upvotes

r/GraphicsProgramming • • Oct 07 '24

Final retouch. Fully triangle rasterized 3D cube spinning on MSDOS

185 Upvotes

r/GraphicsProgramming • • Jun 06 '24

Article How I learned Vulkan and wrote a small game engine with it

Thumbnail edw.is
185 Upvotes

r/GraphicsProgramming • • Dec 12 '25

My Vulkan Renderer w/ 3D Skeletal Animation written in Rust

182 Upvotes

Here is a video of my animation app. :D


r/GraphicsProgramming • • Mar 31 '26

A portal prototype game running on a real-time path tracer build from scratch in C++.

181 Upvotes

I am a first-year game development student, and this is my path tracer, written from scratch in C++ as a school project. I wanted to share the main technique I used to keep it fast during camera movement, because I couldn’t find a clear explanation of it anywhere really when I was learning.

Note: The video was recorded with OBS running, which costs some frames. The actual game runs faster without it, normally it runs at least 60 FPS. This is running on my laptop its has an Intel i7-11800H with an RTX 3060. The path tracing itself is fully CPU-based, the GPU is only used for the denoiser.

The core problem is that doing path tracing is slow. Every pixel needs a primary ray, shadow ray, indirect bounce rays, and when the camera moves, all of that needs to happen again from scratch. There are different ways people can deal with this some used heavy denoising, ReSTIR for reusing lights samples, temporal reprojection in rasterized pipelines. The approach I went for is based on Reverse Reprojection Caching (Nehab et al. 2007).

The idea is if the camera moved slightly, the same surface is still roughly where it was the last frame. So before doing a full trace on it again I check whether I can skip most of the work for that pixel.

How it works

  1. Trace the primary ray through the BVH to find what surface is at this pixel, this is cheaper for the shading that follows.

  2. Validate against history project the hit point into the last frame’s screen space. If the same ID and a matching depth are there the surface hasn’t changed.

3. Reject special cases Specular materials and portals always hit get a full trace since they are more view dependent or can’t reproject meaningfully. Sky pixels just can sample the Skydome directly, which is already cheaper.

4. Recompute direct lighting only fire a fresh shadow ray to catch moving shadows but skip the expensive indirect bounces.

5. Stochastic refresh a random ~5-10% change of passing pixels still getting a full trace to prevent permanent staleness.

On top of the original paper, I added portal-aware rejection, so the system doesn’t reproject across teleportation boundaries.

The result of this is during camera movement a certain % of pixels skip the expensive indirect work. As you can see in my Debug overlay it shows how many pixels get skipped and get traced this saves about ~60% of the work and makes my game run at least 60fps when its not looking at expansive materials.

Other techniques I used.

· Two-level BVH (TLAS/BLAS) the scene uses a two-level acceleration structure with SAH-binned builds for fast ray traversal and refitting for dynamic objects, so the tree doesn’t need a full rebuild every frame.

· Variance-based adaptive sampling pixels that have converged (low variance) get skipped when the camera isn’t moving.

· Checkerboard indirect trace indirect light on half the pixels and reuse the neighbouring result for the other half. The block size adapts on moving and not moving.

· Async GPU Denoiser the denoiser runs on the GPU asynchronously, so the CPU starts the next frame while the current one is being denoised.

And a few others like Russian roulette path termination, ball bounding-box tracking for localized updates.

I am happy to answer questions. If I have described something incorrectly, please let me know, and if you have any optimization techniques I should investigate, I am all ears.


r/GraphicsProgramming • • Feb 14 '25

The Gods of OpenGL finally gifted me with a render of my first imported model

Post image
181 Upvotes

r/GraphicsProgramming • • Mar 08 '25

My Restir implementation using Nvidia Falcor. Github: https://github.com/Trylz/RestirFalcor

180 Upvotes

r/GraphicsProgramming • • Sep 05 '26

Synapse Engine: A Modern, Research-Oriented, Fully GPU-Driven AAA-Style Game Engine

Thumbnail
gallery
179 Upvotes

Hi everyone!

After a very long development journey, I'm finally ready to share Synapse Engine, a modern, research-oriented AAA-style game engine that I've been developing essentially from scratch.

It started as my MSc thesis at the Budapest University of Technology and Economics, but grew far beyond what I originally planned. Over the past several months I've been rebuilding and refining the architecture around a simple question: What would a modern game engine look like if we designed it around today's GPUs from the ground up?

The project is now over 2,300 files, nearly 94,000 lines of C++ code and around 10,000 lines of shader code, excluding comments and blank lines.

If you just want to check out the project:

The GitHub README is probably the best place to start if you want a quick overview of the project and its architecture. If you're interested in modern game engine development in much more depth, I also put together a 250-page technical presentation covering the entire project, from the ECS and software architecture through GPU-driven rendering, culling, lighting, virtualized shadows and future directions.

The presentation is quite large, but I tried to make it genuinely useful as a learning resource rather than just documenting the final result.

One of my main goals with Synapse Engine is education. Learning these topics was a huge struggle for me, and it took a lot of time to piece everything together because there isn't much high-quality material that shows how these modern techniques actually come together inside a real engine codebase. I wanted to document that process and create something that I would have wanted to have when I started.

What can the engine actually do?

At its core, Synapse is a fully GPU-driven renderer using hierarchical culling, Hi-Z occlusion, cone culling, dynamic LOD selection, indirect rendering, mesh shaders, bindless resources and virtualized shadows. The engine is built around a custom data-oriented ECS and is designed to handle very large scenes with minimal CPU involvement.

For example, with 1,000,000 entities on an RTX 4060, the cumulative culling cost goes from 124.407 ms without culling to 0.653 ms with the full hierarchical culling pipeline.

However, at 10,000,000 entities, even the conventional GPU-driven hierarchical approach becomes insufficient. To address this, Synapse introduces a custom GPU-built Morton-ordered chunking system, which groups entities into spatial chunks and allows entire groups of 32 entities to be rejected at once. This reduces the culling cost from 5.8 ms to just 0.3 ms for 10 million entities.

I also developed a new rendering technique called Dual-HiZ Adaptive Clustered Forward+ while working on the engine. With 8,192 point lights and 8,192 spot lights, it measured 2.873 ms, compared to 8.652 ms for deferred shading in the same setup. The technical presentation contains a detailed explanation of how the technique works.

Synapse isn't primarily intended as a game-development tool for game developers. It is a production-ready, research and educational platform for experimenting with modern game-engine architecture and real-time rendering techniques.

The goal is not to provide a plug-and-play engine for building games, but to provide a complete, practical implementation of modern engine technologies that can be studied, extended, and used as a foundation for further research and development.

The engine is the result, but the architecture, experiments, failures and reasoning behind it are what I really want to share. If you're interested in Vulkan, graphics programming, GPU-driven rendering or modern game engine architecture, I'd love to hear what you think.

Dual-HiZ Adaptive Clustered Forward+

One of the things I'm particularly excited to share is a new rendering technique I developed called Dual-HiZ Adaptive Clustered Forward+.

It combines a dual Hi-Z depth structure with adaptive clustered light assignment to efficiently handle large numbers of dynamic lights while keeping the rendering pipeline fully GPU-driven.

In my tests, with 8,192 point lights and 8,192 spot lights, it measured 2.873 ms, compared to 8.652 ms for deferred shading in the same setup.

If you're interested in how the technique works, I've documented it in detail in the technical presentation, including the motivation, architecture, algorithms and implementation details.

You can find it on pages 166–189 of the presentation.

The presentation is available both on the GitHub repository and on the Synapse Engine website.


r/GraphicsProgramming • • Mar 13 '26

GPU grass shader for my pixel art game

179 Upvotes

r/GraphicsProgramming • • Dec 29 '25

Video SIGGRAPH 2025 Advances in Real-Time Rendering in Games: Fast as Hell: idTech8 Global Illumination

Thumbnail
youtube.com
179 Upvotes

r/GraphicsProgramming • • Sep 07 '25

How do modern games end up with THOUSANDS of shaders?

179 Upvotes

This isn't a post to ask about why there is a "compiling shaders" screen at the start of lots of modern releases, I understand that shader source is compiled at runtime for the host machine and the cache is invalided by game patches or driver updates etc..

But I'm confused about how many modern releases end up with so much shader code that we end up with entire loading screens just to compile them. All of the OpenGL code I have ever written has compiled and started in milliseconds. I understand that a AAA production is doing a lot more than just a moderately-sized vertex and fragment shader, and there are compute shaders involved, but I can't imagine that many orders of magnitude more graphics code being written for all of this, or how that would even fit within playable framerates. Are specific pipelines being switched in that often? Are there some modern techniques that end up with long chains of compute shaders or something similar? Obviously it's difficult to explain everything that could possibly be going into modern AAA graphics, but I was hoping some might like to point out some high-level or particular things.


r/GraphicsProgramming • • Jun 28 '25

Tried implementing an object eater

179 Upvotes

Hi all, first post here! Not sure if it's as cool as what others are sharing, but hoping you'll find it worthwhile.


r/GraphicsProgramming • • May 01 '21

[Tech Demo] i am working on a 2d raytracer. Added basic GI (indirect Lighting) today.

179 Upvotes

r/GraphicsProgramming • • May 24 '26

Video ASCII refraction on the sphere

178 Upvotes

r/GraphicsProgramming • • Jun 17 '26

Video Raymarched Terrain Shadows for Large-Scale Simulation

177 Upvotes

Demo scene: 500 terrain chunks at ~60 FPS on a RTX 4060 Ti.

During a few months of R&D for my internship, I experimented with replacing Unity's terrain shadows with a raymarched solution.

I ended up with a shadow renderer that features:

  • Heightfield raymarching

  • Max Mip-Map traversal from this paper by Art Tevs, Ivo Ihrke and Hans-Peter SeidelMax-Planck-Institut für Informatik

  • BVH-based chunk culling

  • Temporal soft-shadow accumulation

In case you want more detailed information:

Curious to hear what graphics programmers think of the approach.