r/GraphicsProgramming • • 22d 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 • • 16h ago

Video fractal Kaleidoscope using Raylib | C | GLSL

42 Upvotes

I follow these steps:

  1. First, I split the screen into slices (like a pizza) using polar coordinates.
  2. Then, I use a well-known pattern in fractal shaders: sin(x) * sin(y), inside each slice.
  3. Next, I add a color palette to generate some nice colors.
  4. Finally, I use time as a parameter in different parts of the shader to animate both the pattern and the colors.

Complete coding session:
https://youtu.be/zHu6XoFd1FY

Shader:

#version 330

out vec4 color;
uniform float time;

vec3 palette(float t) {
  vec3 a = vec3(0.5, 0.5, 0.5);
  vec3 b = vec3(0.5, 0.5, 0.5);
  vec3 c = vec3(1, 1, 1);
  vec3 d = vec3(0.0, 0.33, 0.67);

  return a + b*cos( 6.283185*(c*t+d) );
}

void main() {
  float pi = 3.1416;

  vec2 uv = gl_FragCoord.xy / 800;
  uv = uv - 0.5;

  float angle = atan(uv.y, uv.x) * time * 0.3;
  float radius = length(uv);

  float slices = 3;
  float size = pi * 2 / 3;
  float internal_angle = mod(angle, size);
  internal_angle = abs(internal_angle - size /2.0);
  
  vec2 internal_point= radius *
    vec2(
        cos(internal_angle) * radius,
        sin(internal_angle) * radius
        );

  float pattern = 
    sin(internal_point.x * time *10 * 0.5) * 
    sin(internal_point.y * time *10 * 0.5);

  vec3 c = palette(pattern + time * 0.5);

  color = vec4(c, 1);
}

AI Disclosure:
I used AI to understand the fractal then I coded my own version.


r/GraphicsProgramming • • 5h ago

Paper Can Information-Dense Pixel Sequences Improve Neural Image Reconstruction? — A PerfectEngine Research Proposal

Thumbnail zenodo.org
1 Upvotes

Article: https://zenodo.org/records/24714855

GitHub: https://github.com/babakkarimib/perfectengine

Neural reconstruction systems use rendered images together with temporal and geometric signals to synthesize higher-resolution images and intermediate frames. This paper proposes a research direction for PerfectEngine, an experimental non-polygon-based graphics engine implemented in Rust using WGPU and SDL2.

The project's public README describes a two-dimensional pixel concept with three-dimensional properties, overlap-based rendering described as being akin to splatting, and a ray-tracing layer.

We investigate whether an explicitly represented, time-indexed sequence of renderer samples could preserve or expose additional information useful to neural super-resolution and frame generation. We distinguish this proposed abstraction from capabilities documented in the current repository and from established point-based and splatting methods.

We define incremental task-conditioned information density, formulate separate spatial and temporal hypotheses, describe a compatibility mapping to conventional image-space resources, and specify a falsifiable evaluation protocol.

This is a research proposal: it reports no measured improvement, no DLSS integration, and no hardware results. Its immediate contribution is a formal research question, a candidate data model, and an evaluation plan for subsequent implementation.

Acknowledgment of AI-assisted writing: A generative AI assistant was used to help prepare and edit the manuscript text. The author is responsible for reviewing the manuscript, verifying its technical claims and references, and approving the final version.

I'd appreciate technical feedback, particularly on the proposed sample representation, its potential usefulness for neural reconstruction, and the evaluation methodology.


r/GraphicsProgramming • • 16h ago

Sabercat 1.1.0: an open-source Vulkan tool for comparing, editing, and relighting Gaussian splats

3 Upvotes

r/GraphicsProgramming • • 1d ago

Request Need contributions for our shaders library "Shimera".

11 Upvotes

Hello everyone!

We need contributions for our project Shimera, a C++ library designed to simplify the integration of visual effects (shaders) into graphical projects.

Shimera is a library designed to allow its users (mainly developers) to implement visual effects on top of their graphical projects without any GPU programming knowledge. The library provides a set of shaders that can be easily integrated into OpenGL, SFML, SDL and Raylib projects. Each shader comes with a callable function that allows users to implement and modify the shader's parameters according to their needs.

For the time being, the library works on Windows and Linux with OpenGL graphics API, including SFML, SDL, and Raylib graphics libraries. It includes a small collection of post-processing shaders and materials, which we plan to expand over the coming months.

You can start with (good first issue):
- Hue Shift Shader
- Inverted Color Shader
- Gamma Correction Shader

But we do have harder issues if you want, pick any issues that have no assignments. For any issues you want to work on, please ask us in the comments of the issue.

