r/GraphicsProgramming • • Jan 18 '20

Hello Folks

4 Upvotes

Hello folks, i am just 20 years old digital game design student. My studying aims to learn game design basic, game theory, sound design for games, writing, gamer psychology some programming c# for unity, c++ and i had a math class which is just Matrices and etc. . Eventually it s like whole game desing in a nutshell. But ... i want to learn computer graphics deeply. Like real-time rendering, shader programming and more stuff. I do not need to learn but i d love to. So i ve just started a month ago to learn on my own. I ve almost finished Lineer Algebra. I gotta refresh my trigonometry and geometry knowledge which is last from highschool. And i ll gain my old c++ knowledge in two weeks. Because i m programming on Unity with c# nowadays. When i have prerequisites, i m planning start from here https://learnopengl.com/ and so. If you did not understand my goal, it is, like , i wanna learn customSRP, making maps, oceans , mountains for games by help of programming. Maybe this kind of stuff for games( https://www.instagram.com/p/B7IhxP6Hsm8/ ). At least i wanna learn the fundementals which is enough to do some of them. Thanks for reading....


r/GraphicsProgramming • • Aug 22 '20

Why directxtk11 sample runs faster than imgui dx11 sample on empty scene?

4 Upvotes

I removed all the rendering and only called the ClearRenderTargetView. I even tried checking it in renderdoc but even though directxtk renders those models, it is still faster than imgui dx11 sample. I tried both imgui's sdl and win32 samples both slower than directxtk.

I've been figuring this for over 2 days now but I can't figure out what's happening.

Directxtk11: https://github.com/walbourn/directxtk-samples/blob/master/SimpleSampleWin32/Game.cppImgui + Win32: https://github.com/ocornut/imgui/blob/master/examples/example_win32_directx11/main.cpp

Imgui + SDL2: https://github.com/ocornut/imgui/blob/master/examples/example_sdl_directx11/main.cpp

I also tried bgfx example0 in dx11 build and it runs constantly at 60fps.

Btw, I ran all of these in my windows 10 vmware.

EDIT: I looked at bgfx renderer_d3d11.h ( https://github.com/bkaradzic/bgfx/blob/master/src/renderer_d3d11.h ) and it seems like directxtk11 and bgfx uses directx 11.1? and on the imgui sample is only directx11. Is that reason why? I guess I have to try out and see. lol

EDIT2: I converted my project to use <d3d11_1.h> and <d3d11_6.h> headers and it's running like in dxtk11 samples now inside my windows vm (60fps). Amazing. My opengl 3.3 project as expected runs really slow at 20-25fps. Sad drivers. :(


r/GraphicsProgramming • • Jun 26 '18

SRGP vs. OpenGL vs. SDL

4 Upvotes

I'm trying to follow Foley's CG book, and I found he uses SRGP, but searching around the internet I found that it's worthless to learn SRGP. So, I'm wondering how does SRGP compare with OpenGL?(Because, that's the only other thing I've heard related to Graphics Programming, and is popular). Would it be Okay to read theory from Foley's book and implement them with OpenGL or something? And How does OpenGL compare with SDL?


r/GraphicsProgramming • • Mar 29 '15

Let talk about Okami, Princess kaguya graphic alike

4 Upvotes

How on earth this guy created this kind of graphic, possibly making it . lets discuss


r/GraphicsProgramming • • Apr 27 '22

Video Unity Gamedev : Fixed Tessellation Shader!

Thumbnail
youtu.be
0 Upvotes

r/GraphicsProgramming • • 7d ago

Simulating 3D Foliage purely in GPU - Uverse Game Engine

41 Upvotes

This is heavily inspired by "The Legend of Zelda: Breath of the Wild", but with combination of inspiration with Wall-E. Altho, I might change the main character for something else for better fitting to the natural environment lol.

What I've been mainly working on is Foliage (Grass) Simulation of which I added in Uverse (my own Game Engine) directly, and then I used it for this project for game demo, of which I am developing and focusing now!

This is made with own custom game engine (no threejs no godot) which runs natively in WebGPU/WASM but also supports natively in Direct12, Metal and Vulkan too. And this Foliage simulation has been rendered by vertex shader, not a geometry/mesh - The foliage simulation is actually split into small cells, and one instanced draw per detail level builds every blade in the vertex shader. No blade is stored. The grass is highly interactive with the wind itself (just two layers of scrolling noise for the gusts and a small per-blade flutter), highly customizable with the different grass colors, dryness, batches and of course, it also supports collision system to interact the grass with object. This is something I always wanted implement it for the past 15 years (when I was very young game dev), but only now I implemented it for the first time and I feel proud of this work. ^^

Disclaimer: Most code + 3d assets has been generated by Uverse's AI "Orbit"

If you have questions, shoot either here in comment or in DM! :)

