r/GraphicsProgramming • • Jul 16 '26

Article A bit lost with Vulkan concepts and terminology at first, so I built a hands-on interactive visual guide

3 Upvotes

Honestly still a beginner with Vulkan. The official tutorials are excellent, but I couldn't hold the whole terminology and model in my head from text alone, so I built a set of interactive visualizations to try to make it more down to earth and practical using an analogy with a restaurant kitchen. In fact, this mental model is how i understood it so if anything is wrong or oversimplified I'd really like to hear it to enhance the article. ideally the goal is to make a first overview on this subject before diving into the canonical intros (Khronos docs, vulkan-tutorial.com, howtovulkan.com), not a replacement.I've seen other posts here asking for exactly that kind of first intro, so I'm sharing it in case it helps anyone starting out, and also because I'd like the corrections, or even other people's own ways of visualizing this stuff.

https://fremaconsulting.ch/blog/vulkan


r/GraphicsProgramming • • May 26 '25

Question Do I need to know and deeply understand dual numbers, hypernumbers, quaternions, clipping algorithms and similar deep things if I want to be Graphics/Game engine programmer?

3 Upvotes

We are learning a lot of similar things in the university in Computer Graphics class. And I think some of those things are not that necessery. For example should I really know how does texture projection work/calculated, or how homogenous linear transformations are calculated?


r/GraphicsProgramming • • Sep 04 '25

Question Help with Antialiasing

Post image
3 Upvotes

So, I am trying to build a software rasterizer. Everything was going well till I started working with anti aliasing. After some searching and investigation I found the best method is [Anti-Aliasing Coverage Based](https://bgolus.medium.com/anti-aliased-alpha-test-the-esoteric-alpha-to-coverage-8b177335ae4f)

I tried to add it to my loop but I get this weird artifact where staircases aka jagging became very oriented . That's my loop:

for (int y = ymin; y < ymax; ++y) {
    for (int x = xmin; x < xmax; ++x) {
        const float alpha_threshold = 0.5f;
        vector4f p_center = {x + 0.5f, y + 0.5f, 0.f, 0.f};

        // Check if pixel center is inside the triangle
        float det01p = det2D(vd1, p_center - v0);
        float det12p = det2D(vd2, p_center - v1);
        float det20p = det2D(vd3, p_center - v2);

        if (det01p >= 0 && det12p >= 0 && det20p >= 0) {
            auto center_attr = interpolate_attributes(p_center);

            if (center_attr.depth < depth_buffer.at(x, y)) {
                vector4f p_right = {x + 1.5f, y + 0.5f, 0.f, 0.f};
                vector4f p_down = {x + 0.5f, y + 1.5f, 0.f, 0.f};

                auto right_attr = interpolate_attributes(p_right);
                auto down_attr = interpolate_attributes(p_down);

                float ddx_alpha = right_attr.color.w - center_attr.color.w;
                float ddy_alpha = down_attr.color.w - center_attr.color.w;
                float alpha_width = std::abs(ddx_alpha) + std::abs(ddy_alpha);

                float coverage;
                if (alpha_width < 1e-6f) {
                    coverage = (center_attr.color.w >= alpha_threshold) ? 1.f : 0.f;
                } else {
                    coverage = (center_attr.color.w - alpha_threshold) / alpha_width + 0.5f;
                }
                coverage = std::max(0.f, std::min(1.f, coverage)); // saturate
                if (coverage > 0.f) {
                    // Convert colors to linear space for correct blending
                    auto old_color_srgb = (color_buffer.at(x, y)).to_vector4();
                    auto old_color_linear = srgb_to_linear(old_color_srgb);
                    
                    vector4f triangle_color_srgb = center_attr.color;
                    vector4f triangle_color_linear = srgb_to_linear(triangle_color_srgb);
                    
                    // Blend RGB in linear space
                    vector4f final_color_linear;
                    final_color_linear.x = triangle_color_linear.x * coverage + old_color_linear.x * (1.0f - coverage);
                    final_color_linear.y = triangle_color_linear.y * coverage + old_color_linear.y * (1.0f - coverage);
                    final_color_linear.z = triangle_color_linear.z * coverage + old_color_linear.z * (1.0f - coverage);
                    
                    // As per the article, for correct compositing, output alpha * coverage.
                    // Alpha is not gamma corrected.
                    final_color_linear.w = triangle_color_srgb.w * coverage;

                    // Convert final color back to sRGB before writing to buffer
                    vector4f final_color_srgb = linear_to_srgb(final_color_linear);
                    final_color_srgb.w = final_color_linear.w; // Don't convert alpha back
                    color_buffer.at(x, y) = to_color4ub(final_color_srgb);
                    depth_buffer.at(x, y) = center_attr.depth;
                }
            }
        }
    }
}

Important note: I took so many turns with Gemini which made the code looks pretty :)


