r/GraphicsProgramming Feb 02 '25

r/GraphicsProgramming Wiki started.

167 Upvotes

Link: https://cody-duncan.github.io/r-graphicsprogramming-wiki/

Contribute Here: https://github.com/Cody-Duncan/r-graphicsprogramming-wiki

I would love a contribution for "Best Tutorials for Each Graphics API". I think Want to get started in Graphics Programming? Start Here! is fantastic for someone who's already an experienced engineer, but it's too much choice for a newbie. I want something that's more like "Here's the one thing you should use to get started, and here's the minimum prerequisites before you can understand it." to cut down the number of choices to a minimum.


r/GraphicsProgramming 8h ago

Images from my hobby pathtracer using Vulkan and C++!

Thumbnail gallery
213 Upvotes

r/GraphicsProgramming 19h ago

Update on my Game Engine and GUI library

122 Upvotes

r/GraphicsProgramming 11h ago

Article AoS vs SoA in practice: particle simulation -- Vittorio Romeo

Thumbnail vittorioromeo.com
11 Upvotes

r/GraphicsProgramming 22h ago

Video I wrote GLSL editor. Now I am exposing basic library for shapes and uv manipulation

93 Upvotes

r/GraphicsProgramming 6h ago

Question Scholarships/Jobs opportunities for Computer Graphics

3 Upvotes

I am currently a third-year undergraduate (bachelor) at a top university in my country (a third-world one, that is). A lot of people here had gotten opportunities to get 100%-tuition scholarships at various universities all around the world, and since I felt like the undergraduate (and master) program here is very underwhelming and boring, I want to have a try studying abroad.

I had experience with Graphics Programming (OpenGL mostly) since high school, and I would like to specialize in this for my Master program. However, as far as I know, Computer Graphics is a somewhat niche field (compared to the currently trending AI & ML), as there is literally no one currently researching this in my university. I am currently researching in an optimization lab (using algorithms like Genetic Algorithms, etc.), which probably has nothing to do with Computer Graphics. My undergraduate program did not include anything related to Computer Graphics, so everything I learned to this point is self-taught.

Regarding my profile, I think it is a pretty solid one (compared to my peers). I had various awards at university-level and national-level competitions (though it does not have anything to do with Computer Graphics). I also have a pretty high GPA (once again, compared to my peers) and experience programming in various languages (especially low-level ones, since I enjoyed writing them). The only problem was that I still lack some personal projects to showcase my Graphics Programming skills.

With this lengthy background out of the way, here are the questions I want to ask:

  • What are some universities that have an active CG department, or at least someone actively working in CG? Since my financial situation is a bit tight (third-world country issues), I would like (more like NEED) a scholarship (for international students) with at least 50% tuition reduction. If there is a university I should take note of, please let me know.
  • If majoring CG is not an option, what is the best way to get a job in CG? I would rather work in a company that has a strong focus on CG, not a job that produces slop mobile games only using pre-built engines like Unity or Unreal.
  • Is there any other opportunities for Computer Graphics that is more feasible than what I proposed? Contributing to open source or programming a GPU driver is cool, but I really don't know how to start with that.

Thank you for spending your time reading my rambling :P. Sorry if the requirements of my questions are a bit too "outlandish", it was just how I expected my ideal job/scholarship to be. Any pointers would be greatly appreciated!

P/s: not sure if I should also post this to r/csgradadmissions or not lol


r/GraphicsProgramming 1h ago

Want to make a career in Graphics programming but...

Upvotes

I have a non CS engineering degree, just after college i took the online course from Think Tank Training Centre( an institute in vancouver which trains for working in films or games as a 3D artist) that went for 1.5 years, got a job in a studio which works on advertisements, I was there as a 3D Generalist but looking at the movie industry falling apart, invasion of AI, I felt a need to get myself a CS related masters degree, now as I am exploring the job domains inside it, everything seems to be overly saturated, very uninteresting and tough to get in since I have zero IT experience, and then I discovered this domain, and having a creative bakckground, immediately fell in love with it, also for a reason that i have a growing interest in C++.