Check it out at https://uverse.dev for more information

This method has been implemented from
Procedural Grass in 'Ghost of Tsushima' in GDC 2021


r/GraphicsProgramming • • May 25 '24

Why does learning graphics programming have to be so hard?

25 Upvotes

I want to start learning graphics programming, it seems very interesting to me- with my aspirations of learning programming. Everyone recommends OpenGL for complete beginners and OpenGL is very difficult and lengthy, and I have no knowledge, and I don’t understand what is going on. I’ve been trying to learn OpenGL, but with my current knowledge I seem to lack the motivation and strength and will to even continue, all of this, and me graduating high school- and feeling lost in life, makes everything feel impossible. I keep on looking on YouTube for guides, but even the guides never stick with me. Everything is so difficult. I even have been taking more of my adhd medication, sometimes 1 every hour, when I’m supposed to only take one per day. Just so I can suppress my emotions, and suppress my mind, in order to combat the stress that I have- and continue learning, but even that fails, as my emotions surpass my medication. I really don’t know what to do, it’s like I cannot learn graphics programming, and nothing will ever work. I really love programming, and I want to do it, at least I think I do, this thing might actually might not be for me. And I keep on trying, I don’t want to give up, but my mind keeps on telling me that I should. I try to program everyday, finding the motivation to getting out of bed, copying the window setup codes from learnopengl.com and pasting them, because typing them is a pain, I have to remember all of the functions, and all of the codes. I just have no motivation to continue spending time on this, it’s too difficult, this is hard. Does anyone have any tips, tricks, resources, or insight to how I can learn graphics programming better, even if that means from the start, from scratch. Like learning how to use training wheels, before taking them off. Like using high level api, then transitioning to OpenGL. But nonetheless, This all makes no sense, it’s hard, it makes me angry, and is really stressing me out.


r/GraphicsProgramming • • Feb 06 '26

I wrote a language that compiles DIRECTLY to human-readable HLSL (bypassing SPIR-V). Python-like syntax, Rust-like safety, and it's already fully self-hosted.

Thumbnail
github.com
0 Upvotes

All details on my github repo. readme.md See the /kore-v1-stable/shaders folder for the beauty of what this language is capable of. Also available as a crate -

cargo install kore-lang

I like to let the code do the talking

HLSL shaders in my language ultimateshader.kr 

Compiled .HLSL file ultimateshader.hlsl

Standard Way: GLSL -> SPIR-V Binary -> SPIRV-Cross -> HLSL Text (Result: Unreadable spaghetti)

Kore: Kore Source -> Kore AST -> Text Generation -> HLSL Text.

Kore isn't just a shader language; it's a systems language with a shader keyword. It has File I/O and String manipulation. I wrote the compiler in Kore, compiled it with the bootstrap compiler, and now the Kore binary compiles Kore code.

edit: relating to it being vibe coded. lol if any of you find an AI that knows how to write a NaN-boxing runtime in C that exploits IEEE 754 double precision bits to store pointers and integers for a custom language, please send me the link. I'd love to use it. otherwise, read the readme.md regarding the git history reset (anti-doxxing)


r/GraphicsProgramming • • Jun 18 '22

This is how photomosaics are made. Each piece of the main image is replaced with the closest small picture

0 Upvotes

r/GraphicsProgramming • • 18d ago

How two lines of GLSL nearly drove me crazy (AMD driver crash)

