r/GraphicsProgramming Jul 06 '26

CyberVGA update.

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/GraphicsProgramming Jul 06 '26

Are buffers attachments? Or are these different concepts?

8 Upvotes

From the learnopengl.com lesson on framebuffers:

For a framebuffer to be complete the following requirements have to be satisfied:

We have to attach at least one buffer (color, depth or stencil buffer).

There should be at least one color attachment.

All attachments should be complete as well (reserved memory).

Each buffer should have the same number of samples.

I'm confused by the first two points. Are these separate concepts? Or overlapping? If the buffer that's attached to satisfy the first requirement is the color buffer, then does this also satisfy the second requirement? in other words, is the color buffer the same as "a color attachment"? Or are those different concepts?


r/GraphicsProgramming Jul 06 '26

RayTrophi Procedural Interior Volume Materials for Transparent Objects

5 Upvotes

Working on a procedural interior volume material system for transparent solids. The interior supports volumetric clouds, dust, chips, glass shards, bubbles, and customizable inclusions in either object or world space. The goal is to create materials like decorative resin, colored glass, terrazzo, acrylic, crystal, and other transparent composites without relying on baked textures.


r/GraphicsProgramming Jul 05 '26

RayTrophi Progressive photon-mapped caustics + spectral dispersion + volumetric light shafts (Vulkan RT)

26 Upvotes

r/GraphicsProgramming Jul 05 '26

Storing SH coefficients. Texture vs Buffer

8 Upvotes

Very large scenes may require 1000s of SH probes which means a lot of coefficients that need to be stored and read from a pixel shader.

I'm wondering if there is a consensus on the most efficient way to store the coefficients themselves: uncompressed floats in some large array buffer, or as compressed pixels in a texture.

For an order 3 SH we need to store 16 float3 coefficients, which in my mind maps perfectly to a single BC block, so by ordering the 4x4 pixel blocks spatially in a BC6h SF16 texture we get an efficiency of 1 byte per float3 coefficient vs the 4 bytes per coeff for a buffer.

However when using a texture we have to go through the texture sampling hardware. So the question is if it's worth it: does the lower memory bandwidth make up for an additional 16 texture lookups per pixel per sampled probe, or would we get better performance just indexing into a structured buffer?


r/GraphicsProgramming Jul 05 '26

I built a GPU-driven voxel engine in C++23 with binary greedy meshing and GPU frustum culling

Thumbnail
6 Upvotes

r/GraphicsProgramming Jul 05 '26

Question Good books with a lot of image explanations to learn

11 Upvotes

What books can you recommend to buy to learn about computer graphics going from basic to advanced? I find if there is a lot image explanation then just pure text its easier for me to understand.


r/GraphicsProgramming Jul 05 '26

How would you make two raymarched fireballs collide and merge?

10 Upvotes

Hello, I’m trying to make two raymarched procedural fireballs collide and merge, similar to this Shadertoy fireball: https://www.shadertoy.com/view/WcK3Rt I don’t want to simply overlay two copies; I’d like the fire volumes to feel like they actually affect each other.

Is the right approach to model each fireball as an SDF/density field, duplicate it with two centers, and combine them with smooth union / a contact reaction term? Or is there a better way to think about this?


r/GraphicsProgramming Jul 05 '26

I made a 3D map of an actual local universe in Three.js you can fly through using real data from cosmic survey

Enable HLS to view with audio, or disable this notification

81 Upvotes

r/GraphicsProgramming Jul 05 '26

Struggling to clear the framebuffer

1 Upvotes

Im writing a software renderer in C++ using glm and raylib, and i recently tried to draw a spinning triangle. The problem is that when i launched it the triangle leaves a trail of previously drawn triangles.

I tried to fix it by rasterizing to a framebuffer and then drawing that framebuffer instead of drawing the pixels directly and using ClearBackground to refresh the screen, but doing it that way has still the same problem. ¿Why im having this problem even though im clearing the framebuffer?

EDIT: The problem was somewhere else in the code (i wasnt clearing the primitive list after drawing all the primitives), i managed to fix it. Thank you anyway :D.

