mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 09:35:34 +00:00
Shadows decals
This commit is contained in:
parent
01a852de9b
commit
1dfce7802b
12 changed files with 5344 additions and 1520 deletions
|
|
@ -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(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue