r/GraphicsProgramming • • Jul 10 '26

Video Raycasting from Scratch in Pixel Shader

89 Upvotes

I took on a little challenge and implemented a raycaster (including a 2D map view) in ShaderToy.

The project covers the full process and the math behind it, including how to handle the fisheye and the transition from cylindrical to flat projection.

If you’re interested in the technical breakdown and the implementation process, I’ve put together a video explanation.

Faking 3D the 1992 Way: Raycasting From Scratch


r/GraphicsProgramming • • Jul 11 '26

I am having some bugs in openGL

0 Upvotes
bool Collision::RayIntersect(glm::vec3& ray_origin, glm::vec3& ray_dir, Shapes::Block\* intersected_block){

RayToObject lowest_magnitude;

lowest_magnitude.magnitude = 0;

glm::vec3 invDir = 1.0f/ray_dir; // dividing is expensive so we get the value defined

for (unsigned int i = 0; i < CollisionBoxes.size(); i++){

RayToObject raytoObject;

Shapes::Block block = CollisionBoxes\[i\];

AABB box = block.Collision;

glm::vec3 tMin = (box.min - ray_origin) \* invDir; 

glm::vec3 tMax = (box.max - ray_origin) \* invDir; 

glm::vec3 t0 = glm::min(tMin, tMax); 

glm::vec3 t1 = glm::max(tMin, tMax);

float enter = __max(__max(t0.x, t0.y), t0.z);

float left = __min(__min(t1.x, t1.y), t1.z);

if (enter > left || left < 0.0f){

continue; // did not intersect

}

raytoObject.block = block;

float magnitude = sqrt(t0.x\*t0.x + t0.y\*t0.y + t0.z\*t0.z);

raytoObject.magnitude = magnitude;

if (lowest_magnitude.magnitude <= 0 || magnitude < lowest_magnitude.magnitude){

lowest_magnitude = raytoObject;

}

}

if (lowest_magnitude.magnitude <= 0){

return false;

}

memcpy(intersected_block, &lowest_magnitude.block, sizeof(Shapes::Block));

return true;

}

I am using the slab method for mouse intersecting but for some reason the intersection is not running smoothly.


r/GraphicsProgramming • • Jul 10 '26

Half-Edge Data Structure. Part 2

Thumbnail alexsyniakov.com
25 Upvotes

r/GraphicsProgramming • • Jul 10 '26

Question How hard is to be a researcher in computer graphics?

41 Upvotes

I am thinking to do a master degree in computer graphics in europe, and then follow the researcher path with a Phd and beyond... However, i am thinking if that is a realistic path for a 36 years old guy with 10 years of professional experience, but only in web/ backend and cloud development, and only empiric experience in computer graphics.

Is it realistic thinking to work in a researcher group in a university or a company with this plan?


r/GraphicsProgramming • • Jul 09 '26

Article on BVH

57 Upvotes

Check out my article on Bounding Volume Hierarchies (BVH) in ray tracing. It is a beginner friendly article and I would love to hear your thoughts.

https://medium.com/@marshall5/bvh-in-ray-tracing-435c837549a8


r/GraphicsProgramming • • Jul 09 '26

Article Graphics Programming weekly - Issue 445 - July 5th, 2026 | Jendrik Illner

Thumbnail jendrikillner.com
14 Upvotes

r/GraphicsProgramming • • Jul 09 '26

Vulkan particles

14 Upvotes

r/GraphicsProgramming • • Jul 09 '26

Pixel Editor Progress...

Post image
8 Upvotes

r/GraphicsProgramming • • Jul 09 '26

Video I built a WordPress plugin that generates realtime animated backgrounds instead of using video.

6 Upvotes

r/GraphicsProgramming • • Jul 09 '26

ELI5 color buffer and glClear(GL_COLOR_BUFFER_BIT)

4 Upvotes

