创建和使用我自己的纹理图集的mipmap [英] Creating and using my own mipmap of a texture atlas

查看:395
本文介绍了创建和使用我自己的纹理图集的mipmap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用自动生成Mipmap(C#+ OpenTK):

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

GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);

我正在使用的纹理被平铺为16px²的块.所以我的问题是:

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

  • 是否可以使用不缩小为1x1的mipmap?
  • 创建不将块模糊"成另一个块的mipmap的最佳方法是什么?

推荐答案

您的意思是,使用了不超过1x1的mipmap链?您可以限制 glTexParameter 可以使用的级别,请参阅GL_TEXTURE_MIN_LOD,GL_TEXTURE_MAX_LOD,GL_TEXTURE_BASE_LEVEL和GL_TEXTURE_MAX_LEVEL参数.

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.

我不明白您的第二个问题,如果您要使用自己生成的mipmap,请参阅glTexImage2D的level参数,使用它您可以上传自己的mipmap,以任何方式进行过滤.

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.

这篇关于创建和使用我自己的纹理图集的mipmap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