tiling optimisation 2.2ms -> 1.7ms

This commit is contained in:
minjaesong
2023-10-10 18:16:35 +09:00
parent 26936fde09
commit 3b32242a2b
16 changed files with 177 additions and 56 deletions

View File

@@ -53,10 +53,10 @@ int _colToInt(vec4 color) {
return int(color.b * 255) | (int(color.g * 255) << 8) | (int(color.r * 255) << 16) | (int(color.a * 255) << 24);
}
// 0x0rggbb where int=0xaarrggbb
// return: [0..1048575]
// 0x00ggbb where int=0xaarrggbb
// return: [0..65535]
int getTileFromColor(vec4 color) {
return _colToInt(color) & 0xFFFFF;
return _colToInt(color) & 0xFFFF;
}
// 0x00r00000 where int=0xaarrggbb