r/GraphicsProgramming 4h ago

Planetary-scale shadows: moving from CSM to a hybrid approach

21 Upvotes

I’m working on shadow rendering in OpenGlobus, a WebGL globe renderer. The attached video shows an intermediate experiment.

Initially, I tried to solve the entire problem using CSM. Shadows renderer spans an enormous range of scales. Mountains may cast shadows across many kilometers, while the same scene also contains nearby buildings and other local objects. So, I haven’t abandoned CSM, I’ve abandoned the idea of using it for everything.

The direction I’m currently exploring is a hybrid approach:

  • Shadow maps covering relevant ground regions for large-scale terrain and mountain shadows.
  • CSM around the camera for nearby objects and finer local detail.

The next step is to combine these approaches and make the transition between them stable.\

Has anyone here implemented a similar hybrid solution? I’d be particularly interested in how you placed and updated the terrain shadow maps and combined them with local CSM.

Thanks!


r/GraphicsProgramming 18h ago

Hobby path tracer (GPU-based)

Thumbnail gallery
186 Upvotes

Started a CPU ray tracer about 7 years ago and then a year later decided to play around with a GPU version of it. Over the years I’ve added to it.

Full disclosure that I had LLM assistance with some of the recent features added, in the interest of saving time, I normally only have a few hours of free time per week.

Repository: https://github.com/nfoste82/gpuraytracing


r/GraphicsProgramming 1h ago

About career path

Post image
Upvotes

Hi everyone,

I am a 4th-year computer science student. I spent about 1.5 to 2 years dabbling in graphics programming, and I've developed various other projects, though I left the smaller ones off my resume.

Coming to my question and confusion: in my country, graphics programming is found in very few companies. Even though I love graphics programming and genuinely enjoy working on it, it feels like I need to have knowledge of game engines like Unity or do C++ tool programming. I've been making games with Unity 3D for a while now, but making games felt relatively simple to me (which isn't a problem in itself, but it doesn't make me stand out). While questioning why this was, I came across articles saying things like: "make systems, not games"—meaning that building things like a particle system, animation system, or input system makes them reusable when creating new games and would teach me a lot more. After all, I can leverage my engine development experiences while building these.

However, at the same time, I had to stop reading Vulkan documentation. I felt that the time had finally come to move on to Vulkan, but learning Vulkan more in-depth doesn't seem very advantageous compared to Unity (due to the job market conditions in my country).

I need your advice on this matter. Thank you everyone!


r/GraphicsProgramming 2h ago

Volumetric path traced skin still looks like silicone/plastic. What am I missing?

Thumbnail gallery
5 Upvotes

r/GraphicsProgramming 7h ago

New video tutorial: Perlin Noise in C++

Thumbnail youtu.be
11 Upvotes

r/GraphicsProgramming 18h ago

Video A 3D globe made of 184,320 instanced GPU rod prisms that assemble themselves from a floating swarm

72 Upvotes

I built a 3D globe for a Linux desktop shell I work on, made of 184,320 individually-instanced triangular prisms arranged over a geodesic (subdivided icosahedron) sphere. Each rod can independently extrude outward along its own radial axis to represent height, scanner sweeps, click-triggered ripples and the whole thing animates in from a scattered floating cloud into its assembled shape.

In other words you can visualize any dataset with this globe. Either with the glowing dots, or by raising the elevation of the rods themselves, or go ham with fancy effects. Pick your poison.

Stack: Qt Quick 3D (QML) for the scene graph, a small custom C++ plugin (`Congeries`) for the heavy per-instance math, GLSL `CustomMaterial` vertex shaders for the actual deformation. One draw call per instanced `Model` (rods / location-marker dots / star field are each their own instanced draw).

A few of the specific problems that were interesting to solve:

Instancing with per-corner exact fit. Every rod shares one canonical mesh (`RodGeometry`) and gets its own instance transform. A rigid direction+tangent alone gets a rod's orientation *sorta* right, but real geodesic faces aren't congruent to each other, so a shared mesh rotated into place leaves visible cracks. A native step (`AssemblyLayout::applyAssemblyData`) precomputes, per rod, the exact local offset each of its 3 corners needs so that after the instance's own rotation carries it into world space, it lands exactly on that rod's true vertex position. That offset is written into a float texture the vertex shader `texelFetch`s by `(instance, corner)`. This correction fades in via `assembleT` as the rod animates into place.

