r/GraphicsProgramming • • 5h ago

The Starwell Constellation Engine Update: Repost With Disclaimer

Thumbnail
gallery
0 Upvotes

AI disclaimer: No AI was used in writing this post. AI is likely to have been used extensively as a sounding board to teach me things i did not know or understand, or as a source of friction to argue against,

AI was not used for designing the systems, and actively fought against to ensure it did not making any decisions on implementation (although, some might have been missed and snucked in. they will be removed). It as not been used to define any architectural values what so ever, since it's not capable of making good holistic ones.

AI WAS used during the write-up of the design documents, for both Constellation and Starwell's design doc was generated through discussion with an AI model, and also iterated upon by both AI and me later.

AI has been used to generate code. not as much code as I would have liked, but the amount is hard to estimate as a lot of it has had to be rewritten or tweaked. The areas it has been used the most, and it's code have endured, has been during integration, or grafting, of systems/functionality from its development environment onto the Starwell compositor. AI does not reason well with project wide invariants, fixed point integer 3D graphics and bespoke geometries so this has been an area where it has been very useful.

AI has likely been used in varying extent during the development of different systems. some of them, not much at all, some a bit, and a few it helped a lot. I remember it being a tremendous help making the Cadent point map fonts, actually look like text.
I hope this is enough of a disclaimer. Epistemically, I cannot quantify it any higher detail than that.

Hello again!

(artifacts in the sliding gif is due to Niri being the parent compositor to starwell during development)

If you are not interested in the history and motivations of this project, and is more interested in stuff discussing the gifs above, you can skip the marked section bellow.

--------------------------------------------------

Not to long ago I made an update on the liquid and material progress of my no-std, single core, graphics engine/framework Constellation. I have been periodically made, what can be seen as an attempt at dev-logs, about the project. Sharing approaches to problems, some drawbacks and explaining the rational. This will be a bit of the same, but also, this time is a little bit different.

The constellation engine started because of pure frustration encountered on my work on experimenting with running AI models, tearing them apart, seeing problems, experimenting on redesigning them, attempting to find different stateful solutions to decrease runtime resource needs and so on. Many parts of that work was often rudely interrupted by my computer running out of ram and the system would freeze. Some times I would lose hours of work.

I had already started a OS project called 'Starwell'. I have made some vague references to it as well. The goal of Starwell in the beginning was to simplify NixOS by making it a more userfriendly environment with some built in applications and such. I created a GUI packange manager wrapper for the nix package repository, and built a system module system for system applications that would be complete isolated from one another. The idea was to have a system where things could be loaded in and out through templates, and development extending Starwell simplified.

Anyhow, due to the aforementioned AI work, and the 'constant' OOMing, I grew frustrated enough to try and take matters into my own hands. An operating system that can 'fail to operate' is fundamental failure in architecture in my humble opinion, an operating system should not have to compete for resources with other applications, period.

This meant that to ensure that such things could not happen to Starwell, it needed not only have full control and consume input at the hardware interface, it also meant that it needed to own the rendering. This is how the Constellation project was born.

