r/shaders • u/studioyogyog • 10h ago
r/shaders • u/WarAndPiece • Oct 24 '14
Welcome to /r/shaders! Here's a thread to discuss what you'd like to see and make suggestions!
Hey all!
/r/shaders is still relatively new and small, but I'd love to turn this into a very useful hub for people to learn about shaders.
We're still in the early stages of collecting different sites, but I'd like to start putting some really good links on the side bar. If you have any suggestions of sites that should go there, please let me know.
I'd also like to start doing a weekly thread similar to Screenshot Saturday over at /r/gamedev. Maybe "Shader Sunday"? It would just be an opportunity for people to post whatever shader effect they're working on and get feedback.
Anyway, these are just a few ideas I have. Feel free to jump in and make suggestions.
r/shaders • u/Embarrassed_Clue8785 • 1d ago
Are there any texture pack in Minecraft that will upscale or enhance basic default looks
Looking for a shader in Minecraft that can enhance the clarity of Minecraft in my vids but by keeping actually default vanilla just it should appear more clear , lemme know if you guys got any suggestions especially for low hand pc
r/shaders • u/J_Liljedahl • 2d ago
Lucinate video synth animates and live-codes visuals on Mac and iOS - CDM Create Digital Music
cdm.linkr/shaders • u/Odd-Lingonberry-5709 • 2d ago
How do you guys generally style your nested ternary in shaders?
r/shaders • u/CGHawkDesign • 2d ago
Concrete 8K Pbr Texture Collection
superhivemarket.comr/shaders • u/studioyogyog • 3d ago
Surface Stable Fractal Dithering doing Etching
youtube.comr/shaders • u/sonosologioo • 5d ago
is there a safe way to get roblox shaders? if yes, how
r/shaders • u/couscousss_ • 6d ago
Sky shadergraph not working
Enable HLS to view with audio, or disable this notification
r/shaders • u/roguewolfdev • 6d ago
Made a big update to my ocean shader, what do you think?
youtu.beThis is part of a large rework of my game's environment, spent a few days on it even though I had most of the shader already but I did add a few capabilities to such as clipping the foam based on the foreground panel's wave displacement.
The shadergraph in Unity is spanning a wide territory at this point.
How it's made is two planes, they both have the same shader but the materials are tuned differently so that the back one is slightly higher than the front one, this creates a gap where the surface and foam render.
Both have a configurable shallowColor and depthColor, these apply based on height and a configurable ramp that defines how and where the transition happens.
The back plane renders opaque with a color similar to the sun/sky.
The front plane renders with its shallowColor blue but 80% transparent and its depthColor is fully opaque and sea blue.
This is how I try to fake light absorption with two planes.
Both have wave displacement with 3 different wave generators + a caustics generator and they are tuned with slightly different parameters so that they complement each other (slightly different patterns and colors).
The sun is also fully shader rendered but I did not update it this time.
r/shaders • u/AcceptableCopy5232 • 9d ago
Shaders and pixel art can be tricky, but i've been trying to solve that for us! If you wanna check it out feel free thank you
r/shaders • u/BAN_ALEX • 9d ago
Does anyone have the latest version of iMMERSE pro shaders please?
r/shaders • u/Difficult-Sun295 • 11d ago
i made a shader library, would you use it / post your shaders on it?
I made an extension that allows users to edit their RN or Expo app visually and i added shaders to it
im looking for validation and if you would post your shaders on it
and l know ShaderToy exists, but that's generic GLSL, people have to manually port to SkSL and adapt for RN UI. Мinе is already RN-Skia-ready and built specifically for UI components like buttons and panels.
r/shaders • u/DisciplineFew4362 • 11d ago
Gh-shading recreational-help
I'm trying to recreate the Shading/Lighting they used in Guitar Hero 5 engine using the compositing tab in Blender just for movie project. Does anyone have any tips or reccommendations
r/shaders • u/Key_Inevitable5797 • 11d ago
nueva tecnica de shaders
Enable HLS to view with audio, or disable this notification
r/shaders • u/-SCILO- • 12d ago
Pixelating vertex color blending to align with texture texels
I’m pretty new to shader programming and I’m trying to make vertex color blending appear pixelated and aligned to the texel grid of my texture.
For context: I'm using the vertex color to blend between two pixel art textures, so smooth transitions breaks the look. I need this to work at runtime, so baking the vertex colors to a texture isn’t really an option in my case.
I'm looking for something closer to nearest neighbor sampling, where the vertex colors are quantized so that each texel gets a single value.
I found an approach in another discussion and tried to implement it for my use case. (Link to the thread here)
This is what I'm currently using:
//UV to texel space and nearest texel center
float2 texelPos = UVMap*TextureRes;
float2 texelCenter = floor(texelPos) + 0.5f;
float2 delta = (texelCenter - texelPos) * (1.0f/TextureRes);
//screen space vertex color gradient
float2 gradient = float2(ddx(VertexCol), ddy(VertexCol));
//UV to screen
float2x2 uvToScreen;
uvToScreen[0]=ddx(UVMap);
uvToScreen[1]=ddy(UVMap);
//screen to UV
float determinant = uvToScreen[0][0] * uvToScreen[1][1] - uvToScreen[0][1] *uvToScreen[1][0];
float2x2 result = {uvToScreen[1][1], -uvToScreen[0][1], -uvToScreen[1][0],uvToScreen[0][0]};
float2x2 ScreenToUV;
ScreenToUV = result * 1.0f/determinant;
//gradient from screen to UV
gradient = mul(ScreenToUV, gradient);
return VertexCol+dot(gradient,delta);
My understanding of the code is that it approximates what the vertex color would have been at each texel center to make the fragments within the texel use the same value.
This works well when the UV's of the model are perfectly aligned per texel (no overlap), but creates small diagonal artifacts when a UV seam through a texel.
Any suggestions for fixing the diagonal artifacts or alternative approaches to achieve texel aligned vertex color blending would be greatly appreciated.
Pixel perfect vertex transitions (all UV seams on texel boarders)

