r/GraphicsProgramming • • Jul 18 '26

Making a Glass UI Taskbar, your thoughts on any improvements?

Post image
6 Upvotes

r/GraphicsProgramming • • Jul 18 '26

Source Code Real-time WebGL VRAM purging & Garbage Collection: Running 60FPS Three.js inside a monolithic PHP architecture to bypass iOS Safari crashes.

0 Upvotes

Hey everyone,

I recently engineered a custom 3D WebGL portfolio and ran into aggressive Out-Of-Memory crashes on iOS Safari (TBDR architecture) due to the sheer volume of high-res textures.

Instead of using a Headless SPA (Next.js/React), I opted for a monolithic PHP architecture with full-page reloads. This offloaded 100% of the WebGL memory disposal risk directly to the browser's native garbage collector, instantly guaranteeing stability between route changes.

To maintain 60FPS during active rendering, I implemented two specific systems:

1. Custom FPS Governor: A dynamic performance engine that forcefully strips roughnessMap, metalnessMap, and normalMap properties on the fly if it detects thermal throttling or frame drops. 2. Absolute VRAM Purging: Intercepting the IntersectionObserver to physically strip the src attribute of off-screen elements and force a .load() cycle to aggressively flush VRAM buffers.

👉 Core FPS Governor Logic (Gist):https://gist.github.com/MedhatAlkadri/ea99a0f7aa47c69198f2d1ae84a20e53👉 Live Demo:https://www.awwwards.com/sites/medhat-alkadri-3d-portfolio

As a Full Stack Developer stepping deeper into graphics programming, I'd appreciate any architectural critiques on this render loop or alternative approaches to handling aggressive VRAM limits on mobile browsers.


r/GraphicsProgramming • • Jul 18 '26

Video Free SDF raymarcher for Godot 4 metaballs that blend colors, in one shader (CC0 + MIT)

176 Upvotes

Signed distance field raymarching in Godot 4, authored with nodes. Physics-driven metaballs melt into the SDF cubes in one fullscreen pass, and since every CSG op works on (color, distance) pairs, the colors blend along with the shapes.

Two free editions: Standalone shader (CC0): one .gdshader, no scripts paste onto a QuadMesh, edit map(). Godot Shaders

Node-based project (MIT): shapes as Node3D nodes, live editor preview, physics, up to 32 primitives and a write-up. VavLabs Mit

Distance functions after Inigo Quilez.


r/GraphicsProgramming • • Jul 18 '26

Same spp, less grain — O(1) 2D LDS stream for AO and soft shadows (no LUT, live WebGL2 demo)

9 Upvotes

We built a streaming 2D low-discrepancy sampler (DiophantineQMC) for the integrals that still eat most of the visible error at low spp:

• hemisphere visibility (AO)

• area-light disk taps (soft shadows / NEE)

• small glossy lobes, dither/stipple

**Not** a Sobol+Owen replacement for full multi-bounce path tracing. **Is** a drop-in over white noise (often Halton too) when the per-pixel integral is ~2D — O(1) per sample, no direction-number tables, no blue-noise atlas.

**Honest scope:** rank-1 / lattice-style streams can lose to white noise in high-D discontinuous path integrals. That regime is Owen-scrambled Sobol. We recommend hybrid deploy: our sampler on 2D taps, Sobol on deep bounces. The demo runs both side by side.

**Numbers (reproduced, Jul 2026):**

• Discontinuous 2D AO-style integrand — RMSE vs white noise: 0.52× at N=16 → 0.17× at N=256 (gap widens with N)

• N=10k, 20×20 spatial grid: −97.4% variance vs PRNG, 0 empty cells

• CPU reference harness: ~10× faster than Halton, ~1.35× than Sobol at same N

• Interactive band (N ≈ 64–1024): competitive with Sobol on a standard disk integrand, without LUTs

Looking for sanity checks, especially on the hybrid boundary and AO isolation (we fixed an early correlated-index bug; notes in the raytracer README).


r/GraphicsProgramming • • Jul 18 '26

