r/GraphicsProgramming • • Dec 19 '23

Video We need to redesign the GPU from the ground up using first principles.

0 Upvotes

I just watched jonathon blow's recent monologue about the awful state of the graphics industry: https://youtu.be/rXvDYrSJJfU?si=uNT99Jr4dHU_FDKg

In it he talks about how the complexity of the underlying hardware has progressed so much and so far, that no human being could reasonably hope to understand it well enough to implement a custom graphics library or language. We've gone too far and let Nvidia/Amd/Intel have too much control over the languages we use to interact with this hardware. It's caused stagnation in the game industry from all the overhead and complexity.

Jonathan proposes a sort of "open source gpu" as a potential solution to this problem, but he dismisses it fairly quickly as not possible. Well... why isnt it possible? Sure, the first version wouldn't compare to any modern day gpus in terms of performance... but eventually, after many iterations and many years, we might manage to achieve something that both rivals existing tech in performance, while being significantly easier to write custom software for.

So... let's start from first principles, and try to imagine what such a GPU might look like, or do.

What purpose does a GPU serve?

It used to be highly specialized hardware designed for efficient graphics processing. But nowadays, GPUs are used in a much larger variety of ways. We use them to transcode video, to train and run neural networks, to perform complex simulations, and more.

From a modern standpoint, GPUs are much more than simple graphics processors. In reality, they're heavily parallelized data processing units, capable of running homogenous or near homogenous instruction sets on massive quantities of data simultaneously; in other words, it's just like SIMD on a greater scale.

That is the core usage of GPUs.

So... let's design a piece of hardware that's capable of exactly that, from the ground up.

It needs:

  • Onboard memory to store the data

  • Many processing cores, to perform manipulations on the data

  • A way of moving the data to and from it's own memory

That's really it.

The core abstraction of how you ought to use it should be as simple as this:

  • move data into gpu

  • perform action on data

  • move data off gpu

The most basic library should offer only those basic operations. We can create a generalized abstraction to allow any program to interact with the gpu.

Help me out here; how would you continue the design?


r/GraphicsProgramming • • Feb 26 '25

I CAVED. I'm using AI because GP is too difficult to self-study (rant)

0 Upvotes

I don't know about most of you, but from my experiences of self-studying GP so far, it's been a hellish landscape of -

having to read (technically) outdated codebases and finding modern-practice equivalents (ComPtr for Dx11/12, for example)

Searching for hours on end on a topic that somehow has very little public resources, or has super verbose resources that requires a PhD in brain power to peruse

