disable mipmaps in hud, 1 in #49

This commit is contained in:
Bixilon 2022-01-03 14:57:15 +01:00
parent 547e754245
commit 3e66b57461
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 18 additions and 1 deletions

View File

@ -22,7 +22,7 @@ in vec4 finTintColor;
#include "minosoft:texture"
void main() {
vec4 texelColor = getTexture(finTextureIndex, finTextureCoordinates);
vec4 texelColor = getTexture(finTextureIndex, finTextureCoordinates, 0.0f);
//texelColor = vec4(1.0f, 0.0f, 1.0f, 1.0f);

View File

@ -29,3 +29,20 @@ vec4 getTexture(uint textureId, vec3 uv) { // ToDo: This method is just stupid a
return texture(uTextures[0], uv);
#endif
}
vec4 getTexture(uint textureId, vec3 uv, float mipmapLevel) { // ToDo: This method is just stupid and workarounds a opengl crash with mesa drivers
#if defined __NVIDIA || defined __AMD
return textureLod(uTextures[textureId], uv, mipmapLevel);
#else
switch (textureId) {
case 1u: return textureLod(uTextures[1], uv, mipmapLevel);
case 2u: return textureLod(uTextures[2], uv, mipmapLevel);
case 3u: return textureLod(uTextures[3], uv, mipmapLevel);
case 4u: return textureLod(uTextures[4], uv, mipmapLevel);
case 5u: return textureLod(uTextures[5], uv, mipmapLevel);
case 6u: return textureLod(uTextures[6], uv, mipmapLevel);
}
return textureLod(uTextures[0], uv, mipmapLevel);
#endif
}