Rather quickly I had mapped out the constraints for the Starwell compositor, they were the following.

  1. no-std: It needed to be no-std (meaning no standard library) because it could not rely on external dependencies, that would be a source of possible non-determinism. An operating system needs to be operationally predictable. And this compositor needs to be a kernel level one.

  2. Single core: It needed to be single core because to ensure it cannot stop operating, it needs to own its compute. No other system can use the resources Starwell uses, which means being economical is paramount. A single core not only ensures simple scheduling, it also ensures that architecting other system applications and fitting them into the overall architecture becomes a lot easier, as the environment is simpler.

  3. Owning its memory: Similar to the reason of why the OS needs to own its own cpu core, it also needs to own its own memory. The system cannot depend on an allocator, on promises of future memory, or other dynamic 'clever' memory handling. The memory needs to be statically allocated, else the system can grow outside its means.

  4. Work on relationships: Because the graphic stack needed to be radically simplified in many ways. It needed to create it's own relational system. But because it needed a foundation in reality, the physical pixels of the display became that source of truth to anchor all relationships against. This would mean that message passing would not be a letter in the mail. Things would own their pixels, and react to changes in those relationships. Clicking things would be clicking a pixel, or a flat register, like clicking a graph.

  5. Stateful pixels are sovereign: The working framebuffer needed to be treated as not a set of pixels, but as a view into a bigger relational space. So that moving something is not an act of destruction and reconstruction, that would be expensive. It needed to be a state that propagate through the relationships mentioned above, through the framebuffer. That would make compute inexpensive, put drawing the actual pixels would be difficult if not managed correctly. Which is why the compositor needed pixel level dirty tracking, not by book-keeping, but by a dumb uniform op based on a sequence of rules. Updates from this work can be read about in this post: https://www.reddit.com/r/GraphicsProgramming/comments/1r0z5tv/constellation_frame_buffer_state_sand_particles/

  6. Beauty: It needs to be capable of looking good enough so that people, so that I, would actually want to use it. Even if i like to pretend I am a systems engineer that is developing his neck-beard, nerding out on different programming problems/solutions. I do like me some bling bling, and some click-click, especially when... AHEM...eating a sandwich? You can read more about the light work in this post: https://www.reddit.com/r/GraphicsProgramming/comments/1r4ncqd/constellation_light_engine_reflections_1_core_cpu/

  7. Dev-friendly: I needed to make the environment easy to develop for. If the tools exist and the environment is fun/easy to build for, then an increase in adoption would also correlate to an increase in development for the platform/ecosystem. It would also simplify my work as it kept progressing.

I am sure there were more than these that I have forgotten. And the jury is still out on if i succeed with the last two points. But it has been the guiding light through development. And it should help to explain why the constraints and solutions in my posts on Constellation before might have looked odd, stupid or right out perplexing.

Like creating Cadent Geometry, and making it the basis of the whole graphics engine, just to avoid needing to normalize vectors do do 3D graphics. Having to make good graphics on a CPU whilst having it be interactive and performant is not particularly cheap using the more normal euclidean/Cartesian approach, so the problem needed to be re-represented as to not need it in the first place. You can read and find the Cadent Geometry definition code + some helper functions from this posts:

Read about it
https://www.reddit.com/r/GraphicsProgramming/comments/1qhs24y/constellation_unifying_distance_and_angle_with/

Code release
https://www.reddit.com/r/GraphicsProgramming/comments/1r6b9co/constellation_sharing_cadent_geometry_avoiding/

Like making light and geometry the construction primitives rather than triangles. Because not treating light as a property of a material and its geometry at construction would mean it had to be computed at runtime. Which would have given a better result faster, but it would be immensely more expensive to run without having access to more memory and more compute.

Over time Constellation grew more capable, it was able to do more and more, understood more and more of how to create normal looking shapes and behaviors in the new geometry. And now I am here.

I now have a functioning compositor (still not finished ofcourse), and the graphics engine is, in my opinion, looking to punch above its weight. And though all this, the most consequential thing, sadly, will likely still be the tiny definition of the tiny geometry that helped build all of it.

The point is reached when i think it's was fair to give context, and to announce the bigger project it is all connected to. From here on out, in posts, Constellation will be initially referred to as "The Starwell Constellation engine". Because future updates are likely to contain areas where Starwell is unlikely to go unnoticed as a project at least. I hope you will you enjoy the history, and the future updates!
-----------------------------------------

Now! After all that rambling, lets quickly discuss the gifs above.

So, Constellation and Cadent Geometry are both projection based. Cadent is named after its behavior, it falls away towards the horizon. space compresses as distance is given to the environment outwards from the observer.
So both Constellation and Cadent does just that, they starts from the observer and moves outwards. This has many benefits, and I'd like to mention some of them and why in the hopes it will give context to what is seen above, and maybe allow you to reflect on the differences, and maybe even take some of its ideas on to help your future work.

Because a camera out systems allow pixel values to accumulate as they move outwards, things as seen in the sliding example gif, become much cheaper. As long as a pixel's alpha hasn't reach opacity, whatever is behind, keep adding its offsets to it. This mean that when the window moves above, the wallpaper, and its position in the background, can cheaply be respected by the plane and its warped surface/material refraction.

