r/shaders • • 9h ago

307 procedural GLSL studies, from cable knit to ripples in a glass bowl

18 Upvotes

I put the renders and source side by side in the README. Click a thumbnail and it opens the GLSL for that study.

A good one to take apart is the ginkgo leaf. Set uWindStrength to 1 and scrub uTime from 0 to 5 seconds. The stalk bends first, then the two sides of the fan twist by different amounts.

I used AI tools to build the collection, and Claude made the reel.

https://github.com/gokayfem/glsl-studies


r/shaders • • 12h ago

I'm attempting to remake cuda-x libraries with vulkan shaders instead of actual cuda

Thumbnail reddit.com
1 Upvotes

r/shaders • • 1d ago

Screen-space halftone + a shader cutaway on my scroll-driven personal site

8 Upvotes

Everything 3D is halftone, computed per fragment:

float halftone(float tone, float angle){

vec2 q = gl_FragCoord.xy / uCell;

float s = sin(angle), c = cos(angle);

q = mat2(c, -s, s, c) * q;

vec2 f = fract(q) - 0.5;

float d = length(f);

float r = sqrt(clamp(tone, 0.0, 1.0)) * 0.68;

float aa = max(fwidth(d) * 0.9, 0.035);

return 1.0 - smoothstep(r - aa, r + aa, d);

}

Because it uses gl_FragCoord, dots stay the same size on screen at any camera distance. sqrt(tone) makes dot area track brightness; fwidth handles AA.

Terrain is fBm baked once into a 2048x1024 target. The core chapter discards a wedge in the planet fragment shader and caps it with two planes for the strata. One post pass does radial chromatic aberration scaled by rotation speed, plus grain.

Live: https://kohli.world

Source: https://github.com/Assassin-1234/kohli-world


r/shaders • • 1d ago

shader-validator v2.0 release

Thumbnail github.com
1 Upvotes

r/shaders • • 1d ago

https://coffeelow.github.io/fractal.html

Thumbnail coffeelow.github.io
1 Upvotes

https://coffeelow.github.io/fractal.html

the fractal : Zn+1 := f(Zn)

f(z) = (->1) * z ^ (->1) + (->0)

(>1) = f / (f + c)

(->0) = c / f


r/shaders • • 1d ago

Synty Assets look plasticy and bright, is there a way around to make the whole style more watercolor like easily ?

Post image
1 Upvotes

r/shaders • • 1d ago

Help with Minecraft shader. (Idk where to put this)

Post image
0 Upvotes

I don't know how to fix this, it happens anywhere and not just lunar client and on any shader. I haven't tried other versions yet and this is 26.3. shader settings doesn't allow me to dig farther into it either. I need help😭 (I also didnt know what r/ or whatever thing to put this under. google isnt any help.)

Also I may have accidentally posted twice. MY BAAAD


r/shaders • • 1d ago

Help with Minecraft shader. (Idk where to put this)

Post image
0 Upvotes

I don't know how to fix this, it happens anywhere and not just lunar client and on any shader. I haven't tried other versions yet and this is 26.3. shader settings doesn't allow me to dig farther into it either. I need help😭 (I also didnt know what r/ or whatever thing to put this under. google isnt any help.)

Also I may have accidentally posted twice. MY BAAAD


r/shaders • • 2d ago

De esferas brutas a uma malha de fluidos em 3D Surface Nets em tempo real no UE 5.8 — 150 mil partículas, acoplamento de Chaos bidirecional e 81,5 MB de VRAM em uma RTX 3060

0 Upvotes

r/shaders • • 2d ago

My kinda game ready Radiance Cascade SSGI shader

Thumbnail youtu.be
1 Upvotes

r/shaders • • 3d ago

Ghosting due to shader TXAA and AA

Thumbnail reddit.com
1 Upvotes

r/shaders • • 3d ago

How do I write shaders in python

1 Upvotes

Hello Everyone, I hope you all are doing well.
So, even though I have been writing python programs for a while. I want to learn to write shaders for visual effects, filters, 3d morphs and also ray tracing, where do I start? Can you mention resources or any work you have done before and would like to share


r/shaders • • 3d ago

Guys, I need some help achieving this effect.

Post image
39 Upvotes

Guys, can anyone help me achieve this effect?

#define SAMPLES 32

#define STRENGTH 0.05

#define CENTER_KEEP 0.20

#define DIRECTION vec2(1.0, 0.10)

#define SATURATION 1.15

#define CONTRAST 1.10

#define GRAIN 0.05

#define VIGNETTE 0.30

#define BORDER 0.012

vec3 spectrum(float t){

return clamp(abs(mod(t * 6. + vec3(0., 4., 2.), 6.) - 3.) - 1., 0., 1.);

}

float hash21(vec2 p){

vec3 p3 = fract(vec3(p.xyx) * .1031);

p3 += dot(p3, p3.yzx + 33.33);

return fract((p3.x + p3.y) * p3.z);

}