Mesmo spp, menos ruído — sampler 2D O(1) para AO e sombras suaves (sem LUT na GPU)

17 Upvotes

Construímos o DiophantineQMC: um gerador de amostras de baixa discrepância em streaming, pensado para os integrais ~2D que ainda dominam o erro visual em renderização em tempo real:

→ oclusão ambiente (hemisfério)

→ sombras suaves / area lights (disco)

→ glossy taps, dither, stipple

Não é substituto do Sobol+Owen em path tracing multi-bounce. É upgrade drop-in sobre ruído branco — e frequentemente sobre Halton — onde a integral por pixel é essencialmente bidimensional.

O que medimos (reproduzível, jul/2026):

• Integrando 2D estilo AO: RMSE cai para 0,52× do ruído branco em N=16 → 0,17× em N=256. A vantagem cresce com o número de amostras.

• N=10.000, grade 20×20: −97,4% de variância espacial vs PRNG, zero células vazias.

• Harness CPU: ~10× mais rápido que Halton, ~1,35× que Sobol no mesmo N.

• Faixa interativa (N ≈ 64–1024): competitivo com Sobol, sem tabelas de direction numbers.

Deploy honesto = híbrido:

DiophantineQMC nos taps 2D (AO, penumbra, glossy)

Sobol + Owen nos bounces profundos

Modos para testar:

#ao — oclusão ambiente

#soft — sombras suaves

#glossy — reflexões

#hybrid — Sobol nos bounces + nosso sampler no disco da luz

WebGL2, acumulação progressiva, sem build.

Buscamos feedback técnico e design partners (engines custom, WebGPU, middleware). Se você roda path tracer próprio ou stack mobile/WebGL com spp apertado, adoraria ouvir sua opinião nos comentários.

#renderização #realtimegraphics #pathtracing #gamedev #computaçãoGráfica


r/GraphicsProgramming • • Jul 18 '26

Experimenting with a Particle System with GLSL Hot-reload: WayVes

14 Upvotes

Recently added Hot-reload for GLSL files within WayVes, a Visualiser Framework for Wayland, that also works across multiple Stages. The Particle System is made entirely using 2 Fragment Shader Stages, with a 3rd Post-Processing Glow pass added.


r/GraphicsProgramming • • Jul 18 '26

I built a black hole desktop overlay in Rust: per-pixel Schwarzschild geodesics over a live desktop capture (wgpu + winit)

Thumbnail reddit.com
3 Upvotes

r/GraphicsProgramming • • Jul 18 '26

Question Sending SPIR-V over the net, is it obviously dangerous or perfectly fine?

23 Upvotes

I'm making a multiplayer game with Vulkan, and when a client joins a server, I'd like to be able to send arbitrary custom SPIR-V shaders to the client. My initial thought was "It's a shader, no syscalls or anything. Worst thing it could do is lag a bunch or maybe crash the game."
But I don't know enough about SPIR-V to know if that's correct, and doing a quick search isn't giving me any results on the subject, so I'm asking first.

Some notes:

  • I'm already planning to use spirv-val to help avoid crashes, if that helps safety any.
  • I cannot send over the shader source; all my shaders are pre-compiled for a bunch of reasons not relevant for this post.

Edit: To clarify, this is for modding purposes. Users will be able to create the shaders and send them from servers they host.


r/GraphicsProgramming • • Jul 17 '26

Video Spectral Blending with stock Compositor nodes in Blender

Thumbnail youtu.be
2 Upvotes

I implemented spectral blending (based on Spectral.js) in Blender 5.2 with nodes and posted the script on my GitHub repository. Any feedback or critique is welcome, thanks!


r/GraphicsProgramming • • Jul 17 '26

Article How to render good looking UI elements

32 Upvotes

I spend last two months optimizing, enhancing the look of my UI library (Lumora) for my game engine. Last two days I have been writting my findings on how render good looking containers, what techniques did I use,...etc. https://alielmorsy.github.io/how-to-build-ui-elements/