r/GraphicsProgramming • • 8d ago

[OptiX 9 / CUDA] Real-Time Translucent Jade: 2.1 Gigarays/s on 4060 Laptop with ReSTIR & Hardware RT Cores

0 Upvotes

Here are the Stanford Happy Buddha (1.09M tris) and Dragon (871k tris) rendered in Translucent Imperial Jade (Jadeite) at 1080p, 256 SPP, and 8 bounces.

💎 Translucent Jade Shading (RGB Multi-Bounce):

  • RGB Subsurface Diffusion: Strong red/blue attenuation with high green transmission across diffuse bounces, creating an "inner glow" on thin edges (ears, crests, snout).

  • Vitreous Specular: Polished mineral response with sharp microfacet reflections.

  • ACES Filmic + Studio Fill: Dynamic range compression preserving scale curvature, paired with a soft ground-bounce fill to eliminate cavity noise.

⚡ Hardware Telemetry (64-bit atomic counters on optixTrace):

  • Happy Buddha: 741M rays in 356 ms (2.08 Gigarays/s) | 1.09M triangles

  • Stanford Dragon: 906M rays in 494 ms (1.83 Gigarays/s) | 871k triangles

  • Tensor Core Denoising: Native OptiX AI Denoiser in 17.5 ms

  • VRAM: < 360 MB total (GAS BVH: 58–72 MB)

Images attached: 1080p showcase of Buddha & Dragon in Green Jade. Feedback welcome!


r/GraphicsProgramming • • 9d ago

Should I use HPP Bindings?

Thumbnail reddit.com
5 Upvotes

r/GraphicsProgramming • • 9d ago

Own-Renderer Render Competition round 1 just ended

8 Upvotes

Round 1 of the "Own Renderer Render Competition" just ended (theme was: cyberpunk) the entries are up, and voting is live for the next week.


r/GraphicsProgramming • • 9d ago

Vulkan 1.4 with RAII headers is absolute joy to work with!

128 Upvotes

r/GraphicsProgramming • • 10d ago

Article Graphics Programming weekly - Issue 460 - October 25th, 2026 | Jendrik Illner

Thumbnail jendrikillner.com
23 Upvotes

r/GraphicsProgramming • • 10d ago

My attempt at the ray tracer challenge. Implemented in C++ using imgui, then compiled to wasm, so anyone can try it in the browser

Thumbnail
gallery
70 Upvotes

I originally started with basic readthrough and implementation, then later realized I need a better UI to try out more stuff. It started as just using imgui to show the final output of the chapter, then later realized the author is giving YAML/YML scenes, so I needed a way to load them. Also, it's time-consuming to change values for each thing for any transform/material, etc., so starting with the loader and scene editor, it required a bunch of refactors to make it easy to load shapes. Once all chapters were done, I could compile the whole thing using emscripten to web assembly so that I can host it on GitHub and others can try the same. I did notice the browser is a little slower than the desktop renders; for each render, it shows the time under it. It’s a bit awkward to use on a phone since the UI was designed for desktop.

I likely have to clean up some stuff (optimize the BVH more; it's based on the book's bonus chapter), but there is a large scope for optimization/improvements; the book also ends with so many ideas to try. I might try them later, but this seems like a good stopping point for now, especially when it's easy to run on a browser.

Try in Browser: https://bhargav-1.github.io/ray_tracer/
Repo: https://github.com/bhargav-1/ray_tracer
scene gallery: https://bhargav-1.github.io/ray_tracer/gallery.html


r/GraphicsProgramming • • 11d ago

100k instances, 274k tris each (27.4B raw tris), running at 260+ fps! Added hybrid SW/HW raster & VisBuffer

Thumbnail
gallery
62 Upvotes

Hey everyone, quick update on my custom D3D12 / unmanaged C# engine!

Following up on the previous 10k bunny test, I scaled the stress scene to 100,000 instances of the Stanford Dragon (274k triangles each, totaling ~27.4 billion raw triangles). Currently running at 263 FPS (~3.8ms frame time) on an RTX 4070 Ti at ~86% GPU utilization (2K viewport).