No contribution is too small. Don't be afraid, there's no pressure, if you're unable to do something, no one will hold it against you. Feedback on the API design is also very welcome, even if you don't plan to contribute.

This project is unfinished, so our documentation is not entirely up to date.

Repo: ShimeraTeam/Shimera

Thanks for reading, happy to answer any questions!

AI disclosure: no genAI, soft use, AI assistance.


r/GraphicsProgramming • • 18h ago

i think i have some idea now

3 Upvotes

previous post

thank you all for helping me. several commentors said i have to use point light source so as to get sharp shadow. i did some experiments. as my program shoots random rays blindly so it'd be nearly impossible for a ray to reach a point light source (or light source which has 1 pixel radius). i tried using small light sources. firstly i tried this

it was too dim and i could hardly see the scene so i enlarged the light slightly

it could barely be seen now and as far as i could tell the shadow was quite sharp. then i tried this

the scene was more lit up and the shadow started to show certain degree of blurriness. i think it's the sweet spot. with everything else being unchanged i increased the number of samples

still noisy. not ideal but at least not too ugly. i think i got it

the reason why i don't want to use shadow ray is: my program has a real time mode and i always change the scene and properties of the objects. for example the ball in the scene can be set up to become 50% reflective and 50% emissive. it can be a light source. the list of light sources (and their properties) change during runtime. sometimes i use a skysphere that acts as light source too. isn't it quite complicated to implement shadow ray workflow?


r/GraphicsProgramming • • 1d ago

are shadow rays unavoidable?

Post image
23 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 • • 15h ago

Reconstructing a 3.63M-voxel WebGL2 DDA coastal wave scene from a zero-parallax handheld phone pan (brick-accelerated raymarcher + write-up)

0 Upvotes

I wanted to see if I could turn a 10s standing smartphone pan of crashing waves into a real-time 3D scene you can freeze, orbit, and relight in WebGL2. Classic SfM / 4D Gaussian Splatting failed immediately because a standing pan has almost zero translation baseline (-66px foreground rock shift vs -61px cloud shift over 10.2s).