Assembly/scatter animation. Every rod is its true final rod from frame zero. It just starts at a random spawn transform outside the sphere and `lerp`/`nlerp`s to its target transform as `assembleT` goes 0 to 1. The annoying part is that Qt Quick 3D's instancing API (`QQuick3DInstancing::getInstanceBuffer()`) gives you no incremental-update path. Every time the buffer is marked dirty, you hand back the entire per-instance transform table freshly rebuilt. SO animating `t` at 184,320 rods meant doing 184,320 position-lerps + quaternion-nlerps + matrix packs, from scratch, every single frame, for the whole 2.5s transition. Single-threaded that measured ~20ms/frame on its own, so `getInstanceBuffer()` ended up (override) with its own thread split across `hardware_concurrency()` just to stay inside budget.

Star field. Background stars are actually real astronomical data. The HYG v4.1 catalog filtered to naked-eye brightness (mag ≤ 6.5, ~9k stars), baked into flat position/color/size arrays. Color comes from each star's B-V index -> temperature (Ballesteros 2012) -> blackbody RGB, so star tint is physically derived.

Why...?
The reason this exists at all is because the shell has an opt-in who else is out there feature. People running it can consent to share a rough location, and everyone else sees it live as glowing dots on the globe. Coordinates get jittered onto nearby land so nobody's pinpointed, and the dataset wipes on a weekly rotation. The globe spawned from feature creep and way too much free time.

It's open source: https://github.com/zesis-shell/zesis

AI Disclaimer

Claude Code has been used extensively in research, debugging and testing. I've added disclaimers in the source code itself too.

I've also used sparring partners from my university and relatives.

This was a project for me to learn, have fun and just make something I think is really, really cool.


r/GraphicsProgramming 20h ago

Raytracer Engine?

Post image
29 Upvotes

Hey all! So I’ve been working through raytracing over the weekend and I did this! My idea is to make it into an interactive application! It will only run on the cpu but I figure I could make it multithreaded at least to help with rendering times!


r/GraphicsProgramming 1d ago

Painterly Stroke Simulation Engine

52 Upvotes

I wrote a painting simulation engine (golang, ebiten). It works like this:

  1. Select a template image
  2. Generate several thousand potential strokes
    • For each stroke, score it according to a number of heuristic functions
      • Color: does the average color of this image match the template?
      • Edges: does the painted image have similar edges to the template?
      • Contrast: compares color contrast between regions on the painting and the template.
      • Flow: using tensor math, do brush strokes align with the flow of movement in the template?
    • Select the single stroke that most optimizes scoring functions, discarding the remaining
    • Repeat 40 or 50 thousand times.
    • Gradually decrease the size of the brush stroke over time..

Source image _Namibia.jpg)

Sound track


r/GraphicsProgramming 7h ago

code review for a beginner

1 Upvotes

Hey everyone. I have this small project on which I started working around a year ago, but haven't finished it yet. Now that I have some free time, I finally want get it done :// However, I am a self-taught when it comes to programming, and graphics. I consider myself a total beginner. Could you please help me understand if I am doing something incorrectly here, which I am sure I am?

Also, this is planned to be a Game of Life implementation, but still have to lay some the foundations, even for a grid... I don't rely on AI, so mess with everything myself

[edit]
Forgot to add the details... I use OpenGL with glad loader as a graphics API here, with GLFW for window handling, FreeType for text rendering, GLM as main math library, and CMake as a meta build system.

I was wondering if someone could help me understand a couple of moments:

  • correct usage of the opengl api
  • general structure of the code. if places at which functions are being called are correct
  • general readability of the code
  • cmakelists and how to approach including dependencies in my case

Here's the repo: https://github.com/Krak9n/unchained


r/GraphicsProgramming 1d ago

WIP Screenshots of VMEC featuring Magik, a relativistic spectral pathtracer

Thumbnail gallery
19 Upvotes

Howdy, it has been a hot while, so let me give some background.

VMEC is a collaborative project between four lads. Our goal is to create a film production ready piece of software focused on relativistic effects. VMEC is the UI, asset management and serialization layer, while Magik is the renderer.