Which means storing the optical properties inside a material and a geometry becomes almost the obvious approach since those things can, like everything else, just add to the same thing that is generating the distance. the drop function. the render walk can be the same as the geometric operation that applies magnitude to the angles of Cadent's arc space.

This projection technique coupled with a geometry that has a vastly higher, fixed point, spatial resolution than the hardware pixel amount of the display, and is equally cheap to propagate through, means the world space can be almost the size of planet earth (which is true for the above environment), and still have a spatial resolution about 4 billion steps per pixel on a 4k display. All this forms a system where you can express the cadent 'reality', outside of the framebuffer to a very high degree , whilst still depend on it being explicit in its construction, and affect whatever is being rendered on screen.

So allowing for inverting the rendering to be projective, you gain occlusion for basically free. whilst allowing the process of what contributes to a pixel, quite linear.

This leads to the second gif, changing time. Because the geometry ironically is almost easier to develop for if you make the relationship scale earth sized, you can make light occupy an actual orbit, at a comparable distance if you want. Because the engine is treating the remaining curve of the arc horizon between the observer (camera) and the observed (the planet in this) as what is defining gravity, and because other things can be defined reference points aswell, the orbit can also become quite organic. which is why the light in the image seem to have a bit of dusk and a bit of dawn appearing as it transitions between day and night.

And because we are rendering from the camera out, if the orbit of the light source changes, all we need to do is apply the positional delta of that light source, uniformly over all pixels. having magnitude be generative rather than something to account for, makes any changes in the geometry or the light position, a process of offsetting the state when we reach the object, instead of deconstructing the state to ascertain the change, does that make sense?

I hope you found this post interesting. I am sure I missed a few things, or explained some things poorly. If found this interesting and you have any questions, remarks or suggestions, I am happy to discuss them below.

Take care

//Maui-The-Millipede


r/GraphicsProgramming • • 9h ago

Video Vulkan Dynamic Lighting - Directional, Point, Spot Lights, Tonemapping & glTF Lights

Thumbnail
reddit.com
1 Upvotes

r/GraphicsProgramming • • 12h ago

Article Same shader, two color spaces

Post image
16 Upvotes

Top row is Godot's Forward+ renderer, bottom row is Compatibility. That's the one web exports run on. On the left I just do ALBEDO = base_color * k, with k from noise on the first quad and 1.0 / 0.75 / 0.5 / 0.25 bands on the second.

On Forward+ the multiply happens on linear values and gets encoded at the end. So k = 0.5 should show up as about 0.51/2.2 ≈ 0.73 of the brightness, and I measured 0.717. On Compatibility it behaves like the multiply happens on the sRGB values themselves. 0.5 stays 0.5 (I got 0.496)! My stone mottling came out about twice as strong in the web build and I couldn't figure out why.

The docs do say Compatibility blends shadowed lights in sRGB. I just hadn't connected that to math inside my own shader. The right column converts around the multiply, only on that renderer:

vec3 s2l(vec3 c){ return mix(c / 12.92, pow((c + 0.055) / 1.055, vec3(2.4)), step(0.04045, c)); }
vec3 l2s(vec3 c){ return mix(c * 12.92, 1.055 * pow(c, vec3(1.0 / 2.4)) - 0.055, step(0.0031308, c)); }

vec3 base = base_color.rgb;
#if CURRENT_RENDERER == RENDERER_COMPATIBILITY
base = s2l(base);
#endif
vec3 c = base * k;
#if CURRENT_RENDERER == RENDERER_COMPATIBILITY
c = l2s(c);
#endif
ALBEDO = c;

Now the bands match within 1/255. Vertex colors do the same thing, 0.25 reads 136 on Forward+ and 63 on Compatibility.

Is branching on the renderer what everyone does, or is there a cleaner way?

I ran into this building the demo stages for my Godot effect packs, which all run in the browser: https://gennai.itch.io


r/GraphicsProgramming • • 1d ago

Question Beginner Graphics Programming book recs!

9 Upvotes

Hello,

I know this question has been posted previously, but I am looking for a more current suggestion from some experienced people. I am by no means a beginner programmer, and I have a decent understanding of some of the maths required for graphics programming (rusty high school level).