Here is the deterministic extraction + rendering pipeline I ended up with (interactive WebGL2 demo, <600 KB gzipped: https://ottershrine.github.io/coastal-voxels/ ):

  1. Camera recovery: Subpixel patch-median tracking across 6 dry-rock patches + horizon gradient recovers yaw (-4.6° to +14.5°) and pitch (-10.9° to -8.2°) across 309 frames.
  2. Surf erasure / rock recovery: Warping 103 frames into a shared panorama and taking the 15th-percentile darkest pixel strips out white breaking surf and exposes 243 dark wet intertidal rocks.
  3. Sea field projection: Per-frame foam brightness and dark crest-face contrast are inverse-projected onto Y=0 to build a dynamic height/foam grid (downsampled to 96×54×70 gzipped = 546 KB for the web build).
  4. WebGL2 DDA raymarching: A single fragment shader traverses a 512×120×416 R8 rock volume accelerated by an 8×8×8 occupancy brick grid, combined with procedural overhanging curling wave lips, Voronoi foam webs, 6-ray hemisphere AO, and depth-tested instanced 3D spray cubes (1.5× SSAA RGBA16F + bloom).

AI disclosure (Rule 5): I used Gemini Neon as a coding assistant to iterate on the extraction scripts and WebGL2 shaders. There is zero neural inference, diffusion, or ML running at render time - everything in the video and browser demo is pure WebGL2 DDA math.

Happy to share shader details on the brick DDA traversal or foam projection if anyone's curious. (I also post more WebGL/voxel breakdowns on X at https://x.com/ottershrine )


r/GraphicsProgramming • • 21h ago

Question Learning graphic api using Ai?

0 Upvotes

Hey all. I made a 2d game engine using opengl and using learnopengl awhile back and plan taking it a bit further and try to do 3d stuff. I found some resources and tutorials about vulkan and a little bit of metal but barely directx 12, I found chatgpt and was wondering if its a good idea to give claude or chatgpt the sources that I found, have ai simply it for me so I can understand and then write everything myself. Ai could code everything for me but I rather just do everything myself so I get the experience of being a programmer. What do you guys think?


r/GraphicsProgramming • • 2d ago

Video Ray marched planets!

71 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 • • 22h ago

Article I didn't want to negotiate a Gameface licence, so I spent nine months writing my own HTML/CSS UI renderer for Unity

Post image
0 Upvotes

Some background. We're a small studio, and in our co-op game the UI changed after every playtest. Move this button left, make that bar thicker. In Unity that meant a recompile, a scene restart, and a dozen clicks just to get back to the same screen. I've written web stuff for years, so it drove me nuts that browsers solved this ages ago and I couldn't use any of it.

The thing I wanted already exists. Coherent Gameface is built for game UI and has renderers for DX11, DX12, GL, Metal, and consoles. But there's no price on the site. You ask sales for a quote, the licence is per title and per platform, and source access costs extra. For a team our size, that conversation never starts. Ultralight is free until you make money, which is a bad time to learn the licence terms. CEF puts all of Chromium in your game, with a second process tree and 100+ MB to show a dozen screens. UI Toolkit looks like HTML and CSS but isn't, so my web experience didn't carry over.

I wrote my own, with one rule: don't build a second browser. A browser has to render any page on the internet. My UI renders one page that ships with the game, so networking, origins, cookies, history, and process isolation can go. I used lexbor for HTML, V8 for JS, Yoga for flexbox, and Skia for text and raster. The DOM, the cascade, and paint order are mine, about 20k lines of C++20. The cascade alone is 5,800 lines, more than layout and paint together. Didn't see that coming.

So...

The part this sub might care about: I refused to copy a texture every frame. Skia's GrDirectContext is created on Unity's own ID3D12Device and command queue (IUnityGraphicsD3D12v8, plugin event with kUnityD3D12GraphicsQueueAccess_Allow). The texture is a committed resource with ALLOW_RENDER_TARGET | ALLOW_SIMULTANEOUS_ACCESS, wrapped in an SkSurface, and C# gets it through Texture2D.CreateExternalTexture. Skia draws into the same texture the RawImage samples, and sync is just command order on one queue.

Resource states were the annoying bit. Unity doesn't say what state it expects an external texture in, and Skia's D3D backend ignores MutableTextureState, so after flush the resource sits in COMMON and you rely on implicit promotion and decay. I didn't trust that until I ran Unity with the debug layer on. That run found one real bug: a SampleDesc.Quality mismatch from a default fSampleQualityPattern in a Skia struct. One line to fix. Zero D3D12 errors since.

What I'm happiest about is boring: UI that doesn't move costs nothing. A frame gets published only when something changes, and only the damaged rect is repainted (old and new box bounds, padded for shadows). With software raster at 800x600, an idle menu went from 22.7 ms a frame to zero. A HUD with one animated element went from 15.9 ms to 0.115 ms, because it repaints 22x22 px instead of the whole view. In our game, we then cut the HUD into 11 small views. At 1080p on CPU raster, that's 282.6 ms down to 9.7 ms per frame, while texture memory went from 7.9 to 15 MB.

To be fair to Gameface, it's miles ahead on coverage. My fast path is Windows + D3D12 only, and everything else falls back to a CPU rasteriser. No grid, no calc(), no custom properties, no ::before/::after. If you ship on consoles, just pay them. What I get back is Apache-2.0 with only permissive deps, and when something breaks, I open the source instead of a support ticket. For me, that was worth nine months.


v0.9, 310 native tests with pixel goldens, 46 PlayMode tests on a real D3D12 device.

https://github.com/Rovniy/xploit_game_ui

If you've put Skia (or your own renderer) on a host engine's D3D12 queue, did you trust simultaneous access like I did, or track states yourself?


AI disclosure: I wrote the code with Claude Code as a coding assistant, and most commits in the repo are co-authored with it. The architecture, the D3D12 interop, and the debugging were my calls, and every number above comes from my own runs. This post was drafted with Claude from my blog post and the repo docs, then edited by me. The cover image is AI-generated.


r/GraphicsProgramming • • 2d ago

Fragmentshader-raycaster renders from quite a few years ago

Thumbnail gallery
15 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 • • 1d 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 • • 1d ago

Question Are-Engine SoftwareGPU - Multisystem

0 Upvotes

Wie setze ich eine softwaregpu in Android ein und Umgehen das


r/GraphicsProgramming • • 1d 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 • • 2d ago

Article What is 'Roughness' Really? - nicebyte

Thumbnail gpfault.net
44 Upvotes

r/GraphicsProgramming • • 2d ago

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

Thumbnail reddit.com
0 Upvotes

r/GraphicsProgramming • • 2d 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 • • 1d 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 • • 3d ago

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

79 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 • • 2d ago

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

Thumbnail reddit.com
5 Upvotes

r/GraphicsProgramming • • 3d ago

Video Moiré Fractal with C, Raylib and GLSL

24 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 • • 4d 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 • • 5d ago

Made a Monte Carlo ray tracer in MATLab

Post image
145 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...