r/GraphicsProgramming • • May 20 '26

Added better materials to my path tracer

Thumbnail
gallery
169 Upvotes

Added better materials to my path tracer and added multiple importance sampling.

  1. Glass (varying roughness)

  2. Glossy (varying roughness)

  3. Diffuse (varying roughness)

  4. mix(diffuse, glossy, 0.1) (glossy of varying roughness) Roughness vary from left to right (0.0, 0.5, 1.0). Glass and Glossy material uses single-scattering GGX and Diffuse uses Energy-preserving Oren-Nayar model.

Edit: 3D model is from here: https://sketchfab.com/3d-models/laughing-buddha-646f46ae29084d8696afc4efa5c81c39


r/GraphicsProgramming • • Dec 22 '25

1spp denoised

Post image
169 Upvotes

r/GraphicsProgramming • • May 06 '25

why aren't there more printed graphics/programming magazines?

Thumbnail
gallery
169 Upvotes

r/GraphicsProgramming • • Oct 20 '26

Video Implemented radiance cascades for my game

Thumbnail
gallery
168 Upvotes

Implemented 2D radiance cascades with 5 total cascades. There is some bloom and tile rim lighting added on top (though I want to find a better solution for the rim lighting). Still some work I need to do, but I'm happy with it so far. If anyone has feedback, that would be greatly appreciated!

1: Day/Night Cycle
2: No Lighting
3: Only lighting (with no filtering)
4: SDF
5: Cascade 0, probe every 2 texels, 4 directions
6: Cascade 3, probe every 16 texels, 256 directions


r/GraphicsProgramming • • Oct 10 '26

Video Compiling C is so fast that I use it as a scripting language at this point

168 Upvotes

r/GraphicsProgramming • • Jun 12 '26

my first triang- ...oh no

Thumbnail
gallery
168 Upvotes

I was working on my own "GPU" and decided to make some glitch art of it


r/GraphicsProgramming • • Jan 22 '26

Reaction Diffusion using Compute Shaders in Unity

168 Upvotes

r/GraphicsProgramming • • Sep 13 '25

Video 3d openGL based render engine

168 Upvotes

https://github.com/D0T-B0X/Sphere.git

Hi folks, I've been trying to learn some 3d rendering to create a particle based fluid simulator. so far I've managed to make a basic albeit capable render engine. My next step is to add a physics engine and combine all of it together.

Let me know what you guys think!


r/GraphicsProgramming • • Mar 06 '26

Video Update: Realtime Path Tracer Now 4x Faster – 3ms/frame on Same 100k Spheres Scene (RTX 5060 Ti, 1080p)

165 Upvotes

I have been optimizing my real time path tracer since my last post. This current one has full-resolution primary rays with half-resolution shadow and reflection rays upscaled. Also has denoising and a bit of color tone mapping. It can even get 16ms/frame on my MacBook M1 Pro at 1080p. (3ms/frame on my 5060ti at 1080p). I am bit-packing the sphere and ray data as fixed-point. Uniform Grid acceleration structure is built offline for the time being.


r/GraphicsProgramming • • Dec 07 '25

100,000 Particle Life Simulation running on WebGPU

165 Upvotes

r/GraphicsProgramming • • Jun 13 '24

Undergrad sophomore Graphics Engine

Thumbnail
gallery
165 Upvotes

Did this for a class about C++ programming. The world of computer graphics is nothing but amazing!


r/GraphicsProgramming • • Apr 17 '21

Source Code My OpenGL Tesseract Renderer

165 Upvotes

r/GraphicsProgramming • • Sep 09 '20

Showcasing my replication of CryTek's Neon Noir raytracing technique at i3D 2020!

165 Upvotes

r/GraphicsProgramming • • Mar 06 '26

I built a Nanite-style virtualized geometry renderer in DX12 (1.6B unique / 18.9B instanced triangles)

164 Upvotes

Hi all — I’ve been building a personal DX12 renderer (based on MiniEngine) focused on extreme-scale geometry rendering.

Current stress scene stats:

  • 1,639,668,228 unique triangles

  • 18,949,504,889 instanced triangles