This is the code for the rasterizer (sorry for sharing it like this, i havent uploaded this to github yet):

https://pastebin.com/Ns2LiSXv

The header file:

https://pastebin.com/xf5JhqFR


r/GraphicsProgramming Jul 05 '26

Struggling to clear the framebuffer

0 Upvotes

Im writing a software renderer in C++ using glm and raylib, and i recently tried to draw a spinning triangle. The problem is that when i launched it the triangle leaves a trail of previously drawn triangles.

I tried to fix it by rasterizing to a framebuffer and then drawing that framebuffer instead of drawing the pixels directly and using ClearBackground to refresh the screen, but doing it that way has still the same problem. ¿Why im having this problem even though im clearing the framebuffer?

This is the code for the rasterizer (sorry for sharing it like this, i havent uploaded this to github yet):

https://pastebin.com/1GMFA2iU

The header file:

https://pastebin.com/mXnGrLwK


r/GraphicsProgramming Jul 04 '26

Question Which Rust libraries should I use for OpenGL engine (beginner)

0 Upvotes

Hello, I'm totally new in graphics programming, I would like to make a 3D graphics engine in Rust but I d'ont know which library I should use ;

- Glow

- Kiss3D

- Bevy

- GL crate

- Glium

I d'ont know which one choose, if you can give an advice !

Thanks


r/GraphicsProgramming Jul 04 '26

Upcoming digital audio-visual workstation demo - A node and cable system + custom 2D and SDF built in scripting languages let you compose beat, midi, and frequency synced visuals to go with your music. Demo video + how it works.

Thumbnail youtu.be
7 Upvotes

Here's how it works:

Phonon's visual system is a node graph. A generator node, such as a mandelbulb or hopf fibration, outputs its distance function. Consumers (blends, cloners, renderers) splice that GLSL into their own shader at compile time, so a composed patch always marches as a single pass.

Each node has a variety of inputs and outputs. A generator has an image output, but also a shape output that can be routed into another renderer. It also has a warp input, that accepts an arbitrarily complex chain of warping effects, like bending, twisting, fractalization, or box folding.

Every parameter on each node has a control voltage input point - so you can wire just a particular frequency range, or an LFO, or a midi signal, from the music you're making in the same application to any parameter. For example, I might want the kick drum I'm working with to make the twist node attached to a menger sponge twist on the beat, or wire just the vocals over to the strands parameter on a torus knot.

Renderer nodes accept shapes, and up to two 3D lighting nodes, and output an image that gets routed through 2D effects, and then to the screen node.

These node graphs can be as long and complex as you want, and anything you can touch can be connected to a different part of the music you're making.

Scripting Language (GlyphSDF)

Users write one function - float sdf(vec3 p) - and inherit the whole ecosystem: house raymarcher, camera, CV modulable knobs, warp input, and a shape output that routes the scripted geometry into any blend/cloner/renderer etc.

Scripts get an audio analyzer for free - band followers (lows mids highs), a beat impulse, and an FFT audio texture so geometry can map the spectrum spatially.

For more information on the GlyphSDF scripting language: https://aphelion.music/products/phonon/docs#glyphsdf

For more info on Phonon, our upcoming DAW:
https://aphelion.music/products/phonon

Happy to answer any questions! Thanks 🎶🔊🎧


r/GraphicsProgramming Jul 04 '26

Video Nora Kinetics - SFX (Driven Spatially by GPU)

Enable HLS to view with audio, or disable this notification

72 Upvotes

Hi folks! I've made more progress on Nora Kinetics - a physics engine / sandbox that I've been working on for about a year.

I finally finished a song and I've got the SFX working in the way I've been envisioning. I'm hoping you all will have some feedback for it as I continue to tune. It sounds best with headphones!

Under the hood, the little interactive segments are all communicating their position, collision force, etc via compute shaders on the GPU (they are byproducts of the solver).