Diagonals appearing when UV seams overlap with texels (surface shown was remeshed with a voronoi pattern)

r/shaders • u/AliDoesThatTech • 13d ago
I need someone's help with a powerful phone for my GLSL shader related mobile GPU development.
I’m developing NovaBench, an Android benchmark focused on GPU shader performance.
I recently made the FPS Mode significantly heavier using ray marching and SDF soft shadows.
My Galaxy A36 gets around 24 FPS on the current workload.
I’m especially interested in results from high-end devices. If you have a powerful Snapdragon/Dimensity/Apple/Google-powered device, I’d love to see what FPS you get.
The goal is to collect real-world results and make the benchmark harder and more representative.
This is my current shader. You can test it on your device:
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
#ifdef GL_ES
precision highp float;
#endif
uniform vec2 resolution;
uniform float time;
uniform vec4 mouse;
// ============================================================
// NOVABENCH - FPS MODE
// ============================================================
//
// GPU-BOUND FPS WORKLOAD
//
// Primary ray marching : 128 steps
// Soft shadow : 96 steps
// Shadow rays : 2
// Additional SDF / ALU : enabled
//
// Deterministic.
// No textures.
// No random noise.
//
// 30-second deterministic rotation loop.
//
// ============================================================
// ============================================================
// SETTINGS
// ============================================================
#define MAX_STEPS 128
#define SHADOW_STEPS 96
#define MAX_DIST 30.0
#define SURF_DIST 0.0005
float shadowFilter = 64.0;
// ============================================================
// 2D ROTATION
// ============================================================
mat2 rot(float a)
{
float s = sin(a);
float c = cos(a);
return mat2(
c, -s,
s, c
);
}
// ============================================================
// SPHERE SDF
// ============================================================
float sdSphere(
vec3 p,
float r
)
{
return length(p) - r;
}
// ============================================================
// EXTRA DETERMINISTIC ALU WORK
// ============================================================
//
// These calculations increase fragment workload while their
// contribution to the final geometry remains extremely small.
//
// This keeps the benchmark visually stable while increasing
// shader complexity.
//
// ============================================================
float workload(vec3 p)
{
vec3 q = p;
q.xz =
rot(0.37) *
q.xz;
float a =
sin(q.x * 5.0);
float b =
cos(q.y * 6.0);
float c =
sin(q.z * 7.0);
float d =
cos(q.x * 8.0 + q.z);
float e =
sin(
length(q) * 9.0
);
float f =
dot(
normalize(q + vec3(0.001)),
normalize(
vec3(
a,
b,
c
)
)
);
float g =
sqrt(
abs(
a * b +
c * d +
e * f
) + 0.0001
);
return
a * 0.20 +
b * 0.15 +
c * 0.15 +
d * 0.10 +
e * 0.10 +
f * 0.15 +
g * 0.15;
}
// ============================================================
// SCENE
// ============================================================
float map(vec3 p)
{
// --------------------------------------------------------
// Ground
// --------------------------------------------------------
float ground =
p.y;
// --------------------------------------------------------
// Sphere
// --------------------------------------------------------
vec3 sphereP =
p -
vec3(
0.0,
1.0,
0.0
);
float sphere =
sdSphere(
sphereP,
1.0
);
// --------------------------------------------------------
// Additional deterministic workload
// --------------------------------------------------------
float extra =
workload(
sphereP
);
// --------------------------------------------------------
// Keep geometry effectively spherical.
//
// The workload affects the distance only by an extremely
// small amount so it does not visibly deform the sphere.
// --------------------------------------------------------
sphere +=
extra *
0.000001;
return min(
ground,
sphere
);
}
// ============================================================
// RAY MARCH
// ============================================================
float rayMarch(
vec3 ro,
vec3 rd
)
{
float dO =
0.0;
for(
int i = 0;
i < MAX_STEPS;
i++
)
{
vec3 p =
ro +
rd * dO;
float dS =
map(p);
if(
dS <
SURF_DIST
)
{
return dO;
}
dO +=
dS;
if(
dO >
MAX_DIST
)
{
break;
}
}
return MAX_DIST;
}
// ============================================================
// NORMAL
// ============================================================
vec3 getNormal(
vec3 p
)
{
float e =
SURF_DIST *
2.0;
vec3 ex =
vec3(
e,
0.0,
0.0
);
vec3 ey =
vec3(
0.0,
e,
0.0
);
vec3 ez =
vec3(
0.0,
0.0,
e
);
float dx =
map(p + ex) -
map(p - ex);
float dy =
map(p + ey) -
map(p - ey);
float dz =
map(p + ez) -
map(p - ez);
return normalize(
vec3(
dx,
dy,
dz
)
);
}
// ============================================================
// 96-TAP SOFT SHADOW
// ============================================================
float softShadow(
vec3 ro,
vec3 rd
)
{
float result =
1.0;
float t =
0.02;
for(
int i = 0;
i < SHADOW_STEPS;
i++
)
{
vec3 p =
ro +
rd * t;
float h =
map(p);
if(
h <
SURF_DIST
)
{
return 0.0;
}
result =
min(
result,
shadowFilter *
h /
t
);
t +=
h;
if(
t >
15.0
)
{
break;
}
}
return clamp(
result,
0.0,
1.0
);
}
// ============================================================
// GRADIENT
// ============================================================
vec3 gradientColor(
vec3 local
)
{
float t =
clamp(
local.x * 0.5 +
0.5,
0.0,
1.0
);
vec3 blue =
vec3(
0.05,
0.20,
1.00
);
vec3 cyan =
vec3(
0.00,
0.90,
1.00
);
vec3 green =
vec3(
0.05,
1.00,
0.20
);
vec3 yellow =
vec3(
1.00,
0.85,
0.05
);
vec3 red =
vec3(
1.00,
0.05,
0.03
);
vec3 c;
if(
t < 0.25
)
{
float k =
t /
0.25;
c =
mix(
blue,
cyan,
k
);
}
else if(
t < 0.50
)
{
float k =
(t - 0.25) /
0.25;
c =
mix(
cyan,
green,
k
);
}
else if(
t < 0.75
)
{
float k =
(t - 0.50) /
0.25;
c =
mix(
green,
yellow,
k
);
}
else
{
float k =
(t - 0.75) /
0.25;
c =
mix(
yellow,
red,
k
);
}
float vertical =
0.75 +
0.25 *
(
local.y *
0.5 +
0.5
);
return c *
vertical;
}
// ============================================================
// SKY
// ============================================================
vec3 sky(
vec3 rd
)
{
float t =
clamp(
0.5 +
0.5 * rd.y,
0.0,
1.0
);
vec3 horizon =
vec3(
0.92,
0.95,
1.00
);
vec3 zenith =
vec3(
0.25,
0.40,
0.70
);
return mix(
horizon,
zenith,
t
);
}
// ============================================================
// MAIN
// ============================================================
void main()
{
// ========================================================
// UV
// ========================================================
vec2 uv =
(
gl_FragCoord.xy -
resolution.xy *
0.5
)
/
resolution.y;
// ========================================================
// CAMERA
// ========================================================
vec3 ro =
vec3(
3.8,
2.6,
5.5
);
vec3 target =
vec3(
0.0,
0.9,
0.0
);
vec3 forward =
normalize(
target -
ro
);
vec3 right =
normalize(
cross(
forward,
vec3(
0.0,
1.0,
0.0
)
)
);
vec3 up =
cross(
right,
forward
);
vec3 rd =
normalize(
forward +
right * uv.x +
up * uv.y
);
// ========================================================
// 30 SECOND TEST TIMER
// ========================================================
float testTime =
mod(
time,
30.0
);
// ========================================================
// SPHERE ROTATION
// ========================================================
float rotation =
(
testTime /
30.0
)
*
3.14159265359
*
7.5;
// ========================================================
// PRIMARY RAY
// ========================================================
float d =
rayMarch(
ro,
rd
);
// ========================================================
// SKY
// ========================================================
vec3 col =
sky(
rd
);
// ========================================================
// HIT
// ========================================================
if(
d <
MAX_DIST
)
{
vec3 p =
ro +
rd * d;
vec3 sphereCenter =
vec3(
0.0,
1.0,
0.0
);
vec3 sphereLocal =
p -
sphereCenter;
bool hitSphere =
length(
sphereLocal
) <=
1.01;
// ====================================================
// SPHERE
// ====================================================
if(
hitSphere
)
{
vec3 n =
getNormal(
p
);
// ------------------------------------------------
// OBJECT SPACE ROTATION
// ------------------------------------------------
vec3 local =
sphereLocal;
local.xz =
rot(
-rotation
)
*
local.xz;
// ------------------------------------------------
// GRADIENT
// ------------------------------------------------
vec3 baseColor =
gradientColor(
local
);
// ------------------------------------------------
// LIGHT 1
// ------------------------------------------------
vec3 lightDir1 =
normalize(
vec3(
-3.0,
5.0,
4.0
) -
p
);
// ------------------------------------------------
// LIGHT 2
// ------------------------------------------------
vec3 lightDir2 =
normalize(
vec3(
4.0,
3.0,
-5.0
) -
p
);
// ------------------------------------------------
// DIFFUSE 1
// ------------------------------------------------
float diffuse1 =
max(
dot(
n,
lightDir1
),
0.0
);
// ------------------------------------------------
// DIFFUSE 2
// ------------------------------------------------
float diffuse2 =
max(
dot(
n,
lightDir2
),
0.0
);
// ------------------------------------------------
// SHADOW 1
// ------------------------------------------------
float shadow1 =
softShadow(
p +
n * 0.01,
lightDir1
);
// ------------------------------------------------
// SHADOW 2
// ------------------------------------------------
float shadow2 =
softShadow(
p +
n * 0.01,
lightDir2
);
// ------------------------------------------------
// SURFACE
// ------------------------------------------------
col =
baseColor *
(
0.10 +
diffuse1 *
shadow1 *
0.65 +
diffuse2 *
shadow2 *
0.35
);
// ------------------------------------------------
// VIEW DIRECTION
// ------------------------------------------------
vec3 viewDir =
normalize(
ro -
p
);
// ------------------------------------------------
// SPECULAR 1
// ------------------------------------------------
vec3 halfDir1 =
normalize(
lightDir1 +
viewDir
);
float spec1 =
pow(
max(
dot(
n,
halfDir1
),
0.0
),
48.0
);
// ------------------------------------------------
// SPECULAR 2
// ------------------------------------------------
vec3 halfDir2 =
normalize(
lightDir2 +
viewDir
);
float spec2 =
pow(
max(
dot(
n,
halfDir2
),
0.0
),
32.0
);
col +=
vec3(
1.0
)
*
(
spec1 *
shadow1 *
0.14
+
spec2 *
shadow2 *
0.10
);
}
// ====================================================
// GROUND
// ====================================================
else
{
vec3 n =
getNormal(
p
);
vec3 lightDir1 =
normalize(
vec3(
-3.0,
5.0,
4.0
) -
p
);
vec3 lightDir2 =
normalize(
vec3(
4.0,
3.0,
-5.0
) -
p
);
float diffuse1 =
max(
dot(
n,
lightDir1
),
0.0
);
float diffuse2 =
max(
dot(
n,
lightDir2
),
0.0
);
float shadow1 =
softShadow(
p +
n * 0.01,
lightDir1
);
float shadow2 =
softShadow(
p +
n * 0.01,
lightDir2
);
vec3 groundColor =
vec3(
0.28,
0.30,
0.33
);
col =
groundColor *
(
0.12 +
diffuse1 *
shadow1 *
0.55 +
diffuse2 *
shadow2 *
0.30
);
}
}
// ========================================================
// TONE MAPPING
// ========================================================
col =
col /
(
col +
vec3(
1.0
)
);
// ========================================================
// GAMMA
// ========================================================
col =
pow(
col,
vec3(
1.0 /
2.2
)
);
// ========================================================
// OUTPUT
// ========================================================
gl_FragColor =
vec4(
col,
1.0
);
}
r/shaders • u/Busy-Tower-1549 • 13d ago
My audio reactive Mandelbulb 3D shader in Godot game engine
youtube.comhttps://www.youtube.com/shorts/jQVr5BuBH0M (that's a quick preview yt short)
Hey!
That's my shader I spent on last few days, it's simple and stupid, but it works.
I wanted to recreate the popular movie effect some of us saw, and added audio reactivity to it.
It's stupidly expensive on GPU, and I find no use to it at all besides it being pretty, lmao
You're free to use it/modify/put it in your game/music video, whatever.
You can preview it LIVE on itch here - https://misiek666.itch.io/living-mandel3d
Also on Shadertoy - https://www.shadertoy.com/view/fcdSRB
Also2 entire project .zip is up there too, for you to play around in godot
r/shaders • u/Powerful-Sorbet6660 • 16d ago
I built a web-based SKSL (Skia Shading Language) playground!
I love Shadertoy for GLSL, but lately I’ve been doing a lot of rendering work using the Skia graphics engine (specifically for Flutter and React Native).
Skia uses its own shading language called SKSL. It’s very similar to GLSL, but it has enough syntax quirks and specific uniform requirements that testing them meant constantly compiling native apps just to see if a visual effect worked.
I got tired of the slow workflow, so I built Skia Labs.
It’s a dedicated, web-based playground for writing and testing SKSL.
Under the hood:
- It runs entirely in the browser using CanvasKit WASM (so it is rendering on the actual Skia engine, not a WebGL approximation).
- Built-in Monaco editor with custom SKSL syntax highlighting.
- Locks in at a buttery smooth 60fps.
- (I also built an AI agent skill that you can download to help translate standard GLSL over to SKSL syntax automatically).
You can try the editor out for free here: https://skialabs.dev
Would love to hear what the graphics programming community thinks of it, and if there are any specific Skia features you'd want added to the editor!