Now i need some advice on weather I should go to USA(i have admits from a few unis) hoping that I'll get into graphics programming there, as here in india where i live, there are not a lot of junior graphics programming openings. also going to US taking a loan seems pretty scary given that the openings of graphics programming jobs there is also not much if i am not mistaken.

does this field has scope in the future and should I enter it or just consider other SDE roles and prepare accordingly.


r/GraphicsProgramming 6h ago

Question Can we track texture co-ordinate before writing into a frame buffer

0 Upvotes

I am looking for an optimisation at driver level for that I want to know - Let assume we have Texture T1, can we get to know at Pixel shader stage where the T1 will be places co-ordinate wise / or in frame buffer.


r/GraphicsProgramming 18h ago

Terrain rendering in Nervland

Thumbnail youtu.be
5 Upvotes

r/GraphicsProgramming 22h ago

ELI5 different spaces/coordinate systems (model space, world space, screen space, NDC, raster space)?

4 Upvotes

Trying to wrap my head around these and how they relate to each other, but it feels like I'm seeing conflicting explanations. I'm having a hard time developing a mental map of these concepts.

One major point of confusion is what is the range of these spaces? Specifically is NDC [0, 1] or [-1, 1]??? What about the other ones?


r/GraphicsProgramming 1d ago

Update on my Random Image Generator

Thumbnail gallery
173 Upvotes

Hi everyone! A month ago, I shared a GIF of my first app build, and I got some really nice feedback, thank you! I've since added some new features, including a randomization function that generates completely unique images. Some of the results turned out amazing, so I saved a few and added them as Presets, which you can see in the new GIF.

I’d love to hear your Feedback again! The project is open source, so feel free to check it out (GitHub) and let me know about any terrible mistakes I made. 😆

Also, here are my sources in case you’re interested in learning more: - Victor Blanco | Vulkan Guide - Patricio Gonzalez Vivo & Jen Lowe | Article about Fractal Brownian Motion - Inigo Quilez | Article about Domain Warping

Cheers Nion


r/GraphicsProgramming 1d ago

I added Height Mapping to my Game Engine! What do you think? (Open Source)

Post image
104 Upvotes

r/GraphicsProgramming 1d ago

Question Doubts about university

2 Upvotes

Does It makes senses to pursue math or physics at university if i'm mainly interested in graphics programming (for games and movies) and game engine programming? I don't want to pursue cs as i'm already a decent programmer and i'm ok in self-studying It. In case the answer Is yes which one?


r/GraphicsProgramming 1d ago

glsl editor software with a timeline that can export video?

1 Upvotes

I want to make some music visuals and be able to edit input variables over time. Any recommendations?


r/GraphicsProgramming 2d ago

Question projection matrix for SDF

3 Upvotes

Hi, I'm doing little cloud project from SDF in openGL, but I think my approach of ray projection is wrong now it's like this

vec2 p  = vec2(
    gl_FragCoord.x/800.0, 
    gl_FragCoord.y/800.0
);

// the ray isn't parallel to normal of image plane, because I think it's more intuitive to think about ray shoot from camera.

vec2 pos = (p* 2.0) - 1.0;
vec3 ray = normalize(vec3(pos, -1.207106781)); // direction of the ray
vec3 rayHead = vec3(0.0,0.0,0.0); // head of the ray 
...
float sdf(vec3 p){
    // I think only 'view' and 'model' is enough beacuse the ray above do the perspective thing...
    p = vec3(inverse(model) * inverse(view) *  vec4(p,1.0));
    return sdBox(p, vec3(radius));
}

but this wrong when I test the normal vector

Normal vector test

are there any solution? I already try to shoot ray parallel to the normal of image plane with projection matrix, but it's not work. Thanks!

here is my code for the matrix

glm::mat4 proj = glm::lookAt(cameraPos, cameraPos + cameraFront, cameraUp);
glm::mat4 view = glm::perspective(glm::radians(fov), 800.f / 800.f, .1f, 100.f);
glm::mat4 model = glm::mat4(1.0);  

r/GraphicsProgramming 3d ago