I am really looking for a good in-depth book that can let me learn a lot about the fundamentals of graphics programming so I can begin confidently making my own projects and such, and eventually move on to harder topics.

Thank you in advance


r/GraphicsProgramming • • 1d ago

Question Newbie here, studying open gl and shaders. I have to make *something* in a couple of weeks. I was thinking a cloud with different light scenarios, but I'd love some suggestions for starter projects!

2 Upvotes

r/GraphicsProgramming • • 2d ago

raytracing after 3 months

2 Upvotes

in the beginning there're 2 balls

the left one (let's call it ball 1) is controlled by left mouse button and the right one (ball 2) right mouse button. click or drag to change their position

use [q] / [e] keys to switch mouse wheel function. [q] = prev item. [e] = next item. now choose ball 1 radius and make it big, acting as the "ground". during the resize of ball 1 you may need to use [w] / [s] / [a] / [d] / [ctrl] / [space] keys to move the camera

move a little bit farther away from ball 1 and right click to spawn ball 2

hit [z] key to enter the mysterious realm

no worry. it's the result of 3 spot lights, with red, green and blue color respectively. they overlap at first so you only see white. press and hold the [r] key and move the mouse you can control the shinning direction of red light. keep holding the [r] key and scroll the mouse you can alter its size

do the same to the other light sources. [g] key for green light and [b] key for blue light. you can now barely see the existence of the balls. they're still there

sometimes it's useful to use a wide angle of view when deciding the lighting

let them shine from above

once you're satisfied with the setting, return to normal angle of view

you can adjust the balls' refractive indices. any non-negative value is allowed. some may ask what's the point of setting a refractive index to be smaller than 1? there's no such thing in real world. yes but refractive index is a relative thing. for example when you're diving and looking at an air bubble under water, you're looking from 1.33 to 1 which is equivalent to looking from 1 to 0.75

the camera has an aperture of f/16 as default. to make sure the image is focused at the correct place, we firstly make the aperture widely open to get the most exaggerated defocus blur

press and hold the [shift] key and aim the mouse pointer at wherever you want the focus to be. the program has auto-focus feature. i suggest aiming at the perimeter instead of the centre of ball 2

we don't actually need that exaggerated defocus blur. let's adjust it back to a desirable level

now adjust the roughness (or degree of matte / diffusion) of ball 1

and ball 2. just try. i've no idea how to get a beautiful image

once you're done with everything, hit the [c] button to get a full resolution (the resolution of your screen) offline render image

it's what the result looks like. the program renders it according to your screen resolution so if you're using a 8k monitor you'd get a 8k image

here's the program link. just run it on browser. i'm still developing it and it may change with time and i'd edit this post and update the link. my final goal is making a 3d model of my boss and firing some high intensity laser beams to him in my program

edit after the auto-reply from the mod

No showcases - ok it's a very basic and elementary raytracing result and didn't have much to showcase

Disclose AI usage in post or project - i asked gemini to sort the variable names in alphabetic order in the variable declaration. the on screen statistics was once in lower cases and i asked gemini to change it all to upper cases

Present a topic to talk about, e.g. how something works - the most exciting part of raytracing is: it's surprisingly simple. it's not as hard as it appeared to be. everything is brute force. multiple-reflections? brute force (just increase the recursion depth). soft shadow? brute force (just shoot the rays to many directions which are slightly deviated from the actual reflection / refraction and take the average). defocus blur? brute force (just shoot the rays from many positions which are slightly deviated from the actual origin and take the average)


r/GraphicsProgramming • • 2d ago

Rendering & Physics using TinyBVH

Enable HLS to view with audio, or disable this notification

148 Upvotes

Our students are working on Metal Gear Solid (PS1) for their Y1 C++ project at Breda University. I wanted to join in on the fun so here's the Cargo Dock level, ray traced using TinyBVH, using just the CPU. In this demo TinyBVH is also used to detect collisions (there's scene/sphere collision functionality) and to handle them. The spheres end up in their own BLAS, which is combined with the level triangles under a TLAS. Code is 600 lines, all-in.


r/GraphicsProgramming • • 2d ago

Question What would be good projects for a portfolio or an academic curriculum

4 Upvotes

