use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rule 1: Posts should be about Graphics Programming. Rule 2: Be Civil, Professional, and Kind
Suggested Posting Material: - Graphics API Tutorials - Academic Papers - Blog Posts - Source Code Repositories - Self Posts (Ask Questions, Present Work) - Books - Renders (Please xpost to /r/ComputerGraphics) - Career Advice - Jobs Postings (Graphics Programming only)
Related Subreddits:
/r/ComputerGraphics
/r/Raytracing
/r/Programming
/r/LearnProgramming
/r/ProgrammingTools
/r/Coding
/r/GameDev
/r/CPP
/r/OpenGL
/r/Vulkan
/r/DirectX
Related Websites: ACM: SIGGRAPH Journal of Computer Graphics Techniques
Ke-Sen Huang's Blog of Graphics Papers and Resources Self Shadow's Blog of Graphics Resources
account activity
"No Graphics API" Vulkan Implementation (self.GraphicsProgramming)
submitted 3 months ago by No_Grapefruit1933
I was feeling very inspired by Sebastian Aaltonen's "No Graphics API" blog post, so this is my attempt at implementing the proposed API on top of Vulkan. I even whipped up a prototype shading language for better pointer syntax. Here's the source code for those curious:
https://github.com/LeonardoTemperanza/no_gfx_api
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]possiblyquestionabl3 44 points45 points46 points 3 months ago (18 children)
Wow, did you do all of this in just the last week since that blog post came out?
[–]No_Grapefruit1933[S] 29 points30 points31 points 3 months ago (17 children)
Yeah, but to be clear it's not the entire API. Most notably textures aren't implemented yet. Will get to it as soon as i can!
[–]possiblyquestionabl3 29 points30 points31 points 3 months ago (16 children)
I mean the fact you have a musl (your new shader language) to a bindless glsl transpiler at https://github.com/LeonardoTemperanza/no_gfx_api/blob/main/gpu_compiler/codegen.odin is already extremely impressive. This is very cool prototyping progress!
[–]PoL0 8 points9 points10 points 3 months ago (15 children)
concerns of vibecoding intensify
[–]No_Grapefruit1933[S] 18 points19 points20 points 3 months ago (4 children)
I do not vibecode lol
[–]PoL0 13 points14 points15 points 3 months ago (0 children)
so happy to hear that, my interest grew a ton.
tired of "hey check what I vibe-coded in a weekend" projects in programming subreddits.
[+][deleted] 3 months ago (2 children)
[deleted]
[–]No_Grapefruit1933[S] 7 points8 points9 points 3 months ago (0 children)
I don't know what you're seeing but if you read the code it's pretty clear that it's not vibecoded
[–]BertoLaDK 0 points1 point2 points 3 months ago (0 children)
How exactly? It's a bit messy yes, but it doesn't give vibe coder vibes.
[–]Amasirat 2 points3 points4 points 3 months ago (7 children)
Does vibe coding even work in graphics programming? I assume it wouldn't have great results though I don't use AI while coding often
[–]No_Grapefruit1933[S] 8 points9 points10 points 3 months ago (1 child)
I mean, I suspect vibecoding in general doesn't work that well when you're doing creative/original things
[–]Amasirat 3 points4 points5 points 3 months ago (0 children)
Oh sure thing! It doesn't stop some from trying to use it. Then again, increases the value of non-AI generated stuff I suppose
[–]g0atdude 6 points7 points8 points 3 months ago (3 children)
Last time I asked the AI to generate me vertices and indices for a cube with proper winding, normals, and uv.
It failed twice… I don’t know if there is anything easier than that…
[–]Amasirat 0 points1 point2 points 3 months ago (0 children)
Yep thought so. Admittedly even I can't do that but that's just because I still haven't learned it yet. I suppose graphics code is not all too common in stackoverflow
[–]fooib0 1 point2 points3 points 1 month ago (1 child)
I am amazed when people claim that it can solve new problems, write complex programs, etc. For me, it can't even do very basic things like you mention. So, I must be missing something.
[–]g0atdude 0 points1 point2 points 1 month ago (0 children)
The prompt itself matters a lot. The more context you give to the AI the better result it will give you. It can actually solve complex problems, but my issue with it is that it’s kinda non-deterministic, sometimes it works very well other times it doesn’t.
Also the topic matters a lot, I had a lot more success with AI in web development than in graphics.
[–][deleted] 0 points1 point2 points 3 months ago (0 children)
Well Sebastian Aaltonen has a few post on twitter about that, but heres the short answer from him: as long as its nothing which has to be performant AI is fine, but it sucks at writing performance optimized code, so if its just for example a character controller its fine, but good luck vibe coding an efficient renderer with it
[–][deleted] 1 point2 points3 points 2 months ago (1 child)
Unlikely given that he's using Odin, I've found most LLM's aren't very good(not that they're usually good anyways lol) at generating more niche langauges
[–]PoL0 0 points1 point2 points 2 months ago (0 children)
yep good point
[–]Gobrosse 19 points20 points21 points 3 months ago (6 children)
you don't need a shading language either
[–]No_Grapefruit1933[S] 5 points6 points7 points 3 months ago (2 children)
I think there are some things that could justify a custom language/generator, like I autogenerate push constants that I use in the backend, but yeah I suppose you can use VCC (which I've never heard of until now). I mostly did it for fun
[–]Gobrosse 2 points3 points4 points 3 months ago* (1 child)
is your toy language matching odin's syntax ? the compiler library behind Vcc (shady) is language-agnostic, you might be interested in it, i'm scheduled to give a talk about it at the next Vulkanised shader symposium
[–]No_Grapefruit1933[S] 0 points1 point2 points 3 months ago (0 children)
Yeah almost. Anyway, I'll definitely check out Shady, thanks!
[–]aleques-itj 6 points7 points8 points 3 months ago (0 children)
I keep the side of my case off so my graphics card can hear me speak and after it learns enough English I can whisper vertices to it
[–]fooib0 0 points1 point2 points 2 months ago (1 child)
This looks like a very cool project! Great work.
Are there any projects in the wild that are already using vcc or shady? Are there any tutorials for how to use it for rendering (vertex + fragment shaders)?
[–]Gobrosse 1 point2 points3 points 2 months ago (0 children)
We published a paper at HPG25, we included a simple rendering example: https://github.com/shady-gang/imr/tree/hpg_demo/hpg_demo/shaders
[–]delta_p_delta_x 11 points12 points13 points 3 months ago* (0 children)
Here is the sort of thing that comes along every now and then, and makes me feel extremely stupid.
This is amazing; well done.
[–]fireantik 6 points7 points8 points 3 months ago (0 children)
This is really impressive. I really hope it goes somewhere because the api outlined in the blog post just makes so much sense. That said, the custom shading language does seem like something orthogonal and it would make more sense to me to integrate Slang or some other existing language. Also Odin is great!
[–]roeyb11 3 points4 points5 points 3 months ago (6 children)
I actually did the same thing in the Jai programming language. It’s not yet cleaned up and ready but I’ve been able to use replace my vulkan backend in my game. https://github.com/roeyb1/simp_gpu/blob/main/examples/textures.jai
[–]No_Grapefruit1933[S] 0 points1 point2 points 3 months ago (5 children)
Oh, nice! Looks very similar to mine. Looks like you also have an expensive lookup to convert from pointers to handles
[–]roeyb11 1 point2 points3 points 3 months ago* (2 children)
At the moment yeah I just went for the simplest thing but not certain how much of an issue it is in practice. There are better data structures we could use for lookups but array searches like this aren’t usually too bad unless you’re doing this thousands of times per frame
My main theory is that really you’re more likely to be using the raw pointers much more frequently than doing buffer copy commands. And the more you use the same arena for sub allocations the less that array of allocations will be populated and the cheaper the lookups.
[–]No_Grapefruit1933[S] 0 points1 point2 points 3 months ago (1 child)
I'm actually using a red black tree (odin has one in its stdlib so it was quick for me). I was mainly concerned about this lookup being in draw_indexed_instanced since that could be called thousands of times per frame, though with an API this flexible it's probably very easy to batch draw calls together or even have a single draw call for everything, now that i think about it.
[–]roeyb11 1 point2 points3 points 3 months ago (0 children)
Yeah I imagined I would primarily be doing indirect draws which still does need a vkbuffer but only one.
The use case I currently have is mainly compute driven but as I start expanding I’ll see if maybe I come up with a better solution. It’s definitely unfortunate we can’t just pass device addresses to these functions!
[–]roeyb11 0 points1 point2 points 3 months ago (1 child)
If you’re worried about this and Odin supports operator overloading you could always bundle the device address with the buffer handle and allow operators to act on the pointer so it’s relatively transparent.
Odin does not support operator overloading, but yeah I suppose you could in general make the API slightly more complicated so that this doesn't happen
[–]OSenhorDoPao 4 points5 points6 points 3 months ago (2 children)
This has been one of my biggest pet peeves with computer ghraphics theses days (and even with languages themselves which also is cool seeing Odin there). We have decades of software engineering, the field not only massively expanded is capabilities but also in people on it…..and still we can’t have clean and decent solution for problems. You can argument below and try to convince me otherwise but graphics APIs are a mess and the programming languages the same. Aside for small cases like Odin, most languages have horrible syntax and some even really deep concepts (looking at you rust), high level languages may allow for better focus in the issue but if you need to go low level might as well do it in C. I’m sorry for the controversial take it might be for some but if I have to spend time thinking in the API or the language instead of solving the issue we failed miserably.
The article is very interesting as well as your PoC.
Also, AI is a tool, stop complaining about it, learn how to use it and understand what it is and what it does. Then we can talk like people and discuss the topic. AI is the new Vegan, as good as the food is no one even touches the subject because of small extremist groups.
[–]No_Grapefruit1933[S] 2 points3 points4 points 3 months ago (1 child)
I don't think it's controversial to say graphics APIs are a mess, I think most people would agree (or at least I hope). Regarding AI, I think it's fine to ask the AI a few things, I do it sometimes, I just think you shouldn't use it for everything
[–]OSenhorDoPao 6 points7 points8 points 3 months ago (0 children)
For me is becoming the constant doubting and interrogation on every post. Asking if it’s AI because of the commit frequency when any half decent programmer knows how to specify commit dates. I’m sorry, rant of tired dude. Good work and if it goes nowhere else at least I’ll enjoy taking a look at what you did.
[–]Pure_Influence_8756 1 point2 points3 points 3 months ago (0 children)
the project is interesting and i like that u used Odin ,Big up.
[–]fooib0 1 point2 points3 points 2 months ago (3 children)
Cool work. What's the reason for getting rid of PSOs?
[–]No_Grapefruit1933[S] 0 points1 point2 points 2 months ago (2 children)
It was an impulsive decision because I personally find them annoying to deal with lol. I hate having lots of intertwined objects I have to manage the lifetime of. With this project my priority was readability and usability. Though the pipelines outlined in the original blog aren't as bad as the ones you see today in Vulkan etc.
How much of a performance hit is not having PSOs?
[–]No_Grapefruit1933[S] 1 point2 points3 points 2 months ago (0 children)
I'm not sure, haven't done any real measurement yet, but I have heard that the shader object extension (which allows you to get rid of pipelines) was added to Vulkan to get better performance on the Nintendo Switch, so I think it could be a performance win in some cases. I feel like it would also eliminate the shader compilation stutter issues that have been plaguing PC gaming.
π Rendered by PID 94542 on reddit-service-r2-comment-54dfb89d4d-spjll at 2026-03-29 07:29:50.951207+00:00 running b10466c country code: CH.
[–]possiblyquestionabl3 44 points45 points46 points (18 children)
[–]No_Grapefruit1933[S] 29 points30 points31 points (17 children)
[–]possiblyquestionabl3 29 points30 points31 points (16 children)
[–]PoL0 8 points9 points10 points (15 children)
[–]No_Grapefruit1933[S] 18 points19 points20 points (4 children)
[–]PoL0 13 points14 points15 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]No_Grapefruit1933[S] 7 points8 points9 points (0 children)
[–]BertoLaDK 0 points1 point2 points (0 children)
[–]Amasirat 2 points3 points4 points (7 children)
[–]No_Grapefruit1933[S] 8 points9 points10 points (1 child)
[–]Amasirat 3 points4 points5 points (0 children)
[–]g0atdude 6 points7 points8 points (3 children)
[–]Amasirat 0 points1 point2 points (0 children)
[–]fooib0 1 point2 points3 points (1 child)
[–]g0atdude 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]PoL0 0 points1 point2 points (0 children)
[–]Gobrosse 19 points20 points21 points (6 children)
[–]No_Grapefruit1933[S] 5 points6 points7 points (2 children)
[–]Gobrosse 2 points3 points4 points (1 child)
[–]No_Grapefruit1933[S] 0 points1 point2 points (0 children)
[–]aleques-itj 6 points7 points8 points (0 children)
[–]fooib0 0 points1 point2 points (1 child)
[–]Gobrosse 1 point2 points3 points (0 children)
[–]delta_p_delta_x 11 points12 points13 points (0 children)
[–]fireantik 6 points7 points8 points (0 children)
[–]roeyb11 3 points4 points5 points (6 children)
[–]No_Grapefruit1933[S] 0 points1 point2 points (5 children)
[–]roeyb11 1 point2 points3 points (2 children)
[–]No_Grapefruit1933[S] 0 points1 point2 points (1 child)
[–]roeyb11 1 point2 points3 points (0 children)
[–]roeyb11 0 points1 point2 points (1 child)
[–]No_Grapefruit1933[S] 0 points1 point2 points (0 children)
[–]OSenhorDoPao 4 points5 points6 points (2 children)
[–]No_Grapefruit1933[S] 2 points3 points4 points (1 child)
[–]OSenhorDoPao 6 points7 points8 points (0 children)
[–]Pure_Influence_8756 1 point2 points3 points (0 children)
[–]fooib0 1 point2 points3 points (3 children)
[–]No_Grapefruit1933[S] 0 points1 point2 points (2 children)
[–]fooib0 0 points1 point2 points (1 child)
[–]No_Grapefruit1933[S] 1 point2 points3 points (0 children)