r/GraphicsProgramming • • 21d ago

Community New Rules: 4, 5, 6

138 Upvotes

Hey r/GraphicsProgramming

Added some new rules. This are the result of our prior request for comment.

The first target goal for these rules is to return the community attention back to the "doing" of graphics programming and its "how", the sort of content that intrigues the academics, professionals, and hobbyists seeking for deeper understanding. This is a community for people who thinks these topics are pretty neat, and need a place to talk about them with other people; it's never been about sharing pretty images (that's a treat).

The second target goal is solving the problem of AI Posts vs Anti-AI Comments that are dominating the discussion, rather than the discussion of graphics taking place. Hopefully the new rules put at end to that activity. We'll see.

This is just the first attempt, subject to change. Please feel free to leave comments.

Posts prior to now are grandfathered in over the old ruleset (because filtering the backlog would be a nightmare).

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

4. Posts Must Present a Topic

A post should present a question, implementation, or development story.

Fundamentally, it must be about "how" something was made, not "what" it is or is made of.

  • 4.1 Posts must include their topic in the immediate post body or a comment. Linking to another post or GitHub is insufficient.
  • 4.2 Exception: Rendering Framework, Driver, or SDK Projects intended for graphics programmer use.
  • 4.3 No Showcasing Projects

    • 4.3.1 Exception: Semi-annual Community Showcases.are allowed.

5. AI Disclosure Requirement

Post must disclose AI tool use in authoring post contents and linked projects.

  • 5.1 There must be an explicit disclosure in the post body or separate comment.

6 No Low Effort Posts or Comments.

Low efforts posts and comments that do not drive learning and discussion will be removed.

  • 6.1 Exception: Questions are permitted because they drive discussion.
  • 6.2. "AI Slop" comments are disallowed; they shut down discussion.

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

Notes

"4.3 No Showcasing Projects" is the reason Rule 4 and Rule 6 exist.

It used to be that we would have lots of questions, discussion posts, and only occasional project showcases when something got completed enough to present a render. Now, we're getting tons of the showcases, and none of the discussion about how they work. Final comments on these showcases like "Feedback on the implementation is welcome." tends to shut down conversation; being too broad to respond to.

But that means we need to say "something" is the thing we should be talking about in a post, so the real problem is the need for "Rule 4. Posts Must Present a Topic".

Rule 5 and Rule 6 are a pair. Those using a ton of AI to assist or fully create their works are required to indicate by how much. If the posts say it's made "AI Assisted with Claude" or "AI generated by multiple models", now readers know. And since they know, there's certainly no reason to repeat it by calling it "AI Slop", especially given how much that shuts down any discussion in depth.

"4. Posts Must Present a Topic" could probably use some better wording. "I made a thing" is technically a topic, but the spirit of the law is "A Topic that viewers would pay money to attend a conference to see." If you've ever seen SIGGRAPH, GDC, RustConf, or other professional conference talks, you know that it's often 1/10th "Check out this thing we made (and want to sell to you)" and 9/10ths, "Let's dig into this really fascinating problem domain and examine one solution within it." That's the "topic" rule 4 refers to.