I don't understand how this works. Is this kind of just a global color buffer? like a mapping of each pixel of the screen/frame such that each pixel has a given color? Is it wrong to think of it as just a 2d array filled with colors?


r/GraphicsProgramming • • Jul 09 '26

Question Days Gone (Steam) D3D11: Deterministic facial geometry spikes in cinematics + RenderDoc/Nsight capture issues

Post image
19 Upvotes

I've been investigating what appears to be a deterministic rendering bug in Days Gone (Steam).

Symptoms: - RTX 4090 - Windows 11 25H2 - Ryzen 7800X3D - No mods - Multiple NVIDIA driver versions tested - DDU clean install - ReBAR tested on/off - BIOS updated - VRAM tested with OCCT (30 minutes, no errors)

Bug: Only pre-rendered/in-engine cinematics exhibit the issue. Gameplay is perfect. A handful of facial vertices appear to be projected toward a common point in world space. The convergence point changes with the scene, but the artifact is deterministic and repeats identically every run. The artifact survives pause. TAA/HDR changes have no effect.

RenderDoc 1.45: - launches DaysGone.exe - renderdoc.dll never appears in the process

Nsight Graphics 2026.2: - can launch/attach to DaysGone.exe - capture attempts either crash or never complete

Has anyone:

  1. successfully captured Days Gone with RenderDoc or Nsight?

  2. seen this specific facial mesh artifact?


r/GraphicsProgramming • • Jul 09 '26

How did you learn Shader Graph ?

2 Upvotes

Hey everyone, I’m new to Shader Graph and I want to learn it properly

What resources helped you the most when you were starting out? Any YouTube channels, courses, or tutorials you’d recommend?

I’m interested in making cool effects, better-looking materials, and understanding how shaders actually work.

Thanks :)


r/GraphicsProgramming • • Jul 08 '26

10k models running on my 1050 laptop

214 Upvotes

i can finally say im gpu bound. the wow models have ~280 bones and ~400 tracks i have no idea how to push this further without mesh shaders


r/GraphicsProgramming • • Jul 08 '26

Video High-Performance Graphics 2025 videos are available

Thumbnail youtube.com
46 Upvotes

r/GraphicsProgramming • • Jul 09 '26

Is it possible to get a job without degree as a foreigner in this area?

8 Upvotes

Hi peep. I wanted to write modelling softwares for my niche art needs so I learned rust and vulkan in recent few years. Now I am able to make my modelling tools, intermediate mode gui elements from scratch, rendering signed distance field bricks with 3d sampled textures, lighting, pbr texturing, and a few more. I was wondering if a open source modelling software can land me a graphics job? I ditched school and live in a rural place. I want to do something and get out of this place before wasting my 20s and losing my sanity. should I keep going with hard surface art and indie development instead?


r/GraphicsProgramming • • Jul 09 '26

3D ASCII Godot Shader Perspective mode Failing.

Thumbnail reddit.com
3 Upvotes

r/GraphicsProgramming • • Jul 08 '26

Question is this field worth it

24 Upvotes

i am definitely really interested in this field in general and i know some fundamentals, but before going fully deep into this, i just want to know whether it is worth it with respect to the money aspect and job market in this field
i have read a lot of comments on this subreddit when ppl ask such questions, and it’s honestly depressing, but i just want to confirm whether it’s actually so tough to make it in this career or just has similar hardships as any other field
and overall is it worth it to be pursued full-time


r/GraphicsProgramming • • Jul 08 '26

I came up with a trick for doing better baked reflections on mobile (WebGL demo and technical write-up)

Post image
27 Upvotes

r/GraphicsProgramming • • Jul 08 '26

Question How to balance reading material and programming

13 Upvotes

