Texture mipmaps
Posted: 31 Dec 2016, 15:17
ZK custom map texture is grainy and according to the comments this is caused by having no mipmap. So the solution is to generate a mipmap for the custom texture and there is a gl.GenerateMipmap callout which I wanted to use:
(actual code)
But this fails: the custom texture is applied but is still grainy. What could be wrong?
Code: Select all
gl.GenerateMipmap("!" .. textureID)
Spring.SetMapSquareTexture(x, z, textureID)
But this fails: the custom texture is applied but is still grainy. What could be wrong?
- gl.GenerateMipmap needs some GL extension. But I was able to call it - the call would be nil (and error out when called) if I didn't have the extension.
- the "!" denotes Lua textures and is expected by gl.GenerateMipmap so I don't think it's the problem either.
- swapping the order of the two callouts does nothing.