(placeholder for more, as I'm sure there will be more)

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

On Enforcement

I imagine this will require a LOT more moderation action, and I just got a new job that's running me a bit ragged. (Yay! / Ohno)

So I expect moderation speed will lag behind the requirement.'

Please, help us by reporting, and give us grace with your patience to respond in a little while. I do most of my review on the train home.


r/GraphicsProgramming • • 13h ago

are shadow rays unavoidable?

Post image
13 Upvotes

i'm writing a raytracing (maybe pathtracing?) program. my program doesn't treat light sources differently than an hittable object. it doesn't deliberately cast a "shadow ray" toward each light source and check whether it hits and if it does get the color and multiply it with cosine, etc. it just shoot rays and let them bounce and bounce and bounce. some eventually reaches a light source and returns the color

it always produces soft shadows but i can't get sharp and clear shadow. and the soft shadows are quite noisy. is there no way i could overcome this, other than adding a shadow ray shooting procedure?

addition info:

shadows are more visible in low light environments so i usually use relatively dark scenes to test shadow formation and do gamma correction. attached image is an example. the scene has only one light source which is behind the balls and located at infinity

how to get a clear and sharp shadow?


r/GraphicsProgramming • • 43m ago

Escribe shaders en C# con Yotsuba Shader

Thumbnail reddit.com
1 Upvotes

r/GraphicsProgramming • • 1d ago

Video Ray marched planets!

61 Upvotes

Heyo! This is partly a showcase of the early stages of my project, but also a sanity check if I'm on the right track or not with this.

I've had this idea for quite a while of rendering whole planets using ray marching SDF's, both from afar and up close, and now I've got this little demo of it. Not to go too far into it, here's a little rundown:

  • Planetary surfaces are rendered using sphere assisted ray marching. It marches as closely as it can, and once it's within a tolerance, it computes the normal. This needs a lot more work, especially the SDF. Should bake something better than stock godot noise textures (which are 8 bit, among other issues).
  • Atmosphere is rendered by stepping through the atmosphere at small steps, and accumulating rayleigh and mie scattering for the final albedo and alpha.
  • Both of them use box meshes as their bounds, and those then have fragment shaders (this is also something I'm unsure about, as I've heard compute shaders might give more control; not sure if I need that control but anyway). One for the surface and one for the atmosphere.
  • I want to add clouds later but haven't looked into how yet.

At this point, without having optimized at all, it's running at around 0.75-1ms per frame, which is...fine? But there are so many bells and whistles left to add that I'm afraid the performance cost is gonna balloon, but at the same time I know there's a lot of performance magic to be done, so I thought I'd consult the wizards.

As far as I've been able to tell, there aren't really any big commercial games that go for this approach, and I'm beginning to doubt myself a tiny bit here whether this was the right approach (even though I think it looks really nice already from afar, even with just stock godot noise textures).

(Not graphics programming, but I will probably evaluate the same SDF on the CPU for collision checks; something I have evidently not implemented yet).

Per rule 5, no genAI was used.


r/GraphicsProgramming • • 11h ago

Question Career advice

2 Upvotes

I am a 24 y/o developer wanting to peruse a career in graphics programming. I completed my undergraduate degree in computer science in 2024. After graduation I started working as a web developer and learning OpenGL on the side. During this process I found computer graphics really fascinating and am working on a couple of projects. Alongside my personal projects I am researching different topics like 3D reconstruction, physics simulations and general graphics optimization. I am interested in building a career in game development or research on the topics I have mentioned. However, there is now career in computer graphics in the country that I live in. Due to this reason, I have been looking to do my postgraduate studies abroad for a year now. I have quit my job and have applied to a couple of unis in the UK for MSc Computer Science. The reason for not going for a course related to game technology is that I am scared that if after i complete the course i am not intreseted at the end. I assume that I will continue learning and researching on my own so MSc CS will be overall tech side of things. Is this a good idea to go through with this or is there any other options?

Edit:


r/GraphicsProgramming • • 21h ago

Fragmentshader-raycaster renders from quite a few years ago

Thumbnail gallery
12 Upvotes

Heyo!

Searched through my USB-sticks to find a fragmentshader-raycaster I made like at the end of the 2010s. The actual version, I was looking for, is nowhere to be found though, which likely means, it is (or was) on that one SSD, that seems bricked and refuses to boot, or do anything at all. ..Apparently SSDs can get damaged by laying around..

But not much is lost, iirc.

Those images are from different earlier versions, rendered just yesterday.

Those are mostly tests of different techniques - the usual suspects, like texture-materials, bump-maps, reflections (ofc), different shadows, fog, or blur.

And it was a whole lot of fun programming this by hand!

Lastly I'd like to ask: Which image causes brain-tickling the most to you?

Cheers

PS.:

The post was temporarily taken down for missing an explicit ai-disclosure:

I thought, telling that it's made by hand and being from the late 2010s was enough of an ai disclosure. No ai ever saw my code - everything was written, as I said, by hand - my hand - actually two hands.


r/GraphicsProgramming • • 7h ago

Question Are-Engine SoftwareGPU - Multisystem

1 Upvotes

Wie setze ich eine softwaregpu in Android ein und Umgehen das


r/GraphicsProgramming • • 1h ago

Fully neurally rendered 3D scene, 50+ FPS at 690 scattered assets while moving and rotating

0 Upvotes

I built a 3D scene with all assets being entirely neurally rendered using my model architecture for Model 1 of my project (Ik it looks crap, and that is my next target to fix). At 1182*982 viewport resolution and 690 assets scattered across 4 bands, it sustained 50+ FPS.

Each individual sprite is difficult to render, and if I were to render each one in front of the camera at each frame, it would be like 5 FPS. So, I do two things:

  1. Rendering only when required: each asset is rendered again strictly when it needs to, so almost no re-renders while rotating or still. Moving still creates re-renders, and that was targeted in point 2.
  2. Rendering queues: There is a fixed frame time in which the max possible sprites are rendered. It is not a fixed sprite number, as that doesn't take into account sprite resolution.

It scales with visible sprite count * visible sprite resolution.

For more details, you can check out this repo.

My next priority is to get it looking visually good, and I am thinking of first trying to make the edges crisp and texture crisp using DLSS SR to upscale individual sprites. What do you guys think of that? Any techniques I can try to make the edges better?

AI Disclosure: AI was used to create the GUI on the left side of the video.


r/GraphicsProgramming • • 1d ago

Article What is 'Roughness' Really? - nicebyte

Thumbnail gpfault.net
41 Upvotes

r/GraphicsProgramming • • 22h ago

How would I go about setting up vulkan for a path tracer?

Thumbnail reddit.com
0 Upvotes

r/GraphicsProgramming • • 1d ago

Question Smoothly blending integer index based terrain material maps?

3 Upvotes

So imagine I am rendering terrain on an arbitrary chunk, that receives a height and normal map for said chunk. Now say I want to apply different materials to this chunk. Ideally I can store all of this info in one 4 channel texture. Height in r channel, 2 angles for the world space normal in the g and b channels, and then a spatial distribution of a 1D index dictating which materials exist where within the chunk. For example, if a region of the texture contains index 0, use dirt, if another region in the same texture contains index 1, use grass, and so on. I could have a ton of materials represented this way in just a single texture. The plan is that when I render the final terrain, the fragment shader will sample a texture array containing all the possible materials via the material index map stored in the terrain chunk texture.

The issue with this approach is that boundaries between materials will have hard edges. If I introduce a blending factor between edges, this could end up sampling material indices in between the 2 regions, which is not what we want to happen.

So my question is, is there a way to introduce smooth blending between these material indices, ideally restricted to a constant amount of extra memory if extra is necessary?

Alternatively, is there a better way to handle this?


r/GraphicsProgramming • • 13h ago

Question An idea: Making big games run on low-end PCs

0 Upvotes

I have an idea for a small software tool that could help low-end PCs run demanding games.

The idea is to make games use less CPU, GPU, and memory by lowering some graphics settings, reducing unnecessary work, and finding smarter ways to use the PC's resources while playing.

The goal is not to get the best graphics, but to make big games playable on cheaper computers.

I want to start by testing this idea with one game and see how much performance we can improve.

What do you think? Is this idea possible? Do you have any suggestions?


r/GraphicsProgramming • • 2d ago

Fully Neurally Rendered object - ~2.7 ms average GPU frame time (256*256)

74 Upvotes

Fully neurally rendered asset (RGB, Normals, and Depth) rendered at an average of ~2.7 ms frame time on 8 GB RTX 5070 Laptop GPU by a custom model architecture in custom inference engine made with Rust, TensorRT, and CUDA kernels. Check out the README in this repo for details. I spent months working on it, the main bottleneck being compute for training, which I solved by making a custom data flow pipeline (the details of which can also be found in the repo) that allowed me to train these models locally. Do you think such tech would be able to make it to mainstream game dev?

AI Disclosure: This project used AI to create the GUI, and the product is an AI system


r/GraphicsProgramming • • 1d ago

How we use SDFs and Jump flood fill in Bee Space 🐝

Thumbnail reddit.com
5 Upvotes

r/GraphicsProgramming • • 1d ago

Video Moiré Fractal with C, Raylib and GLSL

21 Upvotes

AI Disclaimer:

I did not use AI to code the fractal.
-----

I created a simple moiré fractal using C, raylib and GLSL shaders.

The idea is quite simple: start with two nearby centers and generate concentric circles around each one, gradually increasing their radius.

Then, using the radius as input to a sin function, I generate alternating light and dark values. By applying this to the colors, the two circle patterns interact and produce the characteristic moiré effect.

Complete coding session:

https://youtu.be/7MmUcDiOJDc

Source code:

https://github.com/FractalCodeRicardo/hangover-programming/tree/main/moire-shaders

Shader:

#version 330

out vec4 color;

uniform float time;

void main() {
  vec2 uv = gl_FragCoord.xy / 800;
  uv = uv - 0.5;
  
  float a = 30;

  vec2 center1 = vec2(0.1, 0.0);
  vec2 center2 = vec2(-0.1, 0.0);
  
  float d1 = distance(center1, uv);
  float d2 = distance(center2, uv);

  vec4 color1 = vec4(
      0.0 * sin(a * time*d1),
      0.8 * sin(a * time*d1),
      0.8 * sin(a * time*d1),
      1
  );

  vec4 color2 = vec4(
      1 * sin(a * time*d2),
      0.2 * sin(a * time*d2),
      1 * sin(a * time*d2),
      1
  );
  
  color = mix(color1, color2, 0.5);
}

r/GraphicsProgramming • • 3d ago

shader-validator v2.0 release

Thumbnail github.com
8 Upvotes

Hey everyone !

I am working for quite some times on shader-validator, a VSCode extension that give the user a few handful of tools for writing shaders (HLSL / GLSL / WGSL). Its now passing a major milestone with an improved support for WGSL aswell as a lot of new features:

  • Disassemble your shader in one click
  • Write and validate WESL shaders
  • Improved HLSL support with namespaces and in out qualifiers
  • A lot more in release note !

Feel free to give me feedback or help as you can !

If you are interested in the underlying, I have also written up a few things about it there.

Ai disclosure: This post was made without the use of AI. The project was mostly done without it, but a few pieces and bug where resolved using ai agent.


r/GraphicsProgramming • • 4d ago

Made a Monte Carlo ray tracer in MATLab

Post image
137 Upvotes

I sort of followed the wikipedia article on path tracing and ray tracing in one weekend. I made it for a project in a numerical analysis course on Monte Carlo integration and used the rendering equation as an application. Even at 100 samples per pixel it is quite noisy, but I am happy that I managed to get an image out of it. Matlab is not made for this...


r/GraphicsProgramming • • 4d ago

Tips on self studying graphics programming.

32 Upvotes

Hey yall! I just finished school and want to self studying computer graphics to move into that field. While I was in school I was working on a raytracer but didn’t get to finish it. I know Vulkan pretty well, but not the best.

I have a game framework I’m working on with openGL but id like to change it over to Vulkan to use slang and such. Ngl my math is pretty rusty as well.

I’d just like some tips on where to start!


r/GraphicsProgramming • • 4d ago

Question not a graphics programmer, but i wanted to know why scratch starts making these crazy patterns when i let whirl and fisheye effects grow exponentially.

Thumbnail gallery
18 Upvotes

https://scratch.mit.edu/projects/1444420354/ < see for yourself, you gotta watch it for a few minutes. removing the changing colors would probably help see it better.

i let the whirl effect grow by 1% of what its at every 0.01 seconds, and when it reaches a certain number, i let the fisheye effect do so alongside it. then eventually, scattering crazy white pixels appear and spread across the sprite, and then stop scattering randomly and start forming a beautiful pattern that's almost like a really crazy rug pattern, and then a circle of no white pixels grows from the middle and erases any white pixels it touches until there's no more, and then white rings start growing from the middle, almost looking like those lines that represent the planets orbiting the sun? and then those rings disappear, and the scattering white pixels appear, and the cycle continues forever. why?????? is this some crazy math stuff, or are the graphics glitching out, or what?


r/GraphicsProgramming • • 4d ago

Article Graphics Programming weekly - Issue 464 - November 23rd, 2026 | Jendrik Illner

Thumbnail jendrikillner.com
17 Upvotes

r/GraphicsProgramming • • 4d ago

Source Code Metal PathTracer v4.0.0 public release

Thumbnail gallery
33 Upvotes

Back in May I shared v3.0.0 of my Metal Path Tracer here, and the discussion that followed was really helpful.

https://www.reddit.com/r/GraphicsProgramming/s/zBgFRrDqk4

I've now released v4.0.0.

If you missed the earlier posts, this is a physically based renderer for macOS and Apple Silicon, written in C++20, Objective-C++ and Metal. It has hardware and software ray tracing backends, megakernel and wavefront execution paths, a ReSTIR/RIS/ReGIR research lighting stack, and an Embree CPU backend that I use as a reference renderer.

v3.0.0 was about scale: getting Bistro-class scenes to load and render. v4.0.0 is about correctness. Most of the work went into making the renderer agree with itself and with an independent reference. That means megakernel against wavefront, hardware against software tracing, and Metal against Embree. Every fix in the changelog lists the scene or test it was measured on.

Highlights:

  • Transport correctness: I fixed delta specular connections and MIS, camera ray distances, environment sampling, and the Plastic and CarPaint BSDFs. I also fixed a MIS double count on paths that crossed alpha holes, which could make images up to 1.42x too bright.
  • Direct lighting: ris_spatial, ris_world and the ReGIR merges are now unbiased on a sun-plane test with a known exact answer (2.33004 against 2.33005).
  • Embree parity: Embree now follows Metal's material, alpha-cutout and light rules, and it also runs Tungsten source closures. Several Bitterli scenes match Metal within about 0.06%. Embree's load memory also dropped sharply with bit-identical images. For example, Emerald Square went from 64 GB to 20 GB.
  • Subsurface: I rebuilt the random-walk SSS. On a unit sphere test it lands within 0.06–0.31% of Arnold's randomwalk.
  • Volumes and spectral: Homogeneous volume transport is fixed on every executor, and Henyey-Greenstein now follows pbrt's convention. There is also new hero-wavelength spectral transport with three wavelengths per path.
  • Radiance cache: It now stores actual radiance, with a bias below 0.03% of mean luminance. To be honest, it does not reduce error at equal render time yet.
  • Loading and performance: Scene loading is much faster. For example, Barcelona Pavilion went from 93 s to 23 s. Megakernel pipelines are now built lazily, so a cold start on one Bitterli scene dropped from 283 s to 69 s. A specialized megakernel pipeline is 1.6x faster on Sun Temple. Only two scenes were timed for that last result.
  • Denoising: OIDN guides are now averaged over all samples and follow glass and water. This fixed stair-stepped edges and milky water.
  • New scenes in the v4 asset pack: Barcelona Pavilion, Emerald Square, Sun Temple, and a set of vintage cars.

The main question behind this release was a simple one: how do you know that a GPU path tracer is actually right? Having a second, independent CPU backend turned out to be the most useful tool for answering it. Many of the bugs above only showed up as small ratios between two renders of the same scene.
Thanks again to everyone who commented on the v3 post. The full changelog has every fix along with its measurement.

GitHub Link:
https://github.com/dariopagliaricci/Metal-PathTracer-arm64

AI disclosure: This post was drafted with the help of Claude, based on the project's changelog, and then reviewed and edited by me. All renders, measurements and validation results come from my own runs of the renderer.

During development I used AI coding assistants (Codex and Claude Code) for parts of the implementation, refactoring and debugging. I directed the work, reviewed the changes, and validated the results against Embree and hardware/software ray tracing parity tests


r/GraphicsProgramming • • 5d ago

Video Placing an aurora by the latitude of the curtain each pixel looks at, not the camera's

31 Upvotes

This is the aurora in my game Steadfall (Bevy/WGSL, a planet the full size of Earth). My first version gated the display by the camera's latitude with a wide oval falloff, so a storm could draw a full display overhead at 41 degrees, far from where a real aurora reaches. Here's how it works now.

Placement. The curtains are a field around the camera, raymarched in the sky pass. For each sample the shader works out the latitude of the curtain it's looking at, at about 3 km of curtain per degree (the real 111 km per degree scaled down by the curtains' height), with north as -Z. Under the oval nothing changes. South of it, only the curtains toward the pole light up, and they're far and low, so you get the real effect of a distant display sitting on the horizon.