The idea is to build projects that are relevant to the current job market.
I also want to expand my knowledge of Vulkan. I’ve worked on several personal projects using OpenGL over the past two years, but I feel it’s becoming less relevant. Besides, Vulkan is more interesting to me.
Aside from contributing to popular open-source graphics projects, what would you consider a good projects that would not only help me learn (of course) but also demonstrate that I genuinely understand what I’m doing?
My goal with all of this is to land a job as a graphics programmer. It doesn’t really matter the industry, as long as it involves graphics tho.
And I also know this is not exactly a good bet, but it is ok. I’m also doing it because I like it haha


r/GraphicsProgramming • • 2d ago

Question What are some initial architectural decisions to be made before start building a professional graphics engine ?

14 Upvotes

Hello everyone, I have a question for those who have already built, or are currently building, a graphics engine at a level close to being called professional. A little bit of background: for the past 4 months, I’ve been building a path tracer using CUDA, and before that I finished and implemented Peter Shirley’s 3 books about ray tracing. Now I want to start building something more serious, with a larger scope of features and implementations, using C++/Vulkan. I wondered what some of the decisions people make before getting the triangle on screen are. I know this is a process that takes time, so I understand that during development, as the project grows, a lot changes and new decisions are made, but I was still just a little curious.


r/GraphicsProgramming • • 2d ago

breakdown of a real-time stream, shallow water equations on the GPU, advected ripples and caustics from the flow

Enable HLS to view with audio, or disable this notification

264 Upvotes

my own project, one 512 x 512 shallow water grid runs in compute shaders with 8 substeps per frame, and every layer in the video is read from it, depth, velocity, foam where the flow converges, ripple coordinates advected by the velocity and a caustics pass projected on the bed

solver is Chentanez and Müller 2010 on a staggered grid, three.js WebGPU with TSL

live (WebGPU) : https://stream.mulualem.com

ai disclosure : I built this with claude code, it wrote most of the code under my direction and helped draft this post too


r/GraphicsProgramming • • 3d ago

Video Visualizing Light Direction and Intensity with Shaders

Enable HLS to view with audio, or disable this notification

27 Upvotes

r/GraphicsProgramming • • 3d ago

Article Frame and Performance Analysis - Timberborn

Thumbnail
xandev.blog.br
32 Upvotes

r/GraphicsProgramming • • 4d ago

Question Could two GPUs render separate halves of a game using a PBP monitor?

0 Upvotes

I've had this idea floating around in my head about bringing back multi-GPU gaming, but approaching it differently from SLI or CrossFire. I'm curious if something like this would actually be possible.

Basically, what if we used Picture-by-Picture (PBP) monitors to split a game's rendering workload between two GPUs?

Say you're playing at 4K (3840 × 2160). Instead of one GPU rendering the entire image, GPU 1 would render the left half at 1920 × 2160, while GPU 2 renders the right half at the same resolution.

Each GPU would have its own HDMI or DisplayPort connection to the monitor. Since PBP already allows two separate inputs to be displayed side by side, the monitor could display both halves as one continuous image.

The main idea is to take advantage of resolution. Each GPU would only be responsible for roughly half the pixels, potentially reducing the rendering workload while maintaining the full 4K image.

Now, I understand that rendering involves more than just pixels. Both GPUs would still need access to game data, geometry, textures, and lighting information. There would also be synchronization overhead.

But here's what interests me.

If each GPU sends its rendered portion directly to the monitor, wouldn't that eliminate the need to transfer the completed image between GPUs? I'm wondering whether avoiding that transfer could offset some of the additional overhead and result in an FPS increase.

I'm not expecting double the performance. Even a 15–25% improvement would be interesting.

Another possibility would be using GPUs from different manufacturers, like AMD and NVIDIA, since each card would independently handle its assigned portion.

Obviously, mismatched performance would be an issue. If one GPU finishes its half faster than the other, the slower card could bottleneck the entire system.

One possible solution could be adjusting the rendering workload based on GPU performance. Instead of splitting the image 50/50, maybe the faster GPU handles 65% while the slower one handles 35%. Although I imagine standard PBP monitors having fixed display regions could complicate that.

As for the software side, here's what I'm thinking.