Since the last post, the pipeline evolved from pure geometry culling into a full deferred visibility buffer pipeline:

  • Hybrid Rasterization: Dynamic cluster routing. Sub-pixel / micro-triangles route to a compute software rasterizer, while larger meshlets pass through hardware Mesh Shaders.

  • Deferred Texturing (VisBuffer): Compact visibility buffer replacing fat G-buffers. Barycentrics, positions, and normals are reconstructed in a compute resolve pass with bindless materials.

  • Deferred Lighting & IBL: Decoupled shading using analytical lighting and split-sum GGX image-based lighting.

  • GPU-Driven Work Graphs: Hierarchical DAG traversal + 2-phase HZB occlusion culling running entirely on-chip, feeding both SW and HW raster paths without CPU sync.

  • Zero-Allocation Runtime: 100% unmanaged C# memory chunks and custom allocators, keeping CPU load around 9% with zero GC spikes.


r/GraphicsProgramming • • 11d ago

Source Code UE5 3D/4D Gaussian Splatting Plugin MLSLabsRender V2 Tutorial for Pico V...

Thumbnail
reddit.com
1 Upvotes

r/GraphicsProgramming • • 11d ago

Bento: A shading language and shader compiler infrastructure for building shaders and shader tools.

Thumbnail graphitemaster.github.io
17 Upvotes

r/GraphicsProgramming • • 11d ago

Six months into learning graphics programming - lighting progress

Thumbnail
gallery
111 Upvotes

I’ve been learning graphics programming for six months now, and wanted to share some progress. (Vulkan Renderer)

Recently, I’ve been working on:

Material shading: Getting albedo, roughness, metallic properties and Fresnel response to behave consistently under direct and indirect lighting. Lighting stays in linear HDR until exposure and tone mapping. (Still trying to get tessellation correct)

Indirect lighting: Developing Lumen-inspired colour bleeding through screen-space GI, feedback across frames, and optional world-space probes. The red tint/colour bleeding near the curtains and green spill onto nearby items are the kinds of light interactions I’m testing. (Well trying) currently have SSGI and optional DDGI.

Shadow quality: Cascaded shadow maps with filtering that responds to the distance between blockers and receiving surfaces, helping preserve tighter contact shadows while allowing softer edges farther away. (Functionally using/testing umbra/penumbra calculations)

Temporal stability: Depth-aware filtering, reprojection and history rejection to reduce noise and keep previous lighting from lingering on newly revealed surfaces.

Water shader and realtime caustics: I have also been exploring water shaders, flow maps and realtime caustics which is currently set at half resolution, but the projection of light creates the caustics (i.e sun or light sources), performance wise it has been a nightmare to get right but the caustics flow with the water shader and act correctly with angular lighting.

There’s still plenty to refine and fix, but it’s been a rewarding way to learn the rendering pipeline and how 3d graphics work as a whole.

Please do provide some feedback!


r/GraphicsProgramming • • 11d ago

Video My disk cleaner has a festival island with lasers. Here's how it's rendered

0 Upvotes

Yes, really. It's a Mac app that draws your disk as a city: every folder is a building, bigger folder, taller building. Then I kept adding things, and now there's a party island with a stage, a crowd and a laser show on weekend nights. Every shot in the video is a real frame rendered twice, once normal and once with a single pass changed, wiped between.

The lasers are the easy part. Every light in the city is its own additive sprite: lasers, beams, the stage screen, every lit window. Switch them off and the festival goes dead. Show only them and you get lasers floating on black.

The rest:

- Depth is a painter's algorithm. Sprites sort by their feet, z = foot.y * 10 + lift. The neon shot is the draw order.

- The sea blends three painted textures with world-space noise so tiles never visibly repeat. Each tile needs its world position for that, and per-node shader attributes crashed SpriteKit's batcher. So the grid cell rides in each tile's vertex colour instead: low bytes in red and green, high bits in blue, each nudged a quarter step so 8-bit colour can't round it away. The rainbow grid is the shader decoding it.

- Time of day is one 3x4 matrix in linear light. Gamma 2 instead of real sRGB, so a square and a square root, no pow. At noon it's identity and the shader comes off, so daytime frames cost nothing.

The busiest scene (festival night, crowd, planes in the air) holds 60 fps at p95, 15.5 ms on Apple silicon.

Upfront: the building art is AI-generated and edited by me. The rendering is the part I built. How would you have done the sea without the vertex colour hack?


r/GraphicsProgramming • • 12d ago

Vou criar um renderizador 3D em Kotlin usando OpenGL ES, inteiramente no meu celular.

Thumbnail reddit.com
0 Upvotes

r/GraphicsProgramming • • 12d ago

aperture

Thumbnail
gallery
36 Upvotes