Current pipeline highlights:

  • Nanite-style meshlet hierarchy (DAG/BVH traversal)

  • GPU-driven indirect DispatchMesh

  • Two-pass frustum + HZB occlusion culling

  • Visibility buffer → deferred GBuffer resolve

  • Demand-driven geometry streaming (LZ4-compressed pages)

Demo video + repo:


r/GraphicsProgramming • • Oct 18 '25

Video "Realistic" wetness shader driven by a simple static wetness mask.

164 Upvotes

r/GraphicsProgramming • • Sep 28 '25

CT Scan Renderer

Thumbnail
gallery
164 Upvotes

Hi all! I’m super excited to share a personal project that I have been working on - Fracture: a CT scan renderer. Currently it supports a 4k x 4k x 8k voxel grid - around 130 billion cells!

The CT scan slices are streamed in blocks to the GPU and compressed into a hierarchical occupancy bitfield - based on the selected density cutoffs. The volume is raymarched using a multilevel DDA implementation. The application itself performs at interactive framerates on my laptop with a RTX 3060, but it takes about 5-10s for these stills to converge to the degree pictured here.

The lighting model is currently pretty simplistic - it doesn’t do any sort of importance sampling, it doesn’t consider any multi-scattering, light ray steps are extremely expensive so a lot of the fine detail partially relies on “fake” raymarched AO from the view ray.

I’m pleasantly surprised at how this has turned out so far - I’m in the process of brainstorming what else I could do with this renderer, beyond CT scans. I’m considering setting up compatibility with VDB to render clouds and simulations. I’m also considering using this as some sort of ground truth BRDF simulator(?) - i.e., fit BRDFs based on raymarching explicitly defined microfacet structure?

Lastly, the data is from the MorphoSource website, the animal scans in particular are provided freely as part of the o-vert project.

Let me know what you folks think :)


r/GraphicsProgramming • • Mar 24 '25

Question Need some advice: developing a visual graph for generating GLSL shaders

Post image
164 Upvotes

(* An example application interface that I developed with WPF*)

I'm graduating from the Computer science faculty this summer. As a graduation project, I decided to develop an application for creating a GLSL fragment shader based on a visual graph (like ShaderToy, but with a visual graph and focused on learning how to write shaders). For some time now, there are no more professors teaching computer graphics at my university, so I don't have a supervisor, and I'm asking for help here.

My application should contain a canvas for creating a graph and a panel for viewing the result of rendering in real time, and they should be in the SAME WINDOW. At first, I planned to write a program in C++\OpenGL, but then I realized that the available UI libraries that support integration with OpenGL are not flexible enough for my case. Writing the entire UI from scratch is also not suitable, as I only have about two months, and it can turn into a pure hell. Then I decided to consider high-level frameworks for developing desktop application interfaces. I have the most extensive experience with C# WPF, so I chose it. To work with OpenGL, I found OpenTK.The GLWpfControl library, which allows you to display shaders inside a control in the application interface. As far as I know, WPF uses DirectX for graphics rendering, while OpenTK.GLWpfControl allows you to run an OpenGL shader in the same window. How can this be implemented? I can assume that the library uses a low-level backend that sends rendered frames to the C# library, which displays them in the UI. But I do not know how it actually works.

So, I want to write the user interface of the application in some high-level desktop framework (preferably WPF), while I would like to implement low-level OpenGL rendering myself, without using libraries such as OpenTK (this is required by the assignment of the thesis project), and display it in the same window as and the UI. Question: how to properly implement the interaction of the UI framework and my OpenGL renderer in one window. What advice can you give and which sources are better to read?


r/GraphicsProgramming • • Nov 21 '20

Video After long and difficult year of learning Graphics programming as a 16 year-old, I finally reached my initial goal of recreating Eastwards 2D/3D lighting system (Excluding Bloom and other tiny details)!!

164 Upvotes

r/GraphicsProgramming • • Oct 01 '26

Video Trampoline

163 Upvotes