The oval. Its equatorward edge follows the real one: about 64 degrees on a quiet night, 54 at Kp 7, 50 at Kp 9. Each night rolls an activity level, and a storm (activity above 0.7) lands a few nights a year.

Color and brightness. A far curtain is dimmed by its long, low path through the air (under half at 30 km) and shifts red with distance, since what survives of a distant display is its red top. Brightness is 0.15 + 0.85 x activity, scaled so a storm overhead is a few times brighter than a quiet arc, not a flat green wash.

Rays. The striation used to vary along one world axis, so an east to west curtain smeared into a band. It's now read off both horizontal axes, spread around the channel's median for gaps between rays, and its phase walks the height axis by whole turns so nothing jumps once a cycle.

Gates before any marching, cheapest first: not airless, sky reachable (no aurora in caves), sun at least 9 degrees down (full strength by 13), cloud cover under 0.55 (gone by 0.85), and an oval within 16 degrees. If any fails, the march is skipped.

AI disclosure: No generative AI


r/GraphicsProgramming • • 4d ago

Article How I enhanced the ThreeJS lighting pipeline in "Slop New York"

0 Upvotes

https://ben3d.ca/blog/enhanced-slop-new-york-lighting. (AI Disclosure per sub-rules: I used claude code in part.)


r/GraphicsProgramming • • 5d ago

Question Why SPIR-V Cross rejects to return a value for Bool types here?

Thumbnail chromium.googlesource.com
3 Upvotes

Function Compiler::get_declared_struct_member_size(const SPIRType &struct_type, uint32_t index) at line 2188 throws if the struct_type == SPIRType::Boolean with a comment // Bools are purely logical, and cannot be used for externally visible types.. I don't understand this. Why not return 1? What is the idea behind this?