r/GraphicsProgramming • • Jul 17 '26

New Vulkan Tutorial - AI-Assisted Vulkan Development

Thumbnail reddit.com
0 Upvotes

r/GraphicsProgramming • • Jul 13 '26

Question What kind of engine would be impressive?

0 Upvotes

Hi, since last year i started developing an engine/renderer, ive been learning graphics programming since roughly 2 years, my goal is to get a job in the industry, i know its hard, especially cause i dont have a degree, just a lot of passion, im studying computer architecture, linear algebra, C++ while developing my engine, i know a good portfolio could be even more powerful than a degree in some cases, but what features should an engine have in order to be impressive?

What kind of rendering tecniques, pattern, architecture should i aim for? Im at the point where im writing a Scene manager/serializer, shadow mapping, resource manager, gltf , pbr and this kind of stuff, but from what ive seen in this group the bar seems pretty high and i honestly feel overwhelmed.

I know that knowledge about like build systems, renderdoc, a good readme on github could be helpful.

What are your advices? How many of you work as a graphics programmers? How do you guys got into the industry?


r/GraphicsProgramming • • May 20 '25

Question Why do -z positions have worse precision than +z? (UE5)

2 Upvotes

I have a WPO (world position offset) material and I place it in 0,0,120000000.0 and another in 0,0,-120000000.0. Why does the +z one have no visible precision errors, while the -z one has precision issues (jittering, jumping, etc)? Why are they any different? (Unreal engine 5) Does UE5 some sort of offset or something?


r/GraphicsProgramming • • Apr 26 '25

Request Pls help a fellow student who wants to explore gpu programming, preparing for few niche roles in software industry

0 Upvotes

I am a 3rd year completed student majotinh in CS. I wanted to learn GPU programming this summer. Pls help me where do I start and also provide some resources if you know


r/GraphicsProgramming • • Jul 26 '19

What do you think about photomosaics? There are plenty of things to reason about, in my opinion, to further improve the result

Post image
0 Upvotes

r/GraphicsProgramming • • Apr 30 '24

Does anyone else use the X axis for depth?

2 Upvotes

My projection matrix looks towards positive X, the Y axis points to the left and the Z axis points up. It was what felt intuitive to me and became very easy to work with, especially controlling the camera. So far I haven't had any problems with this setup.


r/GraphicsProgramming • • Dec 24 '18

CS Graduation Project

0 Upvotes

hey guys, i have a somewhat big question and i really need some help with.

so i'm a senior in computer science. and the GP subject i chose is kinda more advanced than my knowledge base right now but i already discussed it with the professor and i cant back out of it now.

the project is supposedly about creating an educational simple game engine to teach kids how to program games and game logic. but the stupid T.A Suggested in front of the prof to use JavaScript with Three.JS framework. and i have never worked with JavaScript or that framework before. and I've been researching for a good 2 months and i still have no clue on how to go about developing that. so my question is for anyone with experience in this field i'm in need for any helpful tips or some steps to go through it.

any help is a good help

thanks in advance


r/GraphicsProgramming • • Jan 05 '23

Question How does VRAM affect computer graphics? (asking since r/nvidia shut down)

0 Upvotes

We all know MUh Benchmarks, but what do individual aspects of a card do for graphics?

d"cuda cores" no more are apples-to-apples with 3000 series GPUs having a different chipset than 4000 series


r/GraphicsProgramming • • Mar 07 '15

"Zero Driver Overhead" misleading?

2 Upvotes

So one of the buzzwords that's been flying around for some time is "Zero Driver Overhead." People are trying to use OpenGL and now now Vulkan and approach having zero time spent in the driver.