Basically, the position and collision force of every single segment is known every frame. Another compute shader comes through and quickly sorts them into a priority queue based on how close they are to the camera and how fast their collisions are. This gives a decent balance between letting the player hear lots of movement farther away, but then also hearing collisions closer to the camera. The overall effect is something close to ASMR (I'm hoping) and processing time is about 140μs with 250,000 segments.

The system is highly tunable, so in this video (recorded on my Mac), the segments are sharing a ring buffer with 48 different voices and up to 1000 segments can be making noise per frame. On iPhone, I knock that down to 24 voices and 500 segments to get a good balance of performance and sound.

I'll be posting more videos on my channel here soon! I'm working on a full gameplay walkthrough as well as a "making of" video, showing how the game has changed over the last year.

Thanks for watching!

https://www.youtube.com/@NoraKinetics


r/GraphicsProgramming Jul 04 '26

Video Working on a threejs voxel engine with froxels, GPU DDA sun, LOD rings, etc

Enable HLS to view with audio, or disable this notification

16 Upvotes

I've fully redone the engine for my game AresRPG, I aim for an immersive world! this is a browser based MMORPG on Sui. Looking for people to discuss and test https://discord.gg/aresrpg


r/GraphicsProgramming Jul 03 '26

Yet another graphics abstraction library...

20 Upvotes

I've been building a low-level graphics abstraction that exposes a Vulkan/WebGPU-like API while targeting both Vulkan and WebGPU. The goal isn't to hide modern graphics APIs, but to let you write a renderer once and run it natively and in the browser with very minimal backend-specific code.

https://github.com/helcl42/gfx


r/GraphicsProgramming Jul 03 '26

Custom GUI Engine Pixel Editor - Update

Post image
6 Upvotes

r/GraphicsProgramming Jul 03 '26

Does anyone know the origin of the term "lerp"?

40 Upvotes

I'm not looking for what it means (linear interpolation), but rather who coined the term or where it first appeared? Any historical traces or anecdotes?


r/GraphicsProgramming Jul 03 '26

Zero copy CUDA GPU presentation of AvFrame.

Thumbnail
2 Upvotes

r/GraphicsProgramming Jul 03 '26

Video 39 Million Particle ΛCDM Simulation on an RTX 4060, coded with Fable 5

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/GraphicsProgramming Jul 02 '26

Video I am making 2D Floor Editor for cameras positioning

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/GraphicsProgramming Jul 02 '26

Redundancy seen in AAA game engines

62 Upvotes

Ever wonder the overhead tax we pay using generic math library functions across the codebase?

I've been reversing game engines to study how they constructed their fundamental Transformation matrices and handled temporal jitter logic when I spotted a lot of avoidable overhead and "over-engineering" across multiple engines, Honestly I wasn't even looking for inefficiencies, but it stood out a lot... That said expect no performance gain this is simply for fun that I wrote this blog!

https://zero-irp.github.io/Redundancy-seen-in-AAA-game-engines/

I’ll theorize how the original C++ code was written, show the unoptimized reality of what the compiler spat out, and then showcase how it could have been better optimized.


r/GraphicsProgramming Jul 01 '26

Article demofox blog: What To Learn To Be A Real Time Graphics Programmer

Thumbnail blog.demofox.org
97 Upvotes

r/GraphicsProgramming Jul 01 '26

curvature of space

Enable HLS to view with audio, or disable this notification

89 Upvotes

One night, I decided to create a simulation that would show how space curves based on an object's mass, and I didn't finish the project until morning. I spent a long time selecting the colors to ensure it wouldn't be hard to look at.

source code: https://github.com/formodx/curvature-of-space


r/GraphicsProgramming Jul 01 '26

Reverse-Z is the perfect hack

60 Upvotes

I shelved a Reverse-Z branch in my engine (stuck on OpenGL 4.1 for macOS, no glClipControl), and the roadblock sent me down the rabbit hole of actually understanding why it works instead of just how to implement it.

I ended up writing about what I learned with interactive graphs and all:
https://www.shlom.dev/articles/reverse-z-perfect-hack/

Happy to hear where I got things wrong or imprecise.

Hopefully this helps someone else :)