9 Upvotes

Recently, I ran into a really nasty bug in the custom 3D engine I'm developing for my 4X strategy game, The Great Tribes.

After updating my AMD graphics driver, the game started freezing completely when moving the camera, especially when large areas of the map became visible.

Sometimes the graphics driver would hang. Other times, the JVM would crash inside atio6axx.dll.

The weirdest part? Everything worked perfectly with the previous driver and on other GPUs!

I spent hours investigating almost everything: OpenGL multithreading, VAOs, VBOs, index buffers, shadows, unit models, and even glfwSwapBuffers().

Eventually, I narrowed the issue down to terrain rendering, and then to the fragment shader.

That's where I found these two lines:

int segment = (3 - int(min(3, outTexCoord.y * 4.0))) * 4
            + int(min(3, outTexCoord.x * 4.0));

The segment variable was used to index arrays containing 16 elements.

The problem? The texture coordinates were clamped at the upper bound, but not at the lower bound.

When the texture coordinates became negative, segment could go outside the valid array range.

The fix was surprisingly simple:

ivec2 cell = clamp(
    ivec2(floor(outTexCoord * 4.0)),
    ivec2(0),
    ivec2(3)
);

int segment = (3 - cell.y) * 4 + cell.x;

And the freezes disappeared!

This turned out to be a great example of undefined behavior in GLSL.

The old driver somehow tolerated the invalid array access, other GPUs didn't show any obvious issues, but the updated AMD driver turned it into a nightmare.

Lesson learned: Just because your shader works perfectly on one GPU doesn't mean it's free of bugs.

And sometimes, after hours of debugging your own 3D engine, the whole problem comes down to just two lines of code. 😁


r/GraphicsProgramming • • Aug 24 '26

Created interactive 10M particles in WebGL, running in the browser

102 Upvotes

Live demo: https://gaploid.github.io/stardust/
Source code: https://github.com/Gaploid/stardust
Coded by: Opus, Fable, human attention to details


r/GraphicsProgramming • • Feb 22 '24

Can someone explain me how you would draw a piramid?

0 Upvotes

I have never done any coding or graphics so some questions could be wrong. We have now 4 triangles and 1 quad.

  1. How do you draw it? Do you send vertex in order to the gpu and tell it to draw?

  2. I dont know if recent gpus do support quad rendering but most do break down to triangles? How do you determine the break down?

  3. The whole figure would be one color blob, so we need some basic "lighting"? Like adding a darker color to the sides and the front a more lighter color? There would be no 3d figure visible else.

  4. How do you draw the planes of the triangles? How do you know where to draw at all there?

  5. You would try to connect the vertexes to the neightbor, so that you have lines, but there is no infinite resolution, how do you determine where to place the pixel? Do you "mix" the pixel with the background? Like antialiasing?

  6. How do you do the perspective? the quads last two vertexes would be more next to each other and less far away?

  7. If you decide to rotate it, how do you compute the positions of all vertexes?

  8. If you have a windows where you can press down your mouse to rotate the figure, you wouldnt redone the vertex again and again? How do you store the matrix? On rotation, the side that was before on the back could now be the front, so lighter color? And all lines and perspectives have to be redone? The planes have to be redrawn? Sounds like a lot of work.

  9. You could also add a texture, some texture parts could be reused on multiple sides, how do you determine what position and coords on the texture?

  10. How do you store the texture?

  11. Wouldnt the texture get stretched if the figure side is bigger than the texture?

  12. What part do you save after rotation? The more you save the more performance gain? Do oyu have to redraw the texture planes and sides on every rotation?

  13. How do you scale it? Is it done similar to rotation then?

  14. How do you make sure you dont connect tje vertexes wrongly, causing weird planes and lines?

  15. What kind of coordinate is used so that its not too slow on 32 bit? Is floating point big enough?

  16. If you add another figure, how do you make sure its drawn in front if its in front?

  17. If its transparent, how would you do this? How do you combine the colors on antialiasing and transparent colors?

  18. How do you combine the lighting with the colors, resulting in darker or lighter color?

  19. How do you make sure nothing is drawn outside of the visible window, how do you make sure the planes and axis that are inside the window, but not visible, are not drawn?