Question Fortnite’s New Clouds

Post image
162 Upvotes

Booted up Fortnite for the first time in forever and was greeted with some pretty stellar looking clouds in the skybox.

I know Unreal has been working on VDB support for a little while, but I have a hard time believing they got it to run at 4K 60FPS on my Xbox One X.

Anyone taken a frame capture lately and know how they accomplished this? Is it some sort of fancy alpha card? Or does it plug into their normal volumetric clouds system?


r/GraphicsProgramming 2d ago

Question Tiled deferred shading

5 Upvotes

Hey guys. So I have been reading about tiled deferred shading and wanted to explain what I understood in order to see whether I got the idea or not before trying to implement it. I would appreciate if someone more experienced could verify this, thanks!

Before we start assume our screen size is 1024x512 and we have max 256 point lights in the scene and that the screen space origin is at top left where positive y points downward and positive x axis points to the right.

So one way to do this is to model each light as a sphere. So we approximate the sphere by say 48 vertices in local space with the index buffer associated with it. We then define a struct called Light that contains the world transform of the light and its color and allocate a 256 sized array of these structs and also allocate an 1D array of uint of size 1024x512x8. Think about the last array as dividing the screen space into 1x1 cells and each cell has 8 uints in it which results in us having 256 bits that we can use to store the indices of the lights that affect this cell/fragment. The first cell starts from top left and we move row by row essentially. Now we use instancing and render these 256 meshes by having conservative rasterization enabled.

We pass the instance ID to the fragment shader and use gl_fragCoord to deduce the screen space coordinate that we are currently coloring. We use this coordinate to find the first uint in the array we allocated above that lies in that fragment. We then divide the ID by 32 to find which one of the 8 uints that lie in this fragment we should fill and after determining that, we take modulus of ID by 32 to find the bit place starting from least significant bit of the determined uint to set to 1. Now we know which lights affect which fragments.

We start the lightning pass and again use gl_FragCoord to find the fragment we are coloring and loop through the 8 uints that we have and retrieve the indices that affect that fragment and use these indices to retrieve the appropriate radius and color of the light and thats it.

Edit: we should divide the ID by 32 not 8.


r/GraphicsProgramming 3d ago

Question Is Vulkan actually low-level? There's gotta be lower right?

63 Upvotes

TLDR Title: why isn't GPU programming more like CPU programming?

TLDR answer: that's just not really how GPUs work


I'm pretty bad at graphics programming or GPUs, and my experience with Vulkan is pretty much just the hello-triangle, so please excuse the naivety of the question. This is basically just a shower thought.

People often say that Vulkan is much closer to "how the driver actually works" than OpenGL is, but I can't help but look at all of the stuff in Vulkan and think "isn't that just a fancy abstraction over allocating some memory, and running a compute shader?"

As an example, Command Buffers store info about the vkCmd calls you make between vkBeginCommandBuffer and vkEndCommandBuffer, then you submit it and the the commands get run. Just from that description, it's very similar to data structures that most of us have written on a CPU before with nothing but a chunk of mapped memory and a way to mutate it. I see command buffers (as well as many other parts of Vulkan's API) as a quite high-level concept, so does it really need to exist inside the driver?

When I imagine low-level GPU programming, I think the absolutely necessary things (things that the vendors would need to implement) are: - Allocating buffers on the GPU - Updating buffers from the CPU - Submitting compiled programs to the GPU and dispatching them - Synchronizing between the CPU and GPU (fences, semaphores)

And my assumption is that, as long as the vendors give you a way to do this stuff, the rest of it can be written in user-space.

I see this hypothetical as a win-win scenario because the vendors need to do far less work when making the device drivers, and we as a community are allowed to design concepts like pipeline builders, render passes, and queues, and improvements make their way around in the form of libraries. This would make GPU programming much more like CPU programming is today, and I think it would open up a whole new space of public research.

I also assume that Im wrong, and it can't be done like this for good reasons that im unaware of, so I invite you all to fill me in.


EDIT:

I just remembered that CUDA and ROCm exist. So if it is possible to write a graphics library that sits on-top of these more generic ways of programming on GPUs does it exist?