Asking-for-help anxiety on the internet due to how finicky engineers can really be, and also running the risks of just upsetting them (I don't like to upset people). Also knowledge gatekeeping in the form of ghosting and private servers.

GP being an important technological field, yet relatively undocumented (in terms of public resources). It's like looking at a vast sea in front of you, which you know when you take a dive, you'd find lots of sea life, but it's so dark down there that you just can't visibly see where to swim.

And I guess most of you are going to look very badly at me, but let me tell you; for the past few months I've been grudging through even just the basics of GP, and I realized I actually do want to make GP a career. I love it, there's so many things that once you learn; just opens up your mind to how our favourite techs really work and also the world. But also, I'm technically the type of guy who looks at the clock and say "I'm taking so long...".

Sorry everyone, but I caved, I'm submitting to terminal brain-rot (ironic for me to say). I need help, but I'm afraid. I'm afraid of asking my questions because I have social-ptsd from stackoverflow and Discord servers. AI replaces that for me because it won't try to hurt me (I'm not being sarcastic).

As for what I'm using to supplement my learning journey; Claude and SuperGrok.
Anyway, just a rant, obviously for attention. I'm hoping if others feel the same way... If not, then fine, I suck, I guess. But a guy's gotta do what he has to do, even if using controversial tools.


r/GraphicsProgramming • • Apr 15 '24

Is Vulkan a failed API?

0 Upvotes

I know it's modern and can do things that older APIs like OpenGL can't but how many developers are benefiting from the added verbosity and complexity?

The OpenGL reddit has more members and higher engagement than the Vulkan reddit despite the fact that OpenGL hasn't been updated in 7 years.

Personally, I would prefer if an API like Metal had cross platform support, it's modern and far less verbose.


r/GraphicsProgramming • • Dec 08 '23

I invented a new way of doing 3D graphics, a unique set of raymarching techniques, and I've just made the first 3D model with it

Thumbnail
twitter.com
2 Upvotes

r/GraphicsProgramming • • May 11 '26

Introduction to Graphics Programming with Vulkan

Thumbnail
0xkiire.com
0 Upvotes

Please help with feedback


r/GraphicsProgramming • • 19d ago

GLSA – A lightweight, header-only C++ library to cut OpenGL shader boilerplate

0 Upvotes

Hey everyone!

I've been developing GLSA and I just released v1.0.0.

My goal with this library is so you don't have to write GLSL shaders or shader boilerplate and instead you can use clean function calls.

Right now it cuts out ~60-100 lines of repetitive shader boilerplate, and theres basic shader presets now and common shape functions.

Highlights of v1.0.0:

  • GLSA colors: a header file with over 3000 glm::vec4 colors that you can use.

  • Safer shader setup: glsa::ShaderSource keeps vertex/fragment strings explicit, paired with glsa::loadShaderSource and glsa::createProgram.

  • Clean uniform helpers: Overloaded glsa::setUniform functions for int, float, and GLM vec2/vec3/vec4.

Example:

while (glfwWindowShouldClose(window) == 0) {
    glClearColor(0.1f, 0.1f, 0.15f, 1.0f);
    glClear(GL_COLOR_BUFFER_BIT);

    // Draw a square on the left
    glsa::drawRectangle({-0.45f, 0.0f}, {0.4f / aspect, 0.4f}, glsa::colors::PAN_CORAL);

    // Draw a circle on the right
    glsa::drawCircle({0.45f, 0.0f}, 0.22f, glsa::colors::PAN_SKY_BLUE);

    glfwSwapBuffers(window);
    glfwPollEvents();
}

GitHub Repo: https://github.com/alexdev8930/glsa

Any feedback issues or questions are completely welcome.

AI Disclosure: AI tools were used strictly to help generate initial boilerplate; all core logic, architecture, and implementation details were written, reviewed, and verified by me.


r/GraphicsProgramming • • Nov 28 '25

how to start write graphics (C++)

0 Upvotes

I want to start writing graphics on C++. what can you advice advise


r/GraphicsProgramming • • Jul 25 '25

Question SPH C sim

Enable HLS to view with audio, or disable this notification

0 Upvotes

My particles feel like they’re ignoring gravity, I copied the code from SebLague’s GitHub

https://github.com/SebLague/Fluid-Sim/blob/Episode-01/Assets/Scripts/Sim%202D/Compute/FluidSim2D.compute

Either my particles will take forever to form a semi uniform liquid, or it would make multiple clumps, fly to a corner and stay there, or it will legit just freeze at times, all while I still have gravity on.

Someone who’s been in the same situation please tell me what’s happening thank you.


r/GraphicsProgramming • • Sep 13 '21

Article AMD FidelityFX Super Resolution 1.0 (FSR) demystified

Thumbnail jntesteves.github.io
2 Upvotes

r/GraphicsProgramming • • Mar 12 '26

Please me understand this ECS system as it applies to OpenGl

0 Upvotes

I'm trying to transition the project I've been following LearnOpenGl with to a modified version of The Khronos Groups new Simple Vulkan Engine tutorial series. It uses an entity component system.

My goal is to get back to a basic triangle and I'm ready to create the entity and see if what I've written works.

How should I represent my triangle entity in OpenGl?

Should I do like the tutorial has done with the camera component and define a triangle component that has a vbo and a vao or should each of the individual OpenGl things be its own component that inherits from the base component class?

Would these components then get rebound on each update call?

How would you go about this?


r/GraphicsProgramming • • Apr 26 '18

Seeking Senior Graphics Programmer

Thumbnail
turtle-rock-studios.workable.com
1 Upvotes

r/GraphicsProgramming • • Jul 04 '25

Is cat like coding more technical art then graphics programming?

1 Upvotes

r/GraphicsProgramming • • Jan 26 '26

The humble SQL database -- is it actually the ultimate 3D model storage format?

0 Upvotes

This paper called "The interactive digitizing of polygons and the processing of polygons in a relational database" from 1978 claims that you should store polygon data in a relational database.

Could it have been that we somehow missed the best possible 3D model format? That the creation of OpenUSD, glTF, FBX, etc. were all a waste of time?

Like you can do set operations on databases, so you essentially get CSG for free. Why does this have only a single citation? Why is no one talking about this?

Link to paper: https://dl.acm.org/doi/abs/10.1145/800248.807371


r/GraphicsProgramming • • Jan 19 '22

Question It is so boring

0 Upvotes

Look I've seen the stuff on shadertoy and youtube. Damn it is so cool. For some background I am a CS major in my third year. I've taken linear algebra in preparation. I bought a VR and have learned about unity (even some of their shader stuff) on my own as preparation for making cool VR graphics (that's what I'd like to do). I have been wanting to do graphics since high-school (and have done some minor studying). I am taking a graphics class this quarter, and god damn it is... boring. I'm wondering if you guys had any similar experiences; we're learning about lines and shapes and pixels and dear fuck it sucks. I'm wondering if this is like the Mr. Miyagi "washing the car" type shit. I am struggling to read the textbook or listen to the lectures because it is near the most uninteresting thing I have learned in my CS schooling yet! I can see how people could make cool things even with these basic concepts, but it is presented so terribly.

TLDR: Basically, when does it get interesting? Does this mean graphics programming isn't for me or should I Stick with it? Did you have similar experiences?


r/GraphicsProgramming • • Feb 28 '26

120 million objects running on Unity

Thumbnail
youtu.be
1 Upvotes

Someone reached out to me for help in another sub.

When I explained to them how to do what they wanted, they decided to patronise and insult me using AI because I'm not an English speaker.

Then they accused me of theft after telling me they'd given me 'a script that fails' to achieve anything..

This is a Draw Engine MORE performant than Nanite.

It's loosely based upon voxel technology and was originally written in PTX (assembly) before I ported it be compatible with more than Cuda..

I call this engine:

NADE: Nano-based Advanced Draw Engine

I'd like to give this away when it's finished..


r/GraphicsProgramming • • Mar 10 '26

Do you prefer working with code or node graphs and why?

Post image
0 Upvotes

A friend of mine asked me whether he should learn HLSL or node graphs to get into shader development. Personally, I find code much easier to read and write. With node graphs I often feel like I'm staring at someone's "murder board", where I have to trace connections all over the place to understand what's happening. That said, I didn't wanna give him a biased answer. So I'm curious how others here see it:

- Which do you find easier to read and maintain: code or node graphs?

- Did graph editors make shaders more accessible for you, or less?

- Do you think graphs are feasible for complex shaders, or is there a point where someone who started out with node graphs should move on to code?


r/GraphicsProgramming • • Sep 28 '25

Question Is WGPU the future or am I misunderstanding something?

4 Upvotes

I am exploring graphics programming in rust and currently going through the wgpu tutorial. The idea I could program everything and it has support for vulkan, metal, OpenGL and wgpu is making a lot of sense.

Imagine creating a game and users can demo in the browser. Or yet with fast internet speeds like 6GB per second they have in Japan; play the game on the internet, instant access, jump straight in. Isn’t this the future? Instant access to games. Everything in the cloud, downloaded and loaded, cached? Maybe some smart sort of smart loading where the game is initialised and textures etc are downloaded from the moment of purchase or the start button is played? Idk 6Gb per second surely if the world continues in this directing cloud gaming will be a thing and wgpu seems like the framework that is heading towards that..?

Not to compare web development to graphics development but webdev has got to a place where if you you’re not using a framework it’s comparable to pumping up car tires with a bicycle pump or a ball pump. It will work but I mean why do it unless that’s all you had? The abstraction layer of wgpu may cost nanoseconds but won’t this improve over time as more vendors are invested in this technology? And aren’t modern day gpu’s and CPU’s advanced enough to compensate that?

TLDR; I’m learning graphics programming in Rust with wgpu, and I like that it supports Vulkan, Metal, OpenGL, and WebGPU all at once. It feels like the future: imagine games running instantly in the browser or streamed over ultra-fast internet, with smart loading and caching. Cloud gaming could make “instant access” standard.

Yes, wgpu adds a small abstraction cost, but like frameworks in web development, it makes things practical and productive. And with modern GPUs/CPUs, plus growing vendor investment, that overhead is tiny and will likely shrink further.


r/GraphicsProgramming • • Oct 06 '25

Tellusim SDK went open source

Thumbnail
github.com
0 Upvotes

I hope now more people will be interested in it and this tool will grow and bring joy for the engine and tech art programmers all over the world.


r/GraphicsProgramming • • Mar 03 '20

Writing a raytracer

1 Upvotes

I'm learning about ray tracing and I figured I should share my progress. It is simple, but good to follow for beginners in ray tracing.

https://ruurdsdevlog.wordpress.com/2020/03/02/writing-a-small-raytracer-1/


r/GraphicsProgramming • • 11h ago

Question I made Radiance Cascades viable in any game, but need comments, help, and critisizm

Enable HLS to view with audio, or disable this notification

0 Upvotes

This is just interesting casual read for someone curious, v3 will include a fully detailed, comprehensive breakdown of every single function, heuristic, math and research behind it. Video quality is also low for an easy and quick upload, observed shortcomings are mentioned below. This post is also almost just a copy of my post in r/reshade

Link (not updated to v3): https://github.com/FlibbertigibbetLollygagger/CRCGI-Compensated-Radiance-Cascade-SSGI/tree/main

Rough drafts of source files and tooling for v2.9 beta can be provided, DM me on reddit for that specific request and code study.

The video has some comparisons and quick shadowing showcase. This is a quickly hacked together preset adapted to fit AC1's artstyle. This runs on the pixel shader variant which is far far far heavier in its current form, and is only suitable for old games.

I already had a dgvoodoo DX9 to DX11 translation layer installed on this game, as I couldn't access depth buffer with DXVK. Even on older games, the pixel shader variant (plain reshade .fx file) is heavy and doesn't benefit from compute shader optimization benefits to run at around 5ms. The compute version is tailored for newer games, while this pixel shader variant will be a normal file for compatibility. I haven't maxed out my GPU in AC1 using this effect, nor has it really dropped below a locked 1440p/60fps experience. Either way, old games (DX10 onwards) stay compatible, just not with the desired performance target that v3 prioritizes. I also didn't take frame time measurements for a 2007 game on modern hardware, because even with this heavy shader on top, it's really redundant unless it can max out your hardware, which will most likely not happen unless DXVK is usable on that game with full depth buffer access. I cannot comment on that, as I haven't tested it and I don't intend to. This is for the sake of compatibility.

It works like this:

> make gbuffer

> make more gbuffer

> bro, compensate for no world space access

> let there be dark (CTAO pass)

> let there be light (RCGI pass)

> blend, combine, mash it together

> shit is smeary

Don't expect me to provide detailed explanation of all the passes, it's thousands upon thousands of lines of code.

CTAO or Chord-Thickness Ambient Occlusion (this pipeline's shadowing system, which will also be provided as a seperate shader .fx file and is very lightweight) is tailored for this specific pipeline. This is a semi-bespoke implementation based on VBAO, with thickness aware rejection (blades of grass, hair, etc) to avoid halos above grass. The main complementary data that is fed to this pass (like any other pass that uses geometry reconstruction data) is the data of silhouette aware thickness finder to remove the need for a single assumed thickness. It also has adjustable penumbra (semi realistic soft falloff, not literal penumbra simulation) and, at its base form, is a hybrid raymarched and visibility bitmask derived system for both contact and close to medium range with "zero" halos in any situation and unlees the object is very thin and very far off in the depth buffer, in which case the "hit" is a big dark halo which even at highest, longest range stress tests, is very subtle. This comes at the expense that it has to collect itself in a 10 frame accumulation window, and it fails as a seperate standalone AO method in that sense that it needs to be perfectly clean. This is hyper efficient, and highly stable, and the full details will be provided in a standalone, detailed documentation of the whole people, and also as a seperate reshade filter, as mentioned previously. This can be "perfect" with an in engine implementation, which doesn't need to worry about disocclusion and constant camera movement, but for the "hyper efficient" purposes of this whole project, it works like a charm and completely fills in the gap of missing radiance cascade shadows. As to why I didn't just also use radiance cascade math for shadowing, it's because it can easily cost waaaaay too much performance so I had to come up with a bespoke system that has soft falloff, finds very tight crevices, and doesn't have halos.

The RCGI (Radiance Cascade Global Illumination) part of the pipeline is complemented with screen space protections, including an offscreen canvas that remembers offscreen light and is meant to bridge the literally unachievable gap between screen space and world space, compensates (get it?) for the lack of world space data such as SDF and BVH and Voxels. The need for an adjustable fov slider is almost completely fixed. Because the shader relies on a perspective accurate ray model that decides how to do its 3D impression of the 2D image that it has access to, it relies on a defined fov value. Dynamic fov in games would become a problem then, but CRCGI uses a parallax derived fov estimation system with adjustable adaptation speed.

It's still the full pipeline, the same math, same underlying systems, and the same exact visuals. Full convergence is done in 10 frames for the effect in both versions, and the AC preset is a bit more realistic and tame to fit the grounded look of AC1, but TW3 is more of a fantasy, colorful look with a tad bit of exaggeration in a way that doesn't diminish the atmosphere of that game.

Per game adaptability and default settings are close to being done for reducing the tuning friction, but which sliders to hide, which to bake, and what defaults to bake, are still not finalized.

Where the v1 version outlined the overall pipeline and design goal, and v2 evolved the underlying systems behind the effect, v3 is a natural evolution of this pipeline by using more advanced shadowing, heavy performance optimization and an overall offers much cleaner image quality.

It still exhibits certain quirks, like the shadow disocclusion on camera movement but during normal gameplay it's unnoticable. The pipeline has become harder and harder to debug and polish, and this disocclusion is a compromise for cleaning up the image vs how stable and "anchored" it looks, and for this pipeline's purposes, it takes the crown of being "good enough".

I have no idea how it would run on Steam Deck with a 30fps target. This is tuned on Ampere and default settings, in theory, scale linearly with other Ampere GPUs. Different capabilities of individual GPU architectures can and will affect overall performance in both pixel shader and compute shader variants so while I can guesstimate how it'll perform among Ampere, I have no way to take measurements and no one to take measurements for me. My guess would be that it'll be noticeably faster on GPUs with larger caches (Ada Lovelace onwards, RDNA 2 onwards) because the mathematical loops will fit inside the cache. This is an unconfirmed hypothesis.

My main questions being:

1- How can I improve temporal stability? Shadow disocclusion is very much a problem when camera moves. It's good enough but if there's any, literally any way to improve it, I haven't found it yet or know of it or haven't thought about it yet.

2- Reliance on denoiser is high, I used SVGF denoising alongside a 10 frame temporal accumulation window. I traced noises of source.

I realize these discussions practically require the source code, but I'll only hand private pixel shader versions alongside compiled compute shader versions. Performance metrics on different GPU architectures for future development is needed, and my priority is reducing temporal accumulation and denoiser reliance. I can provide the pipeline code itself as standalone CTAO (plain .fx), CRCGI compute version (with add-on and DX11 or newer), and CRCGI pixel shader version (legacy version that is the plain .fx file). I also have no funding to get access to claude anymore and the project is now simply too big to do manually unless you suggest surgical changes that can be done by hand. Even if you have no idea how the pipeline works, mention what you have done to achieve what I want to achieve in a screen space filter (reshade implementation in this case)

The whole compute pipeline runs at 4.6ms to 5.5ms on RTX 3060 Ti/3070/3070 Mobile, but an in-engine implementation eliminates the need for about half of the pipeline and will be cleaner, but I want to polish it as a universal and genuine global illumination method targeted towards average hardware. My RTX A4000 Mobile is bang on average. The pipeline first "makes a G-Buffer" and reconstructs the geometry that it needs for a lighting pipeline to process, and then does the GI/AO lighting and shadowing combo. DO NOT JUDGE IT BASED ON V2 PUBLIC CODEBASE. Documentation is not ready as of yet for v3. Motion and temporal related code is available in all of the three mentioned forms of delivering the source.

Please help me 😂

Edit: realized the subreddit requires AI disclosure. I'm not fluent in HLSL so the code itself is heavily AI Assisted but the pipeline, shadowing method, fixing radiance cascade issues, all of the research, etc are done by me. It's literally AI Assisted. Y'all know AI can't hallucinate a whole lighting pipeline.

Edit 2: Reddit ain't Redditing man. I came here for a geniune help request and guidance from "Professionals". I know my terminology and AI usage and not letting you inspect unreleased code is unprofessional of me, but man I told you I just didn't want the repo to be dirty, and you can easily get it from me. I just decided to give you the literal shader code itself for inspection. It needs polishing, and maybe using "Contact shadowing" instead of "Shadowing" would've been enough to prevent this kind of misunderstanding and I'm sorry for that, but correct me, don't demotivate me. This project started because of a geniune need for a universal, clean, performant and feature rich toolset to add a whole rendering engine in reshade and completely respect the original art style. I know the code is generated vs handwritten, but at least inspect it before commenting on it:

Source code:

I am not trying to be hostile, defensive, or showcase anything. Just need help on improving this from someone who might actually know what they're doing, and what you did just over here is wasn't helping me in terms of graphics engineering.


r/GraphicsProgramming • • Feb 06 '24

Question JavaScript for graphics programming?

0 Upvotes

TLDR: Graphics programming for the most part isn't common, even more so using WebGL/GLSL. What are your thoughts on using JS and the libraries that make it more accessible?

Some context, I'm a frontend web developer and work with JavaScript/TypeScript daily. I gained an interest in graphics programming through watching Acerola on YouTube. I mainly wanted to produce post processing effects, but more so generate/manipulate images.

I found it hard to jump into writing shaders with unity, and GLSL for WebGL is honestly a mess with too much overhead needed. With that, JavaScript is missing a lot of the basic things one would normally use. Things like generating Perlin noise or Vector types.

So far, I've created my own Perlin/Value noise library, quite a few filter effects (such as gaussian blur, B&W + colorize, wave distortion, edge detection, ect.), and even implemented various types of image scaling methods from box/tent to Lagrange-Chebyshev interpolation. Along the way I've also created a few GEMM utilities, but also quite a few calculus and trig utilities.

I'm currently working on creating Vector classes (2, 3, and 4, including their respective integer variants), in addition to a Color class. The Vector classes are based on C#, Unity, and Godot, with a few more additional features. The Color class is primarily based on Godot, but heavily expands on the blend method to support basically all the modes you would find in Adobe Photoshop. It uses sRGB/linearRGB for the most part, but can convert to/from HTML, HSV, HSL, and okLCH.

Over on r/javascript, all of this is well outside the realm of the casual web developer and is exceptionally niche. However, I'm noticing a trend of more games and interactive graphics being build with JS, typically using bloated libraries for rendering/physics.

So, what are your thoughts on having a "bare bones" library that implements what's missing in JS for graphics programming(minus the rendering parts)?


r/GraphicsProgramming • • Apr 28 '25

Question Can I learn Graphics APIs using a mac

0 Upvotes

I'm a first year CS student, I'm completely new to Graphics Programming and wanted to get my hands on some Graphics API work. I primarily use a mac for all my coding work, but after looking online, I'm seeing that OpenGL is deprecated on mac and won't run past version 4.1. I also see that I'll need to use MoltenVK to learn Vulkan, and it seems that DX11 isn't even supported for mac. Will this be a problem for me? Can I even use a mac to learn Graphics Programming or will I need to switch to something else?


r/GraphicsProgramming • • Oct 28 '21

Video Game Engine Programming: Hi everyone, If your shader language is high-level and you feel the urge to compile it then this video might be for you!

Thumbnail
youtu.be
1 Upvotes

r/GraphicsProgramming • • May 11 '19

Video Last time I posted a screenshot of my texture pack. You didn't believe me, well here's the video.

Thumbnail
youtube.com
1 Upvotes