terrain atlas: added black patch

This commit is contained in:
minjaesong
2017-08-28 20:37:39 +09:00
parent bdff19237e
commit ff95f9e402
4 changed files with 8 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ ivec2 getTileXY(int tileNumber) {
}
int getTileFromColor(vec4 color) {
return int(color.b * 255) + (int(color.g * 255) * 256) + (int(color.r * 255) * 65536);
return int(color.b * 255) | (int(color.g * 255) << 8) | (int(color.r * 255) << 16);
}
void main() {