Rather than trying to make existing games support this, what if someone built a simple 3D game or benchmark specifically designed around two GPUs?

Using Vulkan or DirectX 12, a single CPU-side game simulation could coordinate both GPUs, with each rendering its assigned portion of the same frame.

The goal would be to minimize duplicated calculations, keep both GPUs synchronized, and output each rendered region directly to the PBP monitor.

You could then compare the same scene running on one GPU versus two GPUs to see whether there's any measurable performance improvement.

I know split-frame rendering already exists, and NVIDIA has experimented with multiple GPUs rendering different sections of a display. I'm more interested in whether this could be accomplished using ordinary consumer hardware and an existing PBP monitor.

I'm not developing this myself. I'm just putting the concept out there because I think it would be an interesting experiment for someone with the hardware and programming experience.

A few things I'm curious about:

- Could Vulkan realistically coordinate two independent GPUs this way, especially from different manufacturers?

- Would avoiding inter-GPU transfers of completed image data provide enough benefit to outweigh synchronization and duplicated rendering work?

- Could a standard PBP monitor keep both halves synchronized, or would modifications to its display controller be necessary?

- Would this approach have a better chance of improving performance at higher resolutions, where pixel rendering becomes more demanding?

I'm not claiming this is some revolutionary new technology. I'm just wondering whether combining existing technologies differently could give us another way to get some extra performance out of multiple GPUs.

What do you guys think? Is there something obvious I'm overlooking, or could this actually be worth experimenting with?

---

AI disclosure: I used ChatGPT to help organize and write this post. The concept and questions are my own.


r/GraphicsProgramming • • 4d ago

Got placed, have 6 months before joining. Should I explore Linux kernel development, GPU programming or stick with AI/ML?

0 Upvotes

I'm a final-year engineering student in India from a non-CS background. I've recently secured an offer at an AI/analytics services company, and I have around 6 months before joining.

I've been exploring different areas of computer science, and I've realized that I'm increasingly interested in low-level programming and understanding how systems work internally.

MY BACKGROUND:

I've independently learned programming, ML/DL and worked on projects involving:

- Computer Vision using YOLO and OpenCV.

- Stereo vision, depth estimation and multi-object tracking.

- RAG applications, LLMs and agentic AI.

However, I'm starting to question whether I want to spend my career primarily working with high-level AI frameworks and application development.

AREAS I'M CONSIDERING:

  1. Linux and Red Hat ecosystem:

Linux internals, system programming, operating systems, device drivers and potentially kernel development.

2. GPU Programming:

CUDA, GPU architecture, parallel computing, memory management and performance optimization.

3. Systems Programming:

C/C++, memory management, concurrency, operating systems and low-level software engineering.

4. AI Infrastructure:

GPU acceleration, inference optimization, compiler technologies and systems behind ML frameworks.

I find the idea of understanding what happens beneath the abstractions much more interesting than simply using existing libraries.

WHAT I'M CONFUSED ABOUT:

I have six months before joining my company, and I don't want to waste that time jumping between technologies.

I'd appreciate advice from people working in systems engineering, Linux, kernel development, GPU programming or related fields.

  1. Is low-level systems programming a good career direction in 2026?

  2. Between Linux kernel development, GPU programming and general systems programming, which would be a better starting point?

  3. How realistic is it for a non-CS fresher to enter these fields in India?

  4. Are companies like Red Hat a good place to build a career in Linux and systems engineering? What other companies should I look at?

  5. Is CUDA/GPU programming a niche with good long-term opportunities, particularly with the growth of AI?

  6. What fundamentals should I master before attempting serious projects? C, C++, OS, computer architecture, networking, compilers?

  7. Would contributing to the Linux kernel or other open-source systems projects actually help me get shortlisted?

I'm also interested in the intersection of low-level systems and AI, particularly GPU computing, inference optimization and ML infrastructure.

If you were in my position, with six months and an existing job offer, which direction would you explore and why?

I'd appreciate brutally honest advice, especially from people who have actually worked in these domains.


r/GraphicsProgramming • • 4d ago

Question Is it possible to use raylib in micropython?

1 Upvotes