XPBD softbody simulation in POPs using Gauss-Seidel @ 60fps and 70 shader passes (can't do substepping in same shader pass)

When TouchDesigner introduced POPs one of the first things I tried making was an xpbd soft-body sim, and it looked like this and this. Since then, I've rewritten it multiple times and watched ten minute-physics' tutorials over and over. Many simulation explosions later, it turned out that my very first solver was (mostly) correct, but I was colouring the graph and building the tet constraints in the wrong way..

Resources:

Ten Minute Physics

Eric Arnebäck's blog

Vivace

XPBD paper + earlier PBD paper from Macklin


r/GraphicsProgramming • • Dec 19 '25

Adobe Photoshop 1.0 Source Code

Thumbnail
computerhistory.org
163 Upvotes

r/GraphicsProgramming • • Jun 21 '25

Made a UI Docking system from scratch for my engine

163 Upvotes

r/GraphicsProgramming • • Jul 19 '24

Deferred rendering with 1500 lights.

162 Upvotes

r/GraphicsProgramming • • Oct 25 '26

Video made a 3d ocean slice look like pixel art in LOVE2d v. 12

161 Upvotes

been working on an experiment for my fishing game: a 3d ocean that still looks like pixel art. here’s what i used:

pixel look: one ray per art pixel, refracted at the water. ray tests are from inigo quilez. to stop shimmer i render into snapped probes and draw each pixel as a world-space quad, basically texel splatting

colour: everything snapped to a lospec palette, tones mixed with bayer dithering, 1px outlines wherever the depth jumps

water: a virtual pipes shallow water sim plus gerstner waves

sand and caves: a heightfield that slumps at the angle of repose (thermal erosion). caves are a blurred cave map, so they come out round

animation: fish spines are springs and fins are a little cloth sim (jakobsen), the eel is a follow-the-leader chain (argonaut), and the ai is behavior trees

thank you for checking out my post :D

I've been wanting to do something like this for years with shaders.

references

inigo quilez, ray intersectors: https://iquilezles.org/articles/intersectors

inigo quilez, smooth min: https://iquilezles.org/articles/smin

dylan ebert, texel splatting: https://arxiv.org/abs/2603.14587

lospec palettes: https://lospec.com/palette-list

ordered dithering: https://en.wikipedia.org/wiki/Ordered_dithering

mei, decaudin & hu, virtual pipes water sim: https://hgpu.org/?p=2256

gpu gems ch. 1, gerstner waves: https://developer.nvidia.com/gpugems/gpugems/part-i-natural-effects/chapter-1-effective-water-simulation-physical-models

jákó & tóth, thermal erosion: GPUHTErosion.dvi

thomas jakobsen, advanced character physics: https://gamedeveloper.com/programming/advanced-character-physics

argonaut, procedural animation video: https://www.youtube.com/watch?v=qlfh_rv6khY

argonaut, the code: https://github.com/argonautcode/animal-proc-anim


r/GraphicsProgramming • • Oct 15 '26

Brass that bounces twice with no simulation: the vertex shader solves each floor hit

161 Upvotes

I don't simulate the brass in my Godot gun effects at all. I just evaluate a casing's position from its age in the vertex shader. That's pretty much the stateless particles from Lutz Latta's "Building a Million Particle System" (GDC 2004). What I added is the bounces.

On a flat floor I can get the hit time straight from the quadratic. The shader loops over the bounces like this:

for (int k = 0; k < MX_BOUNCES; k++) {   // 2
    float h = max(p.y - gy, 0.0);
    float t_hit = (v.y + sqrt(max(v.y * v.y + 2.0 * g * h, 0.0))) / g;
    if (t_hit <= 0.0 || tt < t_hit) break;
    p += v * t_hit;
    p.y = gy;
    v.y = -e * (v.y - g * t_hit);   // restitution
    v.x *= fr;
    v.z *= fr;                       // friction
    tt -= t_hit;
}

After the second bounce it slides with tau * (1 - exp(-t / tau)) and I tip it over onto its side. Ejecting one is a single write into two uniform arrays. Brass from three seconds ago costs what brass from this frame costs.

I also kept a GDScript copy of the formula so the game can ask where a casing is. At 10 sample times they agree within 5.4 mm, about a pixel! In the GIF the dotted line is the GDScript side and the casing is the shader. I made the casing bigger and turned restitution up to 0.5 for it, because at my default of 0.34 the second hop is about 2 px tall.

It only knows one floor height, though. A casing will go straight through a wall. Two bounces looked like enough to me, but I'm not sure a third would even read on screen?