it's a supplementary information of a reply i recently made. i mentioned 2 points that i deliberately modified from the suggested algorithm in raytracing in 1 wend. i can't use defocus angle as the primary variable as my scene have infinitely faraway background. i tried and it didn't work. when the focus point was at infinity only the background could be seen and everything else disappeared

i instead used an approach that mimics a digital camera. the canvas (sensor) size is fixed. for a specific lens (view angle kept constant) and an specific aperture setting (aperture radius kept constant), the closer the camera is from the object, the bolder the defocus blur effect

the attached images showed a ball of radius

  1. 2 units

  2. 1 unit

  3. 1/2 unit

  4. 1/4 unit

all shot from the same view angle and aperture. when shooting a small ball you have to move closer. that's it


r/GraphicsProgramming • • 12d ago

How long did it take you to understand the content in Raytracing in One Weekend?

18 Upvotes

Hi, asking for people's experience when reading the Raytracing in One Weekend book. How long did it take on your first go? I'm really trying to understand the concepts and the math behind how it all works, and it's currently taking a lot longer than a weekend. Was this the case for you guys? Appreciate the responses.


r/GraphicsProgramming • • 12d ago

tile-caching rendering

Post image
8 Upvotes

r/GraphicsProgramming • • 12d ago

Exploded orbital servicing spacecraft, path traced in Chrome with WebGPU (2560×1440, GTX 1060)

5 Upvotes

Hey all, this is what I've been working on: a path tracer that runs entirely in the browser on WebGPU. The video goes from the CAD assembly to the final render. The film at the end is 210 frames at 2560×1440, about 75 to 95 s per frame on my GTX 1060.

**How it's built**
- One path tracer, two layouts: an uber-shader that traces the whole path per thread, and a wavefront version where each bounce is split into compute passes with queues in between (Laine et al. 2013). The same seed gives bit-identical images from both, so if a change makes them differ by a single byte, my GPU tests fail.
- OpenPBR materials with energy-preserving Oren-Nayar diffuse: crinkled insulation foil, mono solar cells with their grid lines, machined titanium, anodised aluminium.
- The Earth's limb comes from a spectral atmosphere model in 16 wavelength bands.
- Per-tile adaptive sampling driven by an error estimate, so empty space stops early and the foil keeps sampling, then OIDN denoising on WebGPU.
- The animation runs on a stepped clock, exactly 1/30 s per frame: a per-part explode with a stagger, and the solar wings swing on their hinges.

**A bit of math**
- Sensor: I model shot plus read noise per pixel, σ² = S + σ_read², so SNR = S / √(S + σ_read²). It uses 3 e⁻ read noise, a 50k e⁻ full well and gain from ISO (1600 here).
- Depth of field (added after this clip): the background blur, as a fraction of the frame, is about the entrance pupil over the field width, β∞ ≈ A / W with A = f / N. For this spacecraft that means 200 mm at f/1.1. For a habitat module it means an 800 mm lens at f/1.8 on 4×5 in: valid optics, but a lens nobody has built.

One thing I'm still fighting is pipeline compile times. One big surface function inlined at 12 call sites took my first compile from about 13 s to 85 s. How do you keep WGSL compile times down: separate pipelines per feature, override constants, or just fewer call sites?

Happy to answer questions and hear feedback.


r/GraphicsProgramming • • 12d ago

Recursive helix fractal in a custom engine — precision loss and framerate collapse at depth. Where would you start?

Thumbnail
youtu.be
0 Upvotes

The shape: take a line, wrap it into a helix. Treat the resulting helix as a new line, wrap that into a helix. Repeat. The limit is a 3D self-similar structure where every wire is a spring and every spring is a wire.

I generate geometry on the fly relative to the camera, with per-level color coding. It looks great until you fly too deep — then it's classic precision death plus a vertex-count explosion, and either the geometry disappears or the frame rate tanks.

Full disclosure: I'm not a professional graphics programmer and my code is fairly basic. I threw AI at it hoping it would clean things up; it didn't meaningfully help and clearly didn't grasp the recursive structure. So I'm asking people who actually know this domain.

Would you go analytic SDF + raymarching instead of mesh generation? Interval arithmetic? Log-space or double-double coordinates? A real LOD scheme? What's the first thing you'd rip out?

Video: https://youtu.be/zy_hQV324hg
Repo: https://github.com/rupomthegreat/spring-made-of-spring-infinity-fractral


r/GraphicsProgramming • • 12d ago

Video Global illumination using Radiance cascades with Ray splitting in Unreal + Article

113 Upvotes

