1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

Minor cleanups to some shader code

This commit is contained in:
Emmanouil Papadeas 2024-09-11 17:01:44 +03:00
parent 8f6eba3f84
commit 3bd7e94a59
2 changed files with 17 additions and 17 deletions

View file

@ -10,7 +10,7 @@ uniform bool alpha = false;
// respectively instead of color components.
// When you draw, color will be taken from the x-y position in the "Map Texture".
// (end DESCRIPTION)
void fragment(){
void fragment() {
vec4 col = texture(TEXTURE, UV);
vec2 map_size = vec2(textureSize(map_texture, 0));
vec2 lookup_uv = vec2(round(col.x * 255.0)/(map_size.x), round(col.y * 255.0)/(map_size.y));