Closed claudeha closed 4 years ago
I looked at the source code to see if I need to fix it, and found a workaround/solution: specify
#TexParameter Texture GL_TEXTURE_MAX_LEVEL 1000
in addition to requesting mipmaps, otherwise you get a blank black image.
yes, you need to specify all of the texture parameters after the sampler decl as in...
uniform sampler2D myTexture; file[test.png]
#TexParameter myTexture GL_TEXTURE_MAX_LEVEL 1000
#TexParameter myTexture GL_TEXTURE_WRAP_S GL_REPEAT
#TexParameter myTexture GL_TEXTURE_WRAP_T GL_REPEAT
#TexParameter myTexture GL_TEXTURE_MAG_FILTER GL_LINEAR
#TexParameter myTexture GL_TEXTURE_MIN_FILTER GL_LINEAR_MIPMAP_LINEAR
if any are missing you may have undefined result
keys...
GL_TEXTURE_WRAP_T
GL_TEXTURE_WRAP_S
GL_TEXTURE_MIN_FILTER
GL_TEXTURE_MAG_FILTER
GL_TEXTURE_MAX_LEVEL
GL_TEXTURE_MAX_ANISOTROPY
values...
GL_CLAMP
GL_REPEAT
GL_NEAREST
GL_LINEAR
GL_LINEAR_MIPMAP_LINEAR
GL_LINEAR_MIPMAP_NEAREST
GL_NEAREST_MIPMAP_LINEAR
GL_NEAREST_MIPMAP_NEAREST
when no texture parameters are defined by user mipmap is disabled.
yes, you need to specify all of the texture parameters after the sampler decl as in...
uniform sampler2D myTexture; file[test.png]
#TexParameter myTexture GL_TEXTURE_MAX_LEVEL 1000
#TexParameter myTexture GL_TEXTURE_WRAP_S GL_REPEAT
#TexParameter myTexture GL_TEXTURE_WRAP_T GL_REPEAT
#TexParameter myTexture GL_TEXTURE_MAG_FILTER GL_LINEAR
#TexParameter myTexture GL_TEXTURE_MIN_FILTER GL_LINEAR_MIPMAP_LINEAR
if any are missing you may have undefined result
keys...
GL_TEXTURE_WRAP_T
GL_TEXTURE_WRAP_S
GL_TEXTURE_MIN_FILTER
GL_TEXTURE_MAG_FILTER
GL_TEXTURE_MAX_LEVEL
GL_TEXTURE_MAX_ANISOTROPY
values...
GL_CLAMP
GL_REPEAT
GL_NEAREST
GL_LINEAR
GL_LINEAR_MIPMAP_LINEAR
GL_LINEAR_MIPMAP_NEAREST
GL_NEAREST_MIPMAP_LINEAR
GL_NEAREST_MIPMAP_NEAREST
when no texture parameters are defined by user mipmap is disabled.
Describe the bug Trying to enable mipmaps (for anti-aliasing) leads to blank black image.
To Reproduce Steps to reproduce the behavior:
Expected behavior Mipmapping to work.
Desktop (please complete the following information):
Additional context Very partial workround for less ugly images: use GL_NEAREST and bump up the subframe count.