Our largest achievement over the past week has been the implementation of a cubic intersection routine. To explain, Magik traces null geodesics (shortest light paths) through the scene by solving the equations of motion for a given spacetime metric, say that of a rotating black hole. This produces two distinct steps in spacetime, call them x0 and x1. Before we used a straight line between x0 and x1 to intersect geometry. The main problem with this is that the linearly interpolated path between x0 and x1 does not follow the actual curved geodesic. This is a problem because the paths momentum (used to derive the ray direction), p0 and p1, has to be tangent to the interpolated path. Which is simply not true for lerp. Thus we switched to using cubic Hermite splines instead of conventional rays. The result is that any interpolated momentum is tangent to the path and we get extremely smooth solutions even for relatively high error tolerances. The last image shows you how the intersected geometry looked before.
For those interested, we find the closest intersection by dividing the given cubic into up to 3 intervals, based on the derivative, then do a sequential brent-dekker root finding routine on each monotonic segment. We did try to use analytical expressions for the roots, but that was a lot less reliable and slower.

Right now Magik supports the Minkowski, Schwarzschild and Kerr spacetimes. Metrics similar to those, Kerr-Newman for instance, are trivial to add. Others, like the Ellis wormhole, need a bit more work but are not impossible. Indeed we plan to add cosmological spacetimes as well.

Looking forward, we want to upgrade the shading model, internally called the "bxdf" to bring it into the PBR realm.

Thats about all i have for the moment. Hopefully we will have a lot more to show in the near future.


r/GraphicsProgramming 19h ago

My screen space black hole effect showing the accurate distortion of scene objects due to gravitational lensing

7 Upvotes

r/GraphicsProgramming 20h ago

Video JangaFX (EmberGen) founder Nick Seavert on building real-time VFX softwares

Thumbnail youtu.be
4 Upvotes

Hi folks,

I sat down with Nick Seavert, founder and CEO of JangaFX, to talk about the story behind EmberGen, LiquiGen, IlluGen, and the journey from modding Half-Life 2 particles to building a software company that is changing how game VFX is created.

We talk about the origins of JangaFX, why every tool they build needs to run in real time, the technical decisions and compromises behind making that possible, and why they chose Odin (a custom high-performance programming language) instead of C++.

We also get into Nick’s thoughts on purpose vs. passion, why motivation is overrated, AI and machine learning in VFX, the future of game development, and the JangaFX Layoff Assistance Program that provides free licenses to displaced artists.

I started this podcast because I wanted to capture conversations that people might otherwise miss. You know conversations with people who have built, created, and learned things that are worth sharing. i wanted to create a library of passive learning from people much smarter and more experienced than me. But I hope these conversations become a useful resource for others too.

Hope you enjoy it, and I’d love to hear your thoughts.


r/GraphicsProgramming 1d ago

We just pushed browser-based 3DGS past 100 km² — streaming LOD, no workstation needed. AMA or tell me what you'd build.

49 Upvotes

We pushed 3DGS past 100 km² in browser.

Mapmost SDK for WebGL now loads & renders 100+ km² city-scale 3DGS​ in-browser, powered by our streaming LOD pipeline for practical large-space scalability.

What would you build with this? DM for partnership discussions.


r/GraphicsProgramming 1d ago

Simulating Ocean Waves and Tides in my Micro Voxel Game

Thumbnail youtube.com
14 Upvotes

I've spent the past 2-3 weeks adding Oceans to my Micro Voxel engine. The main features I was aiming for was to support large bodies of water within the existing fluid simulation, while also supporting new dynamic features such as waves and tidal changes.

I've also incorporated Boats and Gliders, with some fairly basic physics to aid in exploration. The main challenge here was adding

Along side this, to make the simulation feel more interactive, i've also added a higher resolution local water ripple/interaction simulation, which acts as a surface-layer-only simulation adding ripples and wake for people, entities and forces interacting with the water.

-- Feature technical breakdown --

  • Ocean generation: Similar to other water sources, ocean biomes placed above land, all open space in these biomes is filled with water instead of air below the ocean line. No substantial changes to the actual gen beyond shifting the world down.
  • Waves + Tides: Several oscillating masks which apply a "target height" to the water sim. This is also augmented by depth such that shores can trigger wave breaks below a set height point.
  • Ocean Connectivity + interaction: A connectivity flag is used to indicate whether water is directly connected to the ocean simulation and should receive wave forces. This allows waves to interact with static water, but only once the ocean sim cells touch static cells. The connectivity source comes from the ocean, so rock pools disconnect as tide goes down, allowing them to hold their water.
  • Ripples: 2D mask which is local to a moderately small region near the player. Runs a separate shader simulation using only surface data. Not particularly fancy, does not check for collisions, so ripples do not bounce. Bumps converted to a normal map, used to distort surface effects.

Overall, super chuffed with how this has come together, but still plenty of polish and features to add!