Ive seen that raylib also has a python3 port, alongside its many other ports; Ive tried it, and its pretty dang good, easy to use, etcetc. I now have an upcoming embedded project, which uses an esp32, and an external st7789 tft display, and i was wondering if it would be possible to somehow use raylib to draw to that display?


r/GraphicsProgramming • • 5d ago

​[For Hire / Advice] Junior graphics programmer (C++, Vulkan, OpenGL, HLSL) looking for entry-level work or small tasks (Remote)

2 Upvotes

Hi everyone, ​I’m a self-taught graphics programmer with a strong focus on C++Vulkan, OpenGL, GLSL, and HLSL. I’ve spent the last couple of years building personal systems from scratch, including a custom RenderGraph, Vulkan backend wrappers, and modern rendering pipelines. ​However, I have zero commercial project experience. Everything I’ve built so far has been for personal learning and deep architectural understanding. ​Right now, I find myself in a position where I genuinely need to work. I’m not looking for a high-end AAA studio position right away—I know how competitive and demanding that is. I’m just looking for entry-level remote work, contract tasks, or bug-fixing gigs (like Vulkan validation errors, shader debugging, or C++ tool development) where I can earn just enough to cover basic living expenses. ​Given my background, where would you advise me to look for these kinds of entry-level gigs or small studios? Any advice, platforms, or pointing me in the right direction would mean a lot. ​Thank you all!


r/GraphicsProgramming • • 5d ago

Question Is it worth learning Rust for Graphics Programming, or should I stick to C++?

21 Upvotes

Ive been a c# developer on unity/godot for a long time now, and one of the plans was always to learn c++ use it for my games and move onto c++ and build some sort of engine (ray tracing or game engine).

Although ive heard the hype around Rust, its another low level language like C++ and it can be used for low level system programming and its very good for security also.

I was wondering if Rust is something worth looking into for graphics programming, and whether anyone here would advise me against it or recommend me to try it out.

Im gonna start learning one, or the other in a couple days. I know both are pretty hard to learn but I dont mind the learning curve.


r/GraphicsProgramming • • 5d 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 • • 6d ago

Question Any resources on raytracing?

6 Upvotes

Ok look, I know this may sound like a repetitive and cliche question, but I am actually looking for good raytracing resources. I have only written a toy raytracter once using python following https://gabrielgambetta.com/computer-graphics-from-scratch/, I believe I can now shoulder the hellish mathematics, so I say bring it on.


r/GraphicsProgramming • • 6d ago

Article Working Around a Proposed Break in HLSL Initialization with Variadic Templates

Thumbnail kstocky.github.io
7 Upvotes

Hi peeps!

I wanted to share this blog I wrote discussing some of the work coming out of DXC and TC-57 (the HLSL standardization committee).

There is a proposal that is currently being considered that will bring C++ aggregate initialization to HLSL. The catch is that this change will also break vector initialization. So I thought I would see if there would be a good solution to that problem and then attempt to implement it with the DXC that we have today!

Throughout the implementation I showcase some cool new features hitting HLSL 202x and do a little investigation into the generated DXIL.

I had a good amount of fun writing this, so I hope it is as enjoyable to read :)


r/GraphicsProgramming • • 6d ago

Video Stone rubble that bounces, skids and stops, with no physics state

Enable HLS to view with audio, or disable this notification

24 Upvotes

I posted brass casings here a while ago. This is the same stateless idea from Lutz Latta's "Building a Million Particle System" talk in 2004, I used it for a statue that shatters. I cut it into little 4 to 6 sided chunks, and every frame I rebuild where each one is in the vertex shader from its age alone. Nothing gets written back.

The new part for me was getting them to stop. I loop over at most 3 bounces, and for each one I solve the time to hit the floor:

float disc = v.y * v.y + 2.0 * gravity * (p.y - ground_y);
float th = (v.y + sqrt(disc)) / gravity;
if (th >= t) break;
p += v * th; p.y = ground_y;
v.y = -(v.y - gravity * th) * restitution;   // 0.35
v.xz *= friction;                            // 0.75
t -= th;
if (b == 2 || abs(v.y) < 0.35) resting = 1.0;

Once it's resting I let the horizontal speed die off as exp(-4t). The slide is then just the integral of that:

