textures: load correct 9th texture

Fixes crash on mesa drivers and wrong behavior
This commit is contained in:
Moritz Zwerger 2023-11-26 20:54:25 +01:00
parent 9e995d08b9
commit 31e1dc4073
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -48,7 +48,7 @@ vec4 getTexture(uint textureId, vec3 uv, float mipmapLevel) {
case 6u: return textureLod(uTextures[6], uv, mipmapLevel); case 6u: return textureLod(uTextures[6], uv, mipmapLevel);
case 7u: return textureLod(uTextures[7], uv, mipmapLevel); case 7u: return textureLod(uTextures[7], uv, mipmapLevel);
case 8u: return textureLod(uTextures[8], uv, mipmapLevel); case 8u: return textureLod(uTextures[8], uv, mipmapLevel);
case 9u: return textureLod(uTextures[8], uv, mipmapLevel); case 9u: return textureLod(uTextures[9], uv, mipmapLevel);
} }
return textureLod(uTextures[0], uv, mipmapLevel); return textureLod(uTextures[0], uv, mipmapLevel);
#endif #endif