16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 12:49:18 +02:00

Specgloss shaders improvements + experimental SSAO (debug only)

This commit is contained in:
2026-04-21 00:25:29 +02:00
parent 6177cfb01d
commit bc0e4a9e62
17 changed files with 326 additions and 112 deletions

View File

@@ -0,0 +1,14 @@
in vec2 f_coords;
layout(location = 0) out vec4 out_color;
#texture (ssao_tex, 0, R)
uniform sampler2D ssao_tex;
void main() {
vec2 texel = 1.0 / vec2(textureSize(ssao_tex, 0));
float sum = 0.0;
for (int x = -2; x < 2; ++x)
for (int y = -2; y < 2; ++y)
sum += texture(ssao_tex, f_coords + vec2(x, y) * texel).r;
out_color = vec4(sum / 16.0);
}