Shadows decals

This commit is contained in:
MaddoScientisto 2025-12-28 22:53:31 +01:00
commit 1dfce7802b
12 changed files with 5344 additions and 1520 deletions

View file

@ -19,11 +19,29 @@ int PSXDither(ivec2 fragcoord) {
-3, +1, -4, +0,
+3, -1, +2, -2
};
const int dither_table2[16] = {
+0, +8, 2, +10,
+12, -4, +14, +6,
+3, +11, +1, +9,
+15, +7, +13, +5
};
const int dither_table_8[64] = {
0, 32, 8, 40, 2, 34, 10, 42,
48, 16, 56, 24, 50, 18, 58, 26,
12, 44, 4, 36, 14, 46, 6, 38,
60, 28, 52, 20, 62, 30, 54, 22,
3, 35, 11, 43, 1, 33, 9, 41,
51, 19, 59, 27, 49, 17, 57, 25,
15, 47, 7, 39, 13, 45, 5, 37,
63, 31, 55, 23, 61, 29, 53, 21
};
int x = fragcoord.x % 4;
int y = fragcoord.y % 4;
return dither_table[y * 4 + x];
return dither_table_8[y * 4 + x];
}
void fragment(){