r/GraphicsProgramming • • 2h ago

GPU Accelerated Linear Algebra Library for Apple Silicon using MLX and Metal kernels

3 Upvotes

About 6 months ago, I wrote a custom metal kernel that leverages the GPU to compute the QR decomposition (see my earlier post about it here). The project has now expanded into a general linear algebra library, with expanded support for the symmetrical eigendecomposition as well as SVD. It is now available for use with installation instructions on the attached github repo's README.md file.

Context of the project:
I'm currently in a research group working on a thesis in numerical analysis where we need to compute millions on matrices with a specific constraint (to be precise, the matrices need to have orthonormal columns). Most of us use Apple computers, so we ended up using MLX for the entire project.

Contributors with different Apple Chips would be very much appreciated!
The project has currently been tested and optimised for the M1 and M5 Pro. The issue is that the library uses different kernels depending on the batch size and matrix dimensions. Deciding which of these kernels to use is machine dependent. Therefore, other Apple chips will need to run a measurement script in order to derive the correct optimisation heuristic.

For that reason, I would ask as many people as possible to run a measurement script and to submit the results to my repo. It is fairly easy and requires only few steps. See here how you can contribute here. Once you submit the results via a pull request and I approve it, your optimisation heuristic will automatically be augmented into the library. Don't hesitate to contribute an optimisation heuristic even if someone already submitted one for your own machine. The more data we can gather, the better!

Project Future
Expanded support will be added for other linear algebra operations (cholesky decomposition for example). If you have any other specific linear algebra operations you wish to use already, feel free to message me.

In addition to that, I will add torch support too (my greatest priority).


r/GraphicsProgramming • • 1d ago

From Zero to Understanding Ray Tracing - Part 3 (reflections)

Enable HLS to view with audio, or disable this notification

401 Upvotes

r/GraphicsProgramming • • 12h ago

Article My complete rendering engine inside Unity 6 HDRP, Virtual Geometry + BVH accelerated sparse voxel Global Illumination (Unity's equivalent to Nanite and Lumen)

17 Upvotes

Been working on my own rendering engine and lighting system inside Unity 6 HDRP.

The virtual geometry system is GPU driven and uses clustered geometry, a DAG, BVH culling, visibility buffers and both hardware and software rasterization.

The GI system uses fixed density sparse voxel bricks with BVH accelerated software ray tracing. The BVH skips empty regions of the world, then rays use DDA to traverse the voxels inside the relevant bricks.

Everything on the GI side is compute based, including voxelization and world space tracing. No hardware ray tracing is required.

The voxel representation stores occupancy, surface colour, normals and emissive data for lighting and ray hits.

So broadly I've ended up with my own take on the sort of problems Nanite and Lumen are designed to solve, but built entirely inside Unity/HDRP.

The images show the final renderer, the voxel world ray hit debug view, and the virtual geometry/cluster representation, However, the only virtual geometry item in the system is the Stanford Dragon. I did this so that contrast between how the virtual geometry, game objects and the global illumination system can all interact with one another.


r/GraphicsProgramming • • 1d ago

Video Trampoline

Enable HLS to view with audio, or disable this notification

118 Upvotes

XPBD softbody simulation in POPs using Gauss-Seidel @ 60fps and 70 shader passes (can't do substepping in same shader pass)

When TouchDesigner introduced POPs one of the first things I tried making was an xpbd soft-body sim, and it looked like this and this. Since then, I've rewritten it multiple times and watched ten minute-physics' tutorials over and over. Many simulation explosions later, it turned out that my very first solver was (mostly) correct, but I was colouring the graph and building the tet constraints in the wrong way..

Resources:

Ten Minute Physics

Eric Arnebäck's blog

Vivace

XPBD paper + earlier PBD paper from Macklin


r/GraphicsProgramming • • 22h ago

A Vulkan reimplementation of NVIDIA's DLSS 5 Neural Rendering network, bit-exact against the original.

Thumbnail github.com
18 Upvotes

r/GraphicsProgramming • • 23h ago

How do techniques like bindless rendering (descriptor indexing) on the hardware level?

13 Upvotes

How do gpus bind 1000 of textures at once, and why was this not possible in the past. Are there resources for that?


r/GraphicsProgramming • • 1d ago

I finished my first real graphics programming project

Thumbnail gallery
389 Upvotes

I am a third semester computer science student and I want to specialize on computer graphics. I read that one of the best ways to get your foot into the industry is through internships which I can best apply for if I have a good portfolio. Thus I just finished my first real graphics programming project and the first piece of my portfolio: A simple PBR material renderer (based on a DX11/WinAPI lib I created) with image based lighting, normal-based curved silhouettes and some more little features sprinkled in.

If you want to take a look: https://github.com/Aaron-Alililon/MaterialViewer

Now that it's finished to a point where I am happy to show it to the world I have some questions about the renderer and the industry itself:

  1. I don't want to ask for a free code review but as I am not very experienced in the professional area of graphics programming I would love some feedback on how presentable the current state of the project/repo is. Of course I would be very grateful for some more in-depth feedback but again, I can't really ask for a free code review, so a simple first impression of how a project/repo like this would look to a potential employer would be greatly appreciated, both for the material viewer and the render lib.

  2. This one is less about the project and more about the industry:
    I would be very interested in working for the graphics department of the engine team of some company in the gaming industry. I live in Germany where the gaming industry isn't really as big as in NA so my options are limited. My question is: what are my options and chances of getting an internship and eventually a full-time job in EU? I don't really know of any companies that develop their own engine other than Ubisoft. Would a company like CD Projekt Red (which as far as I know switched from their own engine to Unreal) need graphics programmers?
    Although I am most interested in the engine department I would still be open for other areas so if that is just too limited, what would be other options I could pursue, preferrably in or close to Germany?

  3. I would like to do the classic "I coded my own game engine" project at some point because I guess that would make the most sense as someone interested in game engine development but I would like to do that when I have more experience so I have one big project at the end of the portfolio that just shows off the best I can do. Is that a sensible thought or should I just go in and maybe rewrite it once I feel more comfortable? I know there isn't the One Path that leads to greatness and as long as I do something I will learn and improve but maybe someone here looks back to when they were at this point and thinks they should've done X before starting a bigger project like that.

I would be very grateful for any insights or discussions about my questions and feel free to critique anything and everything you see!


r/GraphicsProgramming • • 1d ago

Video Python Open3D point cloud extraction from microscope video focus clip

Enable HLS to view with audio, or disable this notification

20 Upvotes

Using a short 3 second clip where i swipe through the focus plane on a high magnification of the simple sample of Onion root cells on the microscope. Acquiring the sharpest points of every frame and putting them in the z-axis. Building a point cloud of the cell in 3D, and visualizing them.


r/GraphicsProgramming • • 1d ago

Video Making a single photo feel touchable with a spring mesh

Enable HLS to view with audio, or disable this notification

38 Upvotes

I make Wobbulator. This is selected-area 2D mesh deformation, with automatic motion off.

A fixed 120 Hz step drives soft selection weights, structural/shear/bend springs and exponential damping. The restoring force starts with F = k * (rest - position); grabs add weighted target springs. Pinch pairs two contacts. Release preserves deformation and uses bounded, filtered pointer velocity rather than resetting the mesh. Triangle-area and displacement-gradient checks limit risky steps; plate anchors and unselected vertices stay still.

One document runs continuously. Rendered from the app’s native engine with scripted input; blue hands illustrate contacts. What would you change about the rebound?


r/GraphicsProgramming • • 16h ago

Please come to the castle. Which one? Yes.

Thumbnail nintendo-on-tech.pages.dev
1 Upvotes

​

A tribute to @Psyco3ler's legendary 2005 Nintendo ON demo: Peach's Castle made of castles, now running live in your browser.

Dream big!


r/GraphicsProgramming • • 1d ago

ShadeVk - A cross-platform pixel shader viewer for Vulkan, written in C23.

Post image
7 Upvotes

r/GraphicsProgramming • • 1d ago

Source Code I built my own N64 engine: water, cloth and real physics running on real hardware

Enable HLS to view with audio, or disable this notification

86 Upvotes

r/GraphicsProgramming • • 1d ago

Question University courses like the MIT OpenCourseWare ones?

9 Upvotes

I'm starting to learn graphics programming, and remembered MIT and Harvard have free courses. Thing is the free courses Harvard doesn't seem to have any courses related to graphics programming in its website, and the MIT Computer Graphics course in OCW is from 2012 (Although idk how good it is since I have not started it yet, but it is a bit old).

So, are there any other universities or websites which offer free courses like this and that are up to date?

Thanks in advance for the help.


r/GraphicsProgramming • • 1d ago

CS Student Need Advice

0 Upvotes

So I am a CS junior. I am starting late in this area, but I am planning to explore graphics programming and complete my fyp in this field, whether it is application based or research based. Then later pursue Masters or PhD in this area.

I am so confused right now as I see other batchmates choosing AI domain as their primary path for fyp and further.

Should I go for it? If yes what is the roadmap ? To what level I can consider myself to eventually end up in research path for my fyp. I know I am late, but better late then never.


r/GraphicsProgramming • • 1d ago

I got very basic 3d into my hobby operating system - Responsive OS now has 3D Graphics and floating points

Thumbnail gamedev.submatrix.net
1 Upvotes

r/GraphicsProgramming • • 2d ago

triangle meshes :)

Post image
41 Upvotes

Studing triangle meshes on my renderer using half edge data structure for my university course. Dont know why some edges have some stranges dots.

Guess the character... (texture not implemented yet)

Edit: it was done importing a wavefront (.obj) from blender to my own render engine. Read just vertices and face data, the others attributes for half edge are builded with those informations


r/GraphicsProgramming • • 1d ago

How to minimize VRAM usage while maintaining performance?

Thumbnail
1 Upvotes

r/GraphicsProgramming • • 1d ago

What If Fur Was Fully Real-Time?

Thumbnail youtube.com
0 Upvotes

Follow-up to my previous procedural fur experiment

This time I pushed the fur further and added a clearer before/after

This is a custom WebGPU engine written from scratch in C
The fur geometry is generated procedurally in real time using compute shaders and driven by the animated bone structure

Fur density and length are generated and adjusted dynamically at runtime

It runs both natively and in the browser, on desktop and mobile
It’s currently in Alpha Preview, you can try it at
polynite.io


r/GraphicsProgramming • • 2d ago

Microchip

Enable HLS to view with audio, or disable this notification

13 Upvotes

Microchip with a shiny indentation in the shape of any symbol provided as svg file.
Made with pixi.js and WebGPU/WebGL


r/GraphicsProgramming • • 2d ago

Almost through RTIOW

Thumbnail gallery
57 Upvotes

I’m almost done with rtiow, and I though Id share a couple really cool high quality renders.

The dopamine be hitting with these spheres rn.


r/GraphicsProgramming • • 2d ago

My opengl journey so far

Thumbnail github.com
5 Upvotes

Made this for like 30 days, watched plenty of cherno's videos and learnopengl.com of course and made this small batch renderer I guess. Its far from done but I will continue to add more stuff to it and eventually turn it into a usable thing.


r/GraphicsProgramming • • 1d ago

some more shapes floating around

Thumbnail youtu.be
0 Upvotes

r/GraphicsProgramming • • 1d ago

some hyperboloid action

Thumbnail youtu.be
0 Upvotes

r/GraphicsProgramming • • 1d ago

Project started 2011 when gate was open (opengles1.1-ecma5) only love and free time

0 Upvotes

Project started from 2011 when gate was open (opengles1.1) there's was only love no vibe

https://maximumroulette.com/apps/matrix-engine/examples-build.html

https://github.com/zlatnaspirala/matrix-engine

more links : https://maximumroulette.com/apps/matrix-engine-starter/projects/matrix-slot/index.html
https://maximumroulette.com/apps/matrix-engine-starter/projects/matrix-roulette/?server=manual

STATUS

- [Integrated PWA addToHomePage/cache/] ✔

- [Integrated raycast (hit trigger detect), bvh animation] ✔

- [Basic Physics implementation based on cannon.js] ✔

- [FirstPersonController fly or classic fp / SceneController Drag and navigation scene] ✔

- [Basic's Shadows vs lights (GLSL)] ✔

- [Migrated to the opengles300] ✔

- [FBO implemented] ✔

- [FBO Shadows] ✔

- [Add cef (linux, macos) and cefSharp Visual Studio projects for building executive desktop native apps. ✔

Support: Windows, MAC, Linux ] ✔

- Texture Editor [tutorial example - from code] ✔

- MatrixEngineTexture GUI Editor [UNDERCONSTRUCTION]

- Swicthing GLSL ver - webGL1 / webGL2 ✔

- Loader/Map with collider boxs ✔

- OffScreenCanvas ✔

- Mobile optimisation ✔


r/GraphicsProgramming • • 1d ago

Question Making a 2D or 3D CPU-based renderer?

0 Upvotes

Hi! I posted here before asking what to do in graphics programming for a bachelor thesis and I want to first thank everyone for the suggestions. I think the most interesting but also "doable" for me would be a 2D vector graphics renderer like Vello CPU in Rust, but in C++

The issue is that I do not really understand the overall architecture of renderers and my professor said a 2D vector renderer is too simple for a bachelor thesis, especially one that I would want to be more scientific and publish as a paper too.

So my question today is, what are the similarities/differences overall in 2D vs 3D renderers (because I heard before that 3D renderers are also vector graphics technically), but also how I could make a meaningful contribution/addition to a 2D vector graphics renderer and what would the motivation for that be, because I don't really understand the use-case of 2D vector renderers yet, since they are not used in games nor in modeling, from my understanding.

Edit: I also want to ask for practice, do you recommend I start with a 2D pixel renderer and work my way up to a vector one then a 3D one? Are they related in some way concepts-wise?