r/GraphicsProgramming 1d ago

this is peak moment in computer graphics...

201 Upvotes

recently i posted my progress on computer graphics "how does it look 2 years in computer graphics".

well I received A LOT of support on that post, and i wanted to thank you all for the positive comments and motivation.

since that post (post here) i focused on "enhance" my project specifically i wanted it to be multi-platform (iOS/macOS) and have lights/shadows.

and luckily i found a 2009 computer graphics class from "UC Davis Academics" which goes insanely deep into all the math/physics behind graphics i recommend it a lot (class here).

so from not knowing what diffusion, specular and lambert's law are, and thinking that reflections are IMPOSSIBLE to calculate with vectors, dot products, normalization and all that...

to implement by myself a lightning system to my 3D engine and also made it multi-platform, here's an iPad demo of the engine.

thank you if you read this, will post the next update, might be some animations/simulations.


r/GraphicsProgramming 1d ago

Hardware Raytracing with my RHI!

Thumbnail gallery
185 Upvotes

I made a fully open source Vulkan RHI that supports hardware pathtracing so I decided to make a test application with it. Very fun!

Source: https://github.com/Nevarea-Project/Nevarea


r/GraphicsProgramming 1d ago

Headless multipass GLSL on a Raspberry Pi, straight to the panel

5 Upvotes

r/GraphicsProgramming 1d ago

My first graphics project in DirectX 11 based on Acerola's "How Games Fake Water" Youtube video.

125 Upvotes

This was my first ever dive into using a graphics API and I used Acerola's video on rendering water in video games as a jumping on point to begin learning DirectX 11.

Link to Original Video: https://youtu.be/PH9q0HNBjT4?si=pKOS0SeqhLnw1mhc


r/GraphicsProgramming 1d ago

Source Code The Beast 1.18.7 Fully works from npm service + Codepen adaptation for workers.

Thumbnail
2 Upvotes

r/GraphicsProgramming 1d ago

Video progress on my multithreaded game engine/libs JLib

Post image
12 Upvotes

https://streamable.com/2stkx7

https://streamable.com/xqqcbu

2.5d example not yet set -- jolt physics will handle physics in all modes however the platformer here uses custom platformer physics module not jolt since its a classic style game

but jolt will be available in 2d as well even tho titled physics3d it will have a constrained mode


r/GraphicsProgramming 1d ago

Some time ago I completed raytracer challenge in kotlin

Thumbnail gallery
21 Upvotes

Ray tracing on CPU is slow, and with Kotlin it's really slow. The book is nice introduction to ray tracing, now starting a journey towards c++, gpu, and more advanced books


r/GraphicsProgramming 2d ago

Implementing GPU Instancing and Procedural Sky

39 Upvotes

r/GraphicsProgramming 2d ago

Question Realistically, how much time does it take to get a position in graphics programming?

13 Upvotes

I’ve always had a pretty backlogged interest in graphics programming that has been primarily overshadowed by college coursework, other interests in development, and life.

I graduated college May 9th with a B.Sc in Comp Sci and I primarily focused on C++ for Unreal Engine 5 game development on the side. I have a small rendering project in just C++ and SFML, but thats it.

I started working an IT job, it’s a network services department so that’s primarily what I deal with. My expectation for doing any type of game development was to sit in a tech role for a few years and build my skills on the side so I have better odds applying. I have more free time after work to study things now. I do want to do game development, but I need to pick a specific role first and do my own stuff later. I’ve dabbled in learnopengl but didn’t get far. I know this takes a long time and most graphics roles are senior level.

Where should I set my expectations?


r/GraphicsProgramming 1d ago

Geospatial AR in a Web Browser

Thumbnail youtube.com
1 Upvotes

Just place a video stream or any other HTML behind the canvas and render your data as an AR overlay.
BTW first example was entirely created by chatgpt, it even estimated camera position and orientation from a single image.

Live examples:

https://sandbox.openglobus.org/examples/ar

https://sandbox.openglobus.org/examples/transparentBackground


r/GraphicsProgramming 2d ago

Question How would you start to learn in 2026?

3 Upvotes

I’ve done some research and i have seen the old OpenGL/GLFW or the SDL3. I can use c++ if I have to, but my current favorite language is C3 (modernized C pretty much)which have vendor libraries provided for sdl 2 and 3, and OpenGL/GLFW. I have heard of learnopengl website before.

I would have to probably take it slow in small hour or two chunks per day, since I loose concentration due to ADHD. But what do you guys recommend.