Thanks for explanation, Im happy to explore.

PS: You are just downvoting this because:

  • you dont know the answers or

  • you know my goals and disagree with my philosophy

  • you hate me all

  • you dont want to answer to keep telling me that i know nothing.

You cant deny these questions are valid thats why you have to downvote.


r/GraphicsProgramming • • May 19 '15

How come there is too many things to learn about graphics? Yet there are so many video games out there?

11 Upvotes

I mean my mind was almost blown by how much terms (multisampling, render units, vertical sync) the graphic designer should learn. Yet there are so many games around us...


r/GraphicsProgramming • • Sep 16 '26

[Project] [OpenGL] [Post‑Processing] I built opengl32_enhancer: a drop‑in OpenGL32.dll that adds modern GPU post‑processing to old games

Thumbnail
gallery
17 Upvotes

I’ve been experimenting with DLL proxying and decided to build a project called opengl32_enhancer — a custom opengl32.dll that intercepts OpenGL calls and injects a modern GPU post‑processing pipeline into any OpenGL game or application.

👉 Repo: https://github.com/ASDAlexander77/opengl32_enhancer

⭐ What it does

This DLL sits between the game and the real OpenGL driver. It forwards all GL calls normally, but also:

  • Captures the final framebuffer

  • Runs a GPU post‑processing chain

  • Outputs the enhanced frame back to the application

No source code access required. No game mods. Just drop the DLL next to the executable.

✨ Current effects implemented

  • Sharpening (adjustable)

  • TAA (Temporal Anti‑Aliasing)

  • HDR tonemapping

  • Bilinear upscale test pipeline (experimental)

These effects work even in old OpenGL 1.x / 2.x games that never had modern AA or HDR.

🧩 How it works internally

  • Full OpenGL function interception

  • Real GL calls forwarded via function pointers

  • Custom FBO + shader pipeline injected after SwapBuffers

  • Uses GL 4.x features internally even if the game uses GL 1.1

  • No changes to the game’s rendering code — everything is external

🛠️ Why I built it

I wanted a way to bring modern visual quality to older OpenGL titles without touching their code. DLL proxying turned out to be a surprisingly flexible way to do this.

📌 What’s next

  • FXAA / SMAA

  • Bloom

  • ACES tonemapping

  • LUT color grading

  • Optional UI overlay for settings

  • Per‑game config files

If you’re into graphics hacking, DLL proxying, or OpenGL internals, I’d love feedback — especially on stability, shader ideas, or pipeline improvements.


r/GraphicsProgramming • • Dec 15 '18

Check out my blog, Parly Shaderly. I do gamedev and graphics programming tutorials. Beginner level. As I'm a beginner myself.

Thumbnail
partlyshaderly.com
6 Upvotes

r/GraphicsProgramming • • Jul 28 '25

Question Is it fine to convert my project architecture to something similar to that I found on GitHub?

3 Upvotes

I have been working on my Vulkan renderer for a while, and I am kind of starting to hate its architecture. I have morbidly overengineered at certain places like having a resource manager class and a pointer to its object everywhere. Resources being descriptors, shaders, pipelines. All the init, update, and deletion is handled by it. A pipeline manager class that is great honestly but a pain to add some feature. It follows a builder pattern, and I have to change things at like at least 3 places to add some flexibility. A descriptor builder class that is honestly very much stupid and inflexible but works.

I hate the API of these builder classes and am finding it hard to work on the project further. I found a certain vulkanizer project on github, and reading through it, I'm finding it to be the best architecture there is for me. Like having every function globally but passing around data through structs. I'm finding the concept of classes stupid these days (for my use cases) and my projects are really composed of like dozens of classes.

It will be quiet a refactor but if I follow through it, my architecture will be an exact copy of it, atleast the Vulkan part. I am finding it morally hard to justify copying the architecture. I know it's open source with MIT license, and nothing can stop me whatsoever, but I am having thoughts like - I'm taking something with no efforts of mine, or I went through all those refactors just to end up with someone else's design. Like, when I started with my renderer it could have been easier to fork it and make my renderer on top of it treating it like an API. Of course, it will go through various design changes while (and obv after) refactoring and it might look a lot different in the end, when I integrate it with my content, but I still like it's more than an inspiration.

