opengl 纹理过滤低质量 [英] opengl texture filtering low quality

查看:75
本文介绍了opengl 纹理过滤低质量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 Windows 机器上,我看不到下一个设置之间的区别:

On my windows machine I see no difference between next settings:

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

而且两者的质量都很差.我是否缺少管道中的某些设置?

and both are of quite bad quality. Am I missing some settings in pipeline?

如果这是某种奇怪的东西,我有什么选择可以通过opengl 不使用自定义缩放?

And if this is some kind of oddity what are my options to overcome this by the means of opengl without using custom scaling?

不确定 windows 标签.)

推荐答案

对于缩小,您可能希望启用 mipmapping.请参见 GL_LINEAR_MIPMAP_LINEAR,否则当放大 2 倍以上时,高频纹理中会出现非常明显的锯齿.当然,你需要生成mipmap,使用这个!

For minifictation, you likely want to enable mipmapping. See GL_LINEAR_MIPMAP_LINEAR, otherwise you will get very noticeable aliasing in high frequency textures, when you zoom in more than 2x. Of course, you need to generate mipmaps, do use this!

这篇关于opengl 纹理过滤低质量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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