r/GraphicsProgramming • u/KRIS_KATUR • Feb 25 '25
r/GraphicsProgramming • u/NamelessFractals • Mar 30 '25
My offline fractal path tracer written in shadertoy
It's mostly just brute force path tracing including GGX specular, diffuse, SSS, glass and a little volumetrics. Other than that nothing that interesting
r/GraphicsProgramming • u/night-train-studios • Aug 04 '25
We built a Leetcode-style platform to learn shaders through interactive exercises – it's free!
Hey folks!I’m a software engineer with a background in computer graphics, and we recently launched Shader Academy — a platform to learn shader programming by solving bite-sized, hands-on challenges.
🛠️ New: You can now create your own 2D challenges!
We just launched a feature that lets anyone design and share shader exercises — try it out from your profile page and help grow the community’s challenge pool.
🧠 What it offers:
~60 exercises covering 2D, 3D, SDF functions, animation, and more
New: users can now create their own exercises !
Live GLSL editor with real-time preview
Visual feedback & similarity score to guide you
Hints, solutions, and learning material per exercise
Free to use — no signup required
Think of it like Leetcode for shaders — but much more visual and fun.
If you're into graphics, WebGL, or just want to get better at writing shaders, I'd love for you to give it a try and let me know what you think!
r/GraphicsProgramming • u/nathan82 • Oct 10 '26
Mobile GPU Realtime Fluid Sim
The sim came out great but what about the lighting!! All just cubemaps, with fluid depth affecting the roughness mip level. So happy with this.
r/GraphicsProgramming • u/YEET9999Only • Jun 11 '25
I made a Spotify entirely in OpenGL because I hate web programming.
Hey so 3 years ago I made this project, and now i have no idea what to do next. I wanted to make a GUI library that lets you actually draw a UI , instead of placing buttons and stuff , because i hate WEB dev. Is it worth it? Has anyone done this already?
Would love if you guys give me feedback: https://github.com/soyuznik/spotify-GL
r/GraphicsProgramming • u/lielais_priekshnieks • Apr 01 '25
My first raytracer (tw: peak graphics)
r/GraphicsProgramming • u/KRIS_KATUR • Oct 16 '24
A generative skull - no geometry, no mesh - just code in a pixel shader
r/GraphicsProgramming • u/Avergreen • May 02 '25
I'm making a game in opengl and c++
I'm making a game about space travel and combat in c++ , and i decided to use pixel art for the style. I drew all the assets (some of the characters are placeholder for now), and i coded the graphics in opengl. I also created a custom rigid body physics engine for the game.
r/GraphicsProgramming • u/qu8it • Dec 23 '24
Source Code My first RayTracer written in C and GLSL using openGL
r/GraphicsProgramming • u/MagicPantssss • Mar 25 '25
Made my first triangle in DirectX12
r/GraphicsProgramming • u/CharlesGrassi • 25d ago
Video I replaced the in-scattering in a cloud raymarch with a tiny neural network, then checked it against a path tracer
Light inside a cloud is expensive to get right, so games use a few simple formulas tuned until it looks good. I wanted to see how far off that really is, and whether a small network could do better.
I wrote a path tracer as the reference, trained a network on it in Python, and ran it in plain HLSL in Unity 6. It replaces one thing, the light scattered toward the camera at each step. Everything else in the raymarch stays the same.
Then I moved the sun from behind the camera to behind the cloud and scored both against the path tracer, where 1.00 is correct. The classic lighting goes from 0.21 to 2.17. The network stays between 0.90 and 1.01. It costs about 20% more GPU time.
I had a great time building this, and I think we've barely started finding out what tiny networks can do inside a shader. If you try one yourself, I'd love to see what you make!
r/GraphicsProgramming • u/Kooky-Advance7870 • May 22 '26
Experimental voxel renderer
I've been playing with a minecraft style voxel renderer. Current demo has about 11 different techniques to render large worlds as fast as possible.
Demo also has TAA, distance and height fog, shadow maps for directional and ambient cube with per voxel baked AO for ambient, tonemapping and sharpening.
Data is the kings landing model duplicated 100X to make the world bigger. I would ideally like a much larger mesh but memory usage is already quite high so it'll need to be optimize and potentially streamed in on demand. Screenshot is at about 7ms @ 1440p on a 5070 Laptop. Being in the corner so all 100 worlds can be scene is about 15ms. Still a huge amount of various optimizations to be done.
r/GraphicsProgramming
•
u/Zaeccis
•
Apr 09 '26
Combining 3D pre-rendered graphics with modern PBR+ pipeline in my custom engine
I really like the look of the pre-rendered 3d graphics (both old school and new!) so as a hobby project I've been building this game engine which combines pre-rendered graphics with modern PBR lighting and other rendering systems.
Some features:
Absolutely no 3D geometry, everything is 2d sprites rendered at 0.0 depth in clip space.
Modern PBR lighting with roughness/metalness adjustments for surfaces. Since there are no roughness/metalness textures the micro-detail for that is generated from color data. Overall strength is individually adjustable for each sprite
Has SSR, SSAO, bloom, and my own "large scale occlusion approximation thingy"
Supports sunlight, environmental lighting and reflections from HDRI maps and point lights which also approximate other lights via light field texture maps
Fog!
Support for "translucent" sprites with correct translucency ordering
Obviously to make this possible I need to have two sprite images for each object. The first one has the rendered color image and the second one has world-space normals. The main trick beyond that is to include in normal texture alpha channel a compressed height coordinate for each pixel. This allows building the height map for the scene at time of rendering which in turn allows all kinds of fake 3d calculations for lighting, ssao, object clipping etc. etc.
It has been fun figuring out what I can do with this. Pretty much all features need to be reworked compared to the "standard implementation" since those rely on the depth texture which I don't really have. (Technically I could approximate it from height map but that only has 256 distinct values which causes all kinds of artifacts)
Also, since this is a hobby project I wanted to write everything from scratch, including things like matrix libraries and PRNGs which has been really fun and has forced me to really learn how things work under the surface. Only dependencies of this project are wgpu for WebGPU api and winit for os window/input management.
I really quite like how this ended up looking. It also runs pretty well. I this scene with 50 000 individual sprites I get 100fps @ full hd with everything turned to max on my M1 MacBook. Disabling some of the effects so that rendering pipeline is raw sprite rendering + PBR lighting from sun and environment maps + bunch of point lights + bloom + tonemapping, I get 200+ fps.
Looking for ideas how to improve this further or what to implement next!
r/GraphicsProgramming • u/Street-Air-546 • Aug 04 '25
Video punishing yourself by not using libraries has advantages
25,000 satellites and debris, with position calculations in javascript (web worker ready, but haven't needed to use it yet as the calc phase still fits into one frame when it needs to fire), with time acceleration of x500 (so the calculations are absolutely not one and done!), and gpu shaders doing what they are good at, including a constant shadow-frame buffer mouse hover x,y object picking system, with lighting (ok, just the sun), can do optional position "trails" as well.
All at 60fps (120fps in chrome). And 60fps on a phone.
And under there somewhere is a globe with day/night texture mixing, cloud layer - with cloud shadows from sun, plus the background universe skybox. In a 2:1 device pixel resolution screen. It wasn't easy. I'm exhausted to be honest.
I've tried cesium and met the curse of a do-everything library: it sags to its knees trying to do a few thousand moving objects.
r/GraphicsProgramming • u/kwa32 • Nov 01 '25
Built a CUDA editor because I was sick of switching tools
I was using 4 sometimes 6 different tools just to write CUDA. vs code for coding, nsight for profiling, many custom tools for benchmarking and debugging, plus pen to calc the performance "I was cooked"
So I built code editor for CUDA that does it all:
Profile and benchmark your kernels in real-time while you code
Emulate multi-GPU without the hardware
Get AI optimization suggestions that actually understand your GPU "you can use local llm to cost you 0$"
It's free to use if you use your local LLM :D Still needs a lot of refinement, so feel free to share anything you'd like to see in it
r/GraphicsProgramming • u/AddiDan247 • Aug 24 '25
Cloth simulator using OpenGL
After completing most of the chapters on learnopengl, I decided to try building my own project. I ended up creating a cloth simulation using OpenGL. It was a really fun learning experience, and I wanted to share it here.
I’d also love to hear any advice or suggestions for what project I should tackle next.
Github repo: ClothSimGL
Thanks in advance.
r/GraphicsProgramming
•
u/TheAgentD
•
14d ago
A brand-new physically based SSAO technique: CORTAO, Circular Occluder Ray-Traced Ambient Occlusion, is now open source!
Hi, everyone!
Today I'm releasing CORTAO, a new physically based SSAO technique invented and developed by me, as open source.
https://github.com/theagentd/CORTAO
Circular Occluder Ray-Traced Ambient Occlusion, or CORTAO, is a brand new physically based ambient occlusion technique. Unlike existing horizon-based state-of-the-art techniques, CORTAO is based screen space raytracing with up to 32 rays per pixel, allowing it to avoid the inherent limitations of existing techniques. Through a combination of much better convergence and clever optimizations, CORTAO is able to achieve much better quality for the same performance cost as GTAO.
All this allows CORTAO to just work without any scene-specific tweaking at all regardless of the type of scenes, whether it's a simple indoor room, an open world with heavy foliage and vegetation, or a vast space scene with extreme depth range.
Compared to existing techniques such as GTAO:
CORTAO provides a never-before-seen level of physical accuracy rivaling that of brute-force hardware raytracing, while only relying on screen space information.
CORTAO handles depth discontinuities in complex scenes in a more conservative way, avoiding the view-dependent occlusion of GTAO and producing less obvious artifacts when screen space information is limited.
CORTAO at the same time has greatly improved convergence, producing much higher quality results at lower sample counts even for scenes where GTAO works well, which is especially important for low-end hardware.
What started as a fun little personal project two years ago has now grown into something much bigger than I could've ever imagined, with multiple collaborations and conference applications, most of which I cannot talk about publicly yet. The open source release of CORTAO marks an important milestone where I'm finally sharing my work with the world, but the work is far from finished. There's a long to-do list of improvements and extensions that I will be exploring over the coming months and maybe even years. I'd be honored if you checked it out, and if you have any questions, I'd love to answer them.
EDIT: AI disclosure: No AI was used in the development of CORTAO.
r/GraphicsProgramming • u/Brick-Sigma • Jan 18 '26
Hello World triangle in OpenGL and SDL3
Recently ordered the physical copy of the “Learn OpenGL - Graphics Programming” book to help stay consistent while learning OpenGL and support the amazing author who created it.
I’ve tried to learn it multiple times before but always gave up due to uni and assignments getting in the way, but now I’m going to enjoy flipping each page as I learn.
r/GraphicsProgramming • u/Veragon • Sep 08 '25
The First Law of Computer Graphics
This law is stated in the book Cartesian Coordinate Systems - 3D Math Primer for Graphics and Game Development. It also leaves the reader to think about it. Prior to this quote, it goes on a very long path about how even though continuous mathematics is useful, everything can be measured in a discrete manner. This inherently implies that computers also are limited to discrete and finite measurements.
Unpacking the law opens a box of arguments which are all going in the same parallell direction and are tightly coupled against each other, but with its slight thematically different aspects.
One example is the direct correlation between the finiteness of the universe and the virtual reality on the screen. Even though displays have a limitation of pixels, it is still so abundant such that the eye cannot distinguish virtual reality from, well, real reality. Under the right circumstances of course. Since everything is finite, the design of a virtual reality is by its nature finite as well. Although there are certain limitations, the minuscular difference does not alter our perspective enough. Virtual reality does not lie within the uncanny valley.
Thoughts?
r/GraphicsProgramming • u/Holtsetio • May 07 '25
I built this interactive WebGPU particle system inspired by the art of Refik Anadol
Hi reddit, I built this interactive particle system running in the browser using Three.js' WebGPURenderer.
It started as an implementation of MLS-MPM guided by u/matsuoka-601's great fluid simulation. Then the particle dynamics started to remind me of Refik Anadol's digital artworks, so I started to emulate his style instead of trying to render water.
Play with it in your browser here: https://holtsetio.com/lab/flow/ (You will need a browser that supports WebGPU, for example Chrome)
The code is available here: https://github.com/holtsetio/flow/
r/GraphicsProgramming • u/AapoL092 • Jan 20 '26
A black hole in my custom Vulkan path tracer
I have been building this for the last four months now. The specific black hole I'm modelling is A0620-00 but the disk size is reduced for artistic reasons and also the disk spins so fast it would be perfectly blurred to the human eye. But yea, ask away. I'll be happy to answer any questions!
r/GraphicsProgramming
•
u/Prudent_Student2839
•
Oct 19 '26
My game has no sprite images: every hero, monster and bullet is a list of strings, baked into textures at load
Of course, it’s a bit more complicated than just this, but you get the idea.
The lighting effect is created programmatically:
function lit(rows: string[], ramps: Record<string, string>): string[] {
const at = (x: number, y: number) => rows[y]?.[x] ?? ".";
return rows.map((row, y) => [...row].map((k, x) => {
const ramp = ramps[k]; // e.g. r: "qR" (robe: light q, dark R)
if (!ramp) return k;
const edge = (n: string) => +(n !== k);
const up = edge(at(x - 1, y)) + edge(at(x, y - 1));
const down = edge(at(x + 1, y)) + edge(at(x, y + 1));
return up > down ? ramp[0] : down > up ? ramp[1] : k;
}).join(""));
}
Also, typing big sprites letter by letter is slow, so some monster families are built from shape helpers (rect, polygon, oval) that rasterise onto the same grid and output the same strings.
Let me know if you have any questions.
Edit: the link to the game in case you want to check it out. It’s free no account needed: playmadlands.com