This might read stupid, but I have always been a self-relying guy coming up with and doing all things from scratch from my end previously. I don't know if it's normal to copy a design language and architecture.

Edit: link was broken, fixed it!


r/GraphicsProgramming • • Jul 29 '21

Video Continuing from last time, these are projectiles under design. New projectiles are constantly being added. We keep improving it until the day it's used in a great game.

3 Upvotes

r/GraphicsProgramming • • Apr 10 '21

Computer Graphics MCQ Questions | Courseya

Thumbnail
courseya.com
0 Upvotes

r/GraphicsProgramming • • Nov 14 '20

How to implement math in a CUDA based ray tracer?

3 Upvotes

I just learnt a bit of CUDA and some of it's basics, and now I'm on the look for tools to handle all the mathematic operations. I know the math needed, but I don't want to implement everything by myself. I looked up the cuda math library and cublas but I still couldn't find any functions to do all the operations. Things like dot products, cross products, integrals and so on.

How can I use CUDA for these operations without doing everything from scratch?

Take in mind I'm a beginner in CG and programming as a whole.

Thanks Ahead!


r/GraphicsProgramming • • Nov 09 '20

Article The effortless way to process images with OpenCV Canny algorithm.

Thumbnail
martinpocius.medium.com
3 Upvotes

r/GraphicsProgramming • • Nov 17 '21

Video Game Engine Programming: Hey everyone, To all Barry's out there: I did something that's even Barrier! #DadJokes

Thumbnail
youtu.be
0 Upvotes

r/GraphicsProgramming • • Dec 20 '21

Question x64 instructions for GPU stuff?

3 Upvotes

I am thinking about creating an OS, just for myself, but I wanna do 3D games on it. Can I just write my own driver for one specific GPU (nevermind the logistics, this is a hobby project. I just want to know if it is POSSIBLE), and how would I do that?


r/GraphicsProgramming • • Dec 24 '24

Question Best graphics program for beginner to test out

3 Upvotes

I am building a car repair education tool. I have used Generative AI to write prose from the OEM repair model on every major autopart. However, it is not super user friendly. I am looking for a way to overlay the design of a car (make, model, year) and have the end user point to the part they are looking at and then have the instructions for repair come up (based on the OEM repair model

What graphics do I need to build this prototype? I have a background in AI programming but none in graphics.

If it helps, I am building my prototypes so far on Tesla Model Y 2023 and Toyota Camry 2020 (ICE)


r/GraphicsProgramming • • Jun 03 '21

Request Advice on RA'ships (research assistantships) in graphics for someone who has no academic experience in graphics

3 Upvotes

I am currently a Deep Learning / Computer Vision researcher in a very well-known company. I graduated in 2020 with an undergrad degree in electronics engineering and have been working here ever since. I have recently been strongly considering leaving my job to pursue a Ph.D. One of the largest reasons I chose to work before heading for a Ph.D. is because of my low GPA (7.2/10.0).

I do have a top conference publication and will be submitting a paper and filing a patent soon, but all of them are in machine learning. I strongly intend to move towards graphics, 3D Computer Vision, and neural rendering - but have no experience whatsoever in these areas (I maintain a toy path tracer and implemented a real-time mesh viewer a while back, but I'm assuming pet projects won't be taken seriously). I very strongly intend to apply for a Ph.D. in CS and explore these areas throughout my doctorate. The most common advice I have always got is to do a RA'ship focusing on graphics and publish in the area before thinking about a Ph.D., which tbh makes a lot of sense.

How perceptive would top professors be in having a research assistant with no experience in the field but extensive experience in a mildly related area? I would think neural rendering is pretty niche and it would really be rare to find people with extensive experience anyway. And does anyone know any labs or professors in graphics who are open to having RA's who need not have previously worked in graphics? Any help or advice would really be appreciated!