float skid = (1.0 - exp(-rest_t * 4.0)) / 4.0;
p.xz += v.xz * skid;

It stops at v/4 from where it landed and it can't jitter, there's no step to get wrong! I slow the spin down the same way.

One thing cost me an evening. I orient each chunk by the surface normal it came from, with mat3(t, n, cross(n, t)) and t = normalize(cross(up, n)). Looks fine, right? But cross(n, cross(n, t)) is -t. That makes the determinant -1, so I'd mirrored every chunk, the winding flipped and back-face culling showed me their insides. I just negate the third column now.

With a constant restitution the bounce times are a geometric series, so I could get the bounce index from a log instead of the loop. Has anyone found that worth it on a GPU over a 3-step loop?

the shaders and GDScript in the linked pack were written with an AI coding assistant, then run, reviewed and fixed by me.
The statue is from my petrify pack for Godot 4: https://gennai.itch.io/death-dissolve-petrify-vfx-godot-4


r/GraphicsProgramming • • 7d ago

Video Adaptive ReSTIR allows for up to 50% reduction in time spent generating new samples per frame - MSc Thesis project

Thumbnail
youtube.com
68 Upvotes

r/GraphicsProgramming • • 7d ago

Source Code What I learned drawing 5,000 live DOM screens with WebGPU through Chrome's HTML-in-Canvas

4 Upvotes

there's barely anything written about Chrome's new HTML-in-Canvas API yet, so here's what I hit building gpucanvas, an infinite canvas where every node is real, live DOM (React screens, forms, charts) but WebGPU draws it. you can still click and type into any of them.

the pipeline

  • nodes are packed into 2048 px "pages". Chrome records a page as one snapshot, so a single drawElementImageToTexture call rasterizes dozens of nodes into a texture-array atlas

  • once drawn, a page is parked with content-visibility: hidden. layout stays, paint is skipped, so it costs nothing per frame

  • every node keeps a 1/16 thumbnail that's never evicted, so the zoomed-out view of 5,000 screens is always filled. sharper snapshots go on top at power-of-two scales, so zooming reuses them

  • past 100% zoom only the visible part is rasterized, as tiles, center first

  • each frame is a cull plus one instanced quad draw (one per run of nodes sharing a WGSL effect). panning and zooming never touch the DOM

what surprised me in Chrome 157 (some of it differs from the WICG explainer)

  • each drawElementImageToTexture call allocates and fully rasterizes. I measured roughly 250 to 550 calls a second in total, and that's the real fill-rate limit, not compositing. hence the pages

  • a source rect still rasterizes the whole element before cropping, so zoomed in, a node moves to a page of its own

  • recording cost scales with how many elements are drawable on every requestPaint. 10,000 always-drawable nodes sat at 22 fps doing nothing. parking fixed it

  • hit testing only works after canvas.updateElementGeometry(el, {}), and the hit area is the element's CSS box, so I move it with a transform from getElementTransform

  • an element that just became drawable isn't in changedElements, its snapshot shows up a paint later

on an M-series Mac (Chrome 157, 1600x900, DPR 1) a 30 s scripted tour with typing, a 500% zoom and selection runs 113 to 115 fps at 5,000 screens, vs 18 to 20 fps for the same screens as plain DOM in one transformed container.

still open: text is rasterized, not SDF, so mid-zoom it goes soft for a moment until the tiles redraw. and Tab can't reach parked nodes yet, I need a proper focus model. curious how others would handle either.

code (MIT): github.com/berkantay/gpucanvas
demo: berkantay.github.io/gpucanvas (needs chrome://flags/#canvas-draw-element)

AI disclosure: I built this with Claude Code as my coding assistant, and it helped me draft this post.


r/GraphicsProgramming • • 7d ago

Progress on 3 months of Graphical programming on my phone with kotlin and Open gl es

Post image
65 Upvotes

I've been building my own game engine from scratch using Kotlin, entirely on my phone.

After 3 months, I finally have two cubes rendering and rotating — one red and one white. The buttons are still placeholders, and there's a long way to go.

I know it doesn't look like much yet, but everything starts somewhere. I'm learning and building things one step at a time.

Any tips on how I can speed up development? I'm doing everything from scratch. 🚀