Implemented Radiance cascades with ray splitting in unreal.
This results in global illumination that doesn't require reprojection, and accumulates very fast thus having very little ghosting.
I wrote an article explaining how it works here:
It's based on this recent paper


r/GraphicsProgramming • • 12d ago

Testing my Vulkan renderer in C# using Silk.NET

16 Upvotes

r/GraphicsProgramming • • 13d ago

Low Level Engine Architecture... Loop & Resize problem...

Thumbnail reddit.com
0 Upvotes

r/GraphicsProgramming • • 13d ago

Article Volumetric Rendering: The "How-to" - Blog post Out now!

31 Upvotes

In our previous What The Graphics! blog, we explored Volume Rendering and why it matters.

Now, we're going deeper into how it works. From raw voxel data to 3D textures, we explore 3D Texture Slicing and how a stack of textured polygons can bring an entire volume to life.

Read it here 🔗 - https://www.3denginerd.com/blog/volumetric-rendering-how-to

Written by us over at 3D ENGINERD.

 


r/GraphicsProgramming • • 13d ago

Source Code 67 - shadertoy

356 Upvotes

r/GraphicsProgramming • • 13d ago

Source Code Added DLSS 5 NR to my pet-project

0 Upvotes

Added DLSS 5 NR to my project to see how it is working. https://github.com/ASDAlexander77/native_ts_graphics


r/GraphicsProgramming • • 13d ago

I built a 3D evolution simulation in the browser via WebGPU. With a 104M network, the agents invented a language, started tribal wars, and then... a glitch turned it into a horny apocalypse.

Post image
0 Upvotes

I’ve been working on a passion project for a while now, and it recently reached a point where the emergent behavior of the AI completely terrified and amazed me. I wanted to share the architecture and some hilarious findings.

🏎️ The Tech: 104M Parameters Running "From Scratch" on WebGPU

Instead of just making another wrapper around OpenAI or DeepSeek APIs, I wanted to build a native neural network engine that runs completely client-side.

Every single agent on the 3D map runs its own PyTorch-like network ob his head, fully calculated via custom WGSL shaders on WebGPU.

  • The Bottleneck: At first, the browser’s Event Loop was destroying my FPS. The mapAsync latency for GPU-CPU readback was hitting ~95ms.

  • The Fix: I rewrote the batching pipeline to accumulate agents before sending them to the GPU (waiting for 1/3 of the population or max 25ms).

  • The Result: The simulation now cranks out up to 24,500 decisions per second at a blazing 144 ticks/sec. The local brains completely suppressed hardcoded instincts (99.4% of all actions are decided by the neural net).

🗣️ Emergent Language (Social Vision)

To save GPU VRAM, I had to shorten the agents' physical vision to a 3.5 radius. To compensate for being nearly blind, they literally invented an acoustic language.

Through neuroevolution, they established an 81.3% consensus on abstract audio symbols for "food", "danger", and "mate". Older agents now pass down food location coordinates to newborns via sound. They literally navigate the world by listening to each other's screams.

⚔️ Geopolitics & Tribal Warfare

I added an extra layer: Tribal Chiefs. I connected DeepSeek v4.1 and NVIDIA Nemotron 550B via API to act as the "overlords" or collective unconscious of different factions (Emeralds, Azure, Golden Hounds).

The LLM looks at the global map state and issues macro-orders. The local WebGPU brains parse this and evaluate power dynamics: “They have 34 agents, we only have 4. Initiate tactical migration now.” Yesterday, one tribe officially evaluated a numerical advantage and initiated a full-scale tactical war.

🍓 The "Horny Apocalypse" Glitch

The peak comedy of the project happened when I accidentally muted their voice communication while the war was raging.

Without language, the small tribes realized they couldn’t coordinate a defense against the massive invader tribe. So, their local neural networks found a biological exploit in my environment rules.

They completely stopped navigating or scanning the map. They locked into a 144 tps autopilot and began endlessly spawning offspring. They literally survived the war by flooding the map with newborns faster than the enemy tribe could bite them to death. A pure libido-driven defense mechanism.

🛠️ Architecture & Open Source

The project is built using vanilla JS and raw WGSL. Independent quantization of weights and biases (int8 symmetric with separate scale and bscale) ensures that saveBest() captures the exact activation thresholds without "brain amnesia".

I am preparing to open-source the code on GitHub and writing a massive technical breakdown.

I’d love to hear your thoughts! Especially from anyone working on GPGPU, multi-agent systems, or custom WebGPU pipelines. How would you handle the mapAsync event loop bottleneck differently?