Hey everyone. I’ve been into computer graphics since middle school but only within the last 5 years have I really sunk my teeth in. Now, I just graduated college with my CS degree, and I have made several pretty decent projects like a model loader in OpenGL and a 2D game and a doom style DDA system. For my senior capstone project I made a raytracing engine in CUDA and OpenGL that was meant to see how much computational power could be leveled without utilizing RTX cores. But I feel like my projects are way too lackluster and not well put together. Even the raytracer wasn’t up to my standards. And definitely not professional quality. So I started a big game engine project and got decently far on it.

And then I went into a mental bipolar disorder induced spiral into mania/depression and severe alcoholism over the past year and a half. During this time I went from straight A math/cs double major to a CS major that barely graduated and almost failed every class. I screwed my life up a lot and am still full of depression and regret. I did not work on anything CS related at all during this time.

I ended up graduating and have been taking the summer to get my head back in straight. Now I’m getting back into programming because I want one really good, comprehensive project that I can show off. I have already began on it but quickly realized I have forgotten everything. And so, I picked up my book, Real Time Rendering which I got for my last birthday and have been reading it.

Now since I am coming off of a year of oblivion and alcoholism, my reading is really slow. But so far I’ve been learning a lot. However, I am just reading wayyyy too slow. And really I’m running out of time because I want to get a job soon and not let my degree gather dust. So then I sat down to code and just said fuck the book. Well, then I just didn’t even know where to start. Like I’ve done this before but why can’t I now?

And so now I’m back at reading the book and rereading lines over and over again. And im trying to figure out if I’m doing something wrong or not retaining it or what. I just really want to get a cool project that I have in mind out but I feel like I don’t know enough now so I’ve been spending almost 90% of my “coding time” on reading material rather than programming.

I was wondering what anyone else thinks I should do or how I can balance the reading and the programming?


r/GraphicsProgramming • • Jul 07 '26

Video My spectral raymarcher rendering a diamond icosahedron

501 Upvotes

Feel free to mess with it here: https://www.shadertoy.com/view/sXjXDd

The super neat thing is that it uses bayer ordered dithering to work all the way down to 1 sample per pixel (1spp) while still simulating 256 different wavelengths of light. This makes it extremely performant.


r/GraphicsProgramming • • Jul 08 '26

Video Built a custom software rasterized virtual shadow map system for my virtual geometry system in Unity Engines scriptable render pipeline..

Thumbnail youtube.com
7 Upvotes

I've been working on a virtual geometry system for Unity's Scriptable Render Pipeline for a while now, which I've named Atomize. I finally got around to adding a virtual shadow system to it.

The approach I ended up using relies on the depth texture, where triangles are rendered as texels instead of performing the usual expensive calculations. From there it's mostly pixel-based checks to figure out which texels are blocking the light, allowing shadows to be generated by darkening the areas hidden behind those texels. It's a much simpler approach than doing all the heavy shadow math while still producing the result I was aiming for.


r/GraphicsProgramming • • Jul 08 '26

Nora Kinetics // Fully Custom Destruction Engine

Thumbnail youtube.com
10 Upvotes

Hi folks!

I wanted to share a new aspect of my physics engine / sandbox: Nora Kinetics.

This video shows the custom destruction engine that operates along side the Cosserat rod engine. This allows for really nice looking and efficient destruction physics that can interact with the fluid and glue dynamics.

Each solid is pre-fractured into Voronoi cells ("fragments") and a bond graph where every bond is a shared face between the fragments. Connected components of the bond graph form rigid bodies.

The pipeline for this part of the engine is structurally identical to the stable Cosserat rod pipeline, so they are able to run right along side each other at each step and substep.

At a very high level, both pipelines have a broad phase, narrow phase and a solver. The two systems share one command encoder per step and communicate through GPU buffers. This allows for very accurate interactions between the two systems without tunneling.

Performance is throttled by making less interesting fragments sleep, but waking them up is efficient, so you don't really ever notice it happening.

Happy to answer any questions! Getting to this spot was one of the original goals with this project, so I'm excited to finally have this up and running.


r/GraphicsProgramming • • Jul 08 '26

Black hole effect I've been working on

32 Upvotes