void mainImage(out vec4 fragColor, in vec2 fragCoord){

vec2 uv = fragCoord / iResolution.xy;

vec2 c = uv - 0.5;

float d = clamp(length(c * vec2(1.0, 0.5)) * 2.0, 0., 1.);

float amt = STRENGTH * mix(CENTER_KEEP, 1.0, d * d);

vec2 dir = normalize(DIRECTION);

vec3 acc = vec3(0.);

vec3 wsum = vec3(0.);

for (int i = 0; i < SAMPLES; i++){

float t = float(i) / float(SAMPLES - 1);

vec3 w = spectrum(t * 0.8);

vec2 off = dir * amt * (t - 0.5) * 2.0;

acc += texture(iChannel0, clamp(uv + off, 0., 1.)).rgb * w;

wsum += w;

}

vec3 col = acc / wsum;

float l = dot(col, vec3(.299, .587, .114));

col = mix(vec3(l), col, SATURATION);

col = (col - 0.5) * CONTRAST + 0.5;

col += (hash21(fragCoord) - 0.5) * GRAIN;

col *= 1. - VIGNETTE * dot(c, c) * 2.;

float inside = step(BORDER, uv.x) * step(uv.x, 1. - BORDER)

* step(BORDER, uv.y) * step(uv.y, 1. - BORDER);

col *= inside;

fragColor = vec4(clamp(col, 0., 1.), 1.);

}

Thank you.


r/shaders • • 3d ago

Making custom GLSL shaders for my top down shooter game

10 Upvotes

Six procedural arena floor shaders for a top-down game, all GLSL.
A few rules I kept across all of them:

  • The floor stays about 3–4× darker than anything you shoot or dodge
  • Depth comes from at least two of: parallax layers, height or tilt, value falloff, fog
  • A spatial reference survives every 5 units (seams, etches, crosshairs), so movement speed still reads
  • Player and bullets throw light pools onto the floor, so the floor reacts to gameplay

There's also a "Boss" state that spreads red tint/corruption plate by plate using an fbm field with a per-plate threshold, plus a clutter-check toggle that adds gameplay-like density so you can judge the floor under real conditions.


r/shaders • • 4d ago

Rain as a single draw in WGSL: drops placed in the vertex shader, soft streaks, and a depth fade so they never clip into the ground

29 Upvotes

This is the rain in Steadfall, my survival game. The whole field is one draw, and the vertex shader does almost all the work:

Every drop is a seed in a box that tiles the world. The shader adds how far the wind has carried the field plus how far the drop has fallen, then wraps it to the copy of the tile nearest the eye. Nothing is anchored to the camera, so turning and walking move no drop.

The fall wraps every ten box heights, and the five speed classes each fall a whole number of boxes per wrap, so the wrap never shows as a jump.

It's unlit: the color is set once a frame from the light that's actually around you, which keeps thousands of overlapping quads cheap.

Happy to share more of the math if anyone's curious.


r/shaders • • 4d ago

Lucinate Black Friday Week sale!

Post image
1 Upvotes

Lucinate is currently on black friday week sale! https://itunes.apple.com/app/id6523413169

It's a creative environment for generative art, live visuals, and video synthesis.

Blend layers, modulate any parameter with audio, CV, MIDI, and LFOs, sync to the beat, and code your own shaders in the built-in MSL editor.

One purchase covers Mac, iPad and iPhone. No subscriptions, in-app purchases, or ads.

See instagram.com/j_liljedahl/reels/ for some example output made with Lucinate.


r/shaders • • 5d ago

I made a shader that turns any Blender scene into a woodcut print

36 Upvotes

Some of you might remember my woodcut castle render from a while ago. A lot of people asked how it was made, so I turned the shader into a tool anyone can use.

It's a single Eevee material: no UVs, no textures, works on any mesh. It reads the lighting in your scene and carves it into paper, hatching and ink.

Thank you if you check it out, and of course I'm happy to answer any questions about it.


r/shaders • • 6d ago

El outline de las manos desaparece y aparece cuando salto :/ shader complementary euphoria

0 Upvotes

r/shaders • • 8d ago

cant decide on a shader, id love feedback

Thumbnail gallery
0 Upvotes

r/shaders • • 9d ago

Godot 4 - Procedural Loot Box VFX by Paper Kitty Games

Thumbnail youtu.be
1 Upvotes

Turn treasure chests, trash cans, dumpsters, and other hinged 3D containers into animated loot boxes with this modular Godot 4 add-on. Bring in your own model, fit the editable guide to its rim, and customize the effect with swaying light rays, rising sparks, a glowing drape that spills over the edges, and optional icon particles tinted to match.

Give the container a playful squash, bounce, and lid pop with the included Cartoon Pop animation. Set the hinge axis and opening angle for each model, then connect gameplay signals to open it, close it, or fade the effects while the lid stays open.

Includes the Godot 4 add-on, a playable first-person demo, and a full HTML manual covering Blender export, hinge setup, and every Inspector setting.

https://paper-kitty-games.itch.io/godot-4-loot-box-vfx

check it out here :)


r/shaders • • 9d ago

AlphaHoldout shows a black silhouette in UE 5.7.4 and 5.8.4

Thumbnail gallery
0 Upvotes

r/shaders • • 10d ago

So is this doable ?

Post image
0 Upvotes

r/shaders • • 11d ago

whats wrong with my complimentary shader?

Post image
0 Upvotes

r/shaders • • 11d ago

Shaders are my personal playground.

57 Upvotes

This just happened, and I couldn't be happier with the result!

I absolutely love working with shaders.

They're my personal playground.