| 97 | #define OPT_MIPMAPPING 1 |
| 98 | |
| 99 | vec3 getHalfTint(ivec2 packedColor) |
| 100 | { |
| 101 | int r = (packedColor.x >> 15) & 255; |
| 102 | int g = (packedColor.x >> 23) & 255; |
| 103 | int b = (packedColor.y >> 15) & 255; |
| 104 | |
| 105 | float scale = 1.0 / 255.0; |
| 106 | vec3 tint; |
| 107 | tint.x = float(r) * scale; |
| 108 | tint.y = float(g) * scale; |
| 109 | tint.z = float(b) * scale; |
| 110 | return tint; |
| 111 | } |
| 112 | |
| 113 | vec2 scaleUv(vec2 uv, int data) |
| 114 | { |