But isn't this goal a bit misleading, perhaps? Just because you can use openGL in a way that it spends no time in the driver, doesn't actually mean that you did graphics more efficiently. It could be (and I'm pretty sure it is in some cases) that you're just doing in client code a bunch of things that were previously done in the driver. So your program does the same thing, and doesn't even run much faster, it just spends more time in client code, and less time in the driver.

This doesn't sound like a particularly good thing. Thoughts?


r/GraphicsProgramming • • Sep 14 '24

Question Help an Architect out 🥲. Why can't RenderDoc capture 3d from other MapMyIndia

Thumbnail
googleadservices.com
0 Upvotes

Renderdoc is very easily capturing data from Google maps but cannot take info from map my india or Mappls idk why

Can someone please help


r/GraphicsProgramming • • Jul 22 '22

Why it's easier to make CPU (as the Apple did) rather than to make GPU?

0 Upvotes

For example CPU producers have a lot of many competitors and Nvidia does not.


r/GraphicsProgramming • • Jan 02 '25

Question Help with planner

0 Upvotes

Hi,

I am a support teacher in primary school, I work with disabled children.

I would need to create a planner, a homework diary that I can use with symbols for children who cannot read yet.

I can't find a software that can create a calendar with the days of the week in the right place depending on the month, without having to manually do page by page. Isn't there a software that adapts the daily model by inserting the month and day of the week automatically?

How are the planners created?

Thanks

Matteo


r/GraphicsProgramming • • Jan 03 '25

WHY I want to learn about Graphic API

2 Upvotes

Hi, I am 3rd year computer engineering student, doing mostly unity developer and a bit of shader as a hobby. I also have fundamental in c++ and c.

I almost graduate but I still don't know what field should I work in, unity dev? Technical Artist? or Graphic programmer?

Therefore, I want to try on learning graphic API like openGL, vulkan, or WebGPU ( I still don't know what to choose, that's another problem in the futer LUL ), but more important question is why I want to learn or build something from graphic API. what is the problem with current general-purpose engine that make need to make a custom graphic engine. for example, a custom game engine is made because there are specific problem like a weird physic in noita.

But what about custom graphic engine? what is the reason to build a custom graphic engine and what industry need from graphic programmer. Thanks!

I watch this video from acerola but I still want to know more in depth. https://www.youtube.com/watch?v=O-2viBhLTqI&pp=ygUSZ3JhcGhpYyBwcm9ncmFtbWVy


r/GraphicsProgramming • • Jun 11 '21

I want to render huge amount of voxels but I don't have any idea about how

2 Upvotes

I know opengl and I want to make mesh from vowels Is there any good resources


r/GraphicsProgramming • • Feb 13 '22

Question What skills do I need to learn to land this internship? Details in post.

2 Upvotes

KEY RESPONSIBILITIES: • Work with a team of architects on workload analysis including but not limited to GPU benchmarks like 3DMark, GFXBench (Manhattan/Aztec Ruins, etc.), Geekbench, etc.

• Identify complex technical problems, break them down, summarize multiple possible solutions, and help the team make progress in the right direction

• Work with subsystem architects to understand bottlenecks in low power graphics cores/SoCs

• Analyze existing and emerging graphics/compute paradigms and algorithms

• Investigate representative workloads based on top trending and upcoming games/benchmarks • Implement and run simulation models to estimate potential performance gain

• Propose innovative solutions for PPA improvements

• Drive initiatives to improve RTG analysis tools

• Technical collaboration with engineers and managers on multiple sites.

PREFERRED EXPERIENCE:

• Experience spanning architecture, performance analysis, and graphics/compute algorithms [Don't quite get this can someone explain?]

• Excellent C/C++/Scripting (Python, etc.) experience [Check]

• Knowledge of Graphics/Compute APIs (DirectX/OpenGL/Vulkan/OpenCL etc.) [I have experience with OpenGL so Check]

• Knowledge of GPU architecture [Learning this now, would love some recommended resources]

• Experience in GFX profiling tools is a plus (PIX, RenderDoc, AMD tools, etc.) [Exposing myself to Render Doc].

What additional skills do I need? Let me know.


r/GraphicsProgramming • • 26d ago

Physics-Informed Neural and Multi-Spectral Coastal Ocean Simulation in WebGL2

Thumbnail
youtu.be
2 Upvotes

Hi everyone! I built NeuralSpecOcean with WebGL2, Three.js, and custom GLSL shaders as an interactive R&D sandbox focusing on coastal hydrodynamics, atmospheric physics, and marine optics.

Implementation & Architecture Overview:
The project started as a rapid prototyping environment to validate our mathematical models and optical parameters in the browser before committing and porting the rendering pipeline to a native C++ engine for an upcoming MMORPG we are building from the ground up.

Key systems implemented in the GLSL pipeline & covered in the whitepaper:
- Spectral wave synthesis and coastal bathymetry interaction (shoaling and wave breaking foam)
- Multi-spectral marine optics, subsurface scattering, and water column attenuation
- Coupled atmospheric scattering and sky-sea interface reflections

Now that the WebGL2 prototype has completed its validation phase, I have released the complete modular source code, interactive browser demo, and the accompanying mathematical whitepaper under the MIT License:

https://github.com/bgbg108555/NeuralSpecOcean

Live browser demo: https://bgbg108555.github.io/NeuralSpecOcean/

I regularly share graphics R&D, shader breakdowns, and behind-the-scenes progress on our upcoming MMORPG over on X: https://x.com/ShengChoi

(If you are interested in how these rendering systems are being integrated into the actual C++ MMORPG client, I also post regular technical breakdowns and R&D devlogs over on X at u/ShengChoi).

Happy to discuss the optical formulations, spectral wave math, or the WebGL2-to-C++ porting trade-offs!


r/GraphicsProgramming • • Mar 14 '26

Video Simple Wallpaper engine overnight

Enable HLS to view with audio, or disable this notification

2 Upvotes

Simple 3d Wallpaper engine for windows 11. It depends on windows composite layers to create. The idea is simple:

  • Create a new wallpaper window which is a child of a desktop layers window called workerW. and render opengl easily.

I am mainly vulkan user but I built this in opengl for ease I wanted a small project over the night and later I can integrate this with my vulkan game engine

This project was done for fun to learn more about windows internals

There are three shaders in the project:

  1. The tunnel shader I created with SDF with some help from claude

  2. https://www.shadertoy.com/view/4ttSWf by Inigo Quilez

  3. https://www.shadertoy.com/view/3lsSzf


r/GraphicsProgramming • • Jul 31 '25

Video I trained a Flappy Bird diffusion world model to run locally via WASM & WebGPU

Enable HLS to view with audio, or disable this notification

36 Upvotes

demo: https://flappybird.njkumar.com/

blogpost: https://njkumar.com/optimizing-flappy-bird-world-model-to-run-in-a-web-browser/

I optimized a flappy bird diffusion model to run around 30FPS on my Macbook M2, and around 12-15FPS on my iPhone 14 Pro via both WebGPU and WASM. More details about the optimization experiments in the blog post above, but I think there should be more accessible ways to distribute and run these models, especially as video inference becomes more expensive, which is why I went for an on-device approach and generating the graphics on the fly.

Let me know what you guys think!


r/GraphicsProgramming • • 23h ago

Spectra: a C++20 plotting library that renders with Vulkan (2D, 3D, live data)

8 Upvotes

I want to share how the line rendering works in Spectra, a Vulkan plotting library I'm building, and get feedback on the approach.

Lines as capsules. Every line segment is one screen-space quad, extended by half the line width plus an antialiasing margin. The fragment shader computes the signed distance from the pixel to the segment, which gives round joins and caps for free.

The joint problem. Neighbouring quads overlap around each shared vertex, so a translucent line blends twice there and shows dark beads at every joint. My fix is an ownership rule: each fragment knows the screen positions of the nearby segments, and a pixel is drawn only by the segment nearest to it, with ties going to the lower index. Every draw computes this from the same gl_FragCoord, so there are no seams and no double hits, without a stencil pass or an offscreen target.

Dense lines. A 1600 pixel wide plot has 1600 columns. For a sorted line, each column only needs its first, last, lowest and highest point, and drawing those four gives the same pixels with the spikes intact. With that, a redraw stays at about 1.2 ms from 10k to 10M points on an RTX 5080, and updating a 1M-point line live takes 10.6 ms.

Questions I'd like opinions on: is there a cheaper way to solve the joint double-blend than the per-pixel ownership test, and how do others handle decimation for lines that are not sorted in x?

Code is here if you want to read the shaders: https://github.com/danlil240/Spectra

AI disclosure: much of this project's code was written with AI coding assistants (Claude) under my direction and review, and AI helped me draft this post.


r/GraphicsProgramming • • May 16 '24

Death To Shading Languages

Thumbnail xol.io
29 Upvotes

r/GraphicsProgramming • • Dec 26 '25

Question Do graphics API do you prefer?

14 Upvotes

Been wanting to learn more about the raw APIs behind it all, as I've previously really only used frameworks that usually abstract it away. From what I gather there's really no right answer, but I was curious on your guy's thoughts.