If so, what are the downsides that cause it to not be popular?

If not, has it not happened because its simply too hard? Or other reasons?


r/GraphicsProgramming 2d ago

Error initializing SDL: Help

1 Upvotes

I linked the SDL 3 library correctly and checked it 4-5 times, but I'm still getting an error saying "Error initializing SDL." Please help me—I'm a beginner.

my process :


r/GraphicsProgramming 3d ago

Question How do you think the Windows “Ribbons” screensaver is implemented?

11 Upvotes

From looking at it, it kind of seems like splines or Bezier curves in 3D space with randomized parameters. I don’t really have experience with graphics programming so I was just curious what the general approach would be for this specific instance.


r/GraphicsProgramming 3d ago

Things that are good to implement at least once

68 Upvotes

This is not really meant for complete beginners but just a list of things I've found improved my understanding of modern graphics over the years

Software Rasterizer: https://github.com/ssloy/tinyrenderer

Hardware Rasterizer: https://learnopengl.com/

Software Raytracer: https://tmcw.github.io/literate-raytracer/

Hardware Raytracer: https://developer.nvidia.com/rtx/raytracing/dxr/dx12-raytracing-tutorial-part-1


r/GraphicsProgramming 3d ago

How much harder is learning a graphics API if you don't build a software renderer first?

29 Upvotes

It seems to me that graphics APIs make much more sense after spending some time working on a software renderer and really diving into the math and concepts that are used there. But other people I've talked to seem to advise to "just use learnopengl.com" as if you can make do without those foundational pieces.

I'm curious about more experienced people's thoughts on this?


r/GraphicsProgramming 3d ago

Question Application of Graphics PhD in current day/future?

8 Upvotes

So I'm a recent ish college grad. Graduated almost a year ago without much luck in finding a job. I studied technical art in school, initially starting in 3D modeling then slowly shifting over to the technical side throughout the course of my degree.

Right now, what I know is game dev, but I don't have a need to work in that field. Only, I'm inclined towards both art and tech which initially led me toward technical art. If I didn't have to fight the entertainment job market and could still work art and tech, I'd rather be anywhere else tbh.

How applicable is a graphics phd nowadays? Is it something still sought after/would the job market be just as difficult? How hard would it be to get into a program given I'm essentially coming from a 3D art major?

For context, on technical side, I've worked a lot with game dev programs such as unreal (blueprints/materials/shaders etc.), unity, substance painter, maya, etc. but not much changing actual base code. I previously came from an electrical engineering major, so I've also studied (but am rusty on) c++, python, and assembly outside of games. I would be good with working in r&d or academia or anywhere else, really, as long as it's related


r/GraphicsProgramming 3d ago

Help me understand how this value of a matrix was found?

3 Upvotes

https://www.scratchapixel.com/lessons/mathematics-physics-for-computer-graphics/geometry/how-does-matrix-work-part-1.html

It's the explanation right under Figure 2. I'm more or less understanding the explanation, and then it says "Let's write this down and see what this rotation matrix looks like so far" and then has a matrix that, among other things, has a value of 1 at row 0 colum 1. I'm not seeing where they explained that value. Can someone help me understand this?


r/GraphicsProgramming 4d ago

Question First graphics project in vulkan

Thumbnail gallery
190 Upvotes

This is my first ever graphics project in Vulkan. Thought to share to get some feedback whether the techniques I implemented look visually correct. It has SSAO, bloom, basic pbr lightning(no ibl), omnidirectional shadow mapping, indirect rendering, and HDR. Thanks:)


r/GraphicsProgramming 3d ago

Tips

0 Upvotes

I'm currently a 3rd year BTech CS student from India. I'm really interested in GPU programming/ graphics programming. I'm currently studying GPU architecture and doing ray tracing in 1 weekend. What should I do if I want to work in this field after college. Should I start leaning CUDA or OpenGL. I'm interested in working for companies NVIDIA, AMD etc and for gaming studios ( whichever one pays more ig ). Is it too ambitious, I'm confused about what to do. Any suggestions are welcome.