开发者

Creating and using my own mipmap of a texture atlas

开发者 https://www.devze.com 2023-01-10 07:03 出处:网络
I\'m currently using the automatic mipmap generation (C# + OpenTK): GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);

I'm currently using the automatic mipmap generation (C# + OpenTK):

GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);

The texture I'm using is tiled into blocks of 16px². So my questions would be:

  • Is it possible to use a mipmap which doesn't get downsized to 1x1?
  • What would be the best way to create a mipmap which doesn't "blur开发者_Go百科" the blocks into another?


You mean, using a mipmap chain that doesn't get up to 1x1? You can limit which levels can be used with glTexParameter, see the GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL parameters.

I don't understand your second question, if you mean using your own generated mipmaps, see the level parameter of glTexImage2D, with it you can upload your own mipmaps, filtered in any way.

0

精彩评论

暂无评论...
验证码 换一张
取 消