Android上的OpenGL渐变带 [英] OpenGL gradient banding on Android

查看:24
本文介绍了Android上的OpenGL渐变带的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在市场上有一个动态壁纸,它使用 OpenGL 来渲染一些基本形状和平面.简单的照明在平面上产生渐变效果,在大多数设备上看起来都很好.不过,正如您在此屏幕截图中所见,三星 Galaxy S2 系列似乎在渲染渐变时遇到了一些问题:

I've got a live wallpaper out on the market which uses OpenGL to render some basic shapes and a flat plane. The simple lighting creates a gradient effect across the plane, which looks fine on most devices. The Samsung Galaxy S2 series seems to have some trouble rendering the gradient, though, as you can see in this screen shot:

色带看起来很糟糕,尤其是与难以置信的屏幕截图相比:

The color banding looks awful, especially compared to this screen shot from an Incredible:

我在这两种情况下都使用 565 EGL 配置,所以我相信这只是 GS2 设备的显示问题.谁能证实这个怀疑?

I'm using a 565 EGL config in both cases, so I believe this is just a display issue with the GS2 devices. Can anyone confirm this suspicion?

有什么解决办法?

推荐答案

看起来真的是 GS2 的显示,或者更准确地说,是它的抖动算法.我尝试将我请求的配置提升到 RGB888,这就是我得到的(来自我的测试用户的手机):

Looks like it really is the GS2's display, or more accurately, its dithering algorithm. I tried upping my requested config to RGB888, and this is what I get (from my test user's phone):

因此,在尝试将 888 空间中的颜色映射到 565 配置时,GS2 似乎确实做了可怕的抖动工作.

So it really seems like the GS2 just does a horrible job of dithering when trying to map colors in an 888 space to a 565 config.

现在我不确定我是想在所有设备上将配置提高到 888(质量更好,但性能受到影响),还是只在我知道抖动很差的设备上.嗯.

Now I'm not sure if I want to up the config to 888 across all devices (better quality but a performance hit), or only on devices which I know to dither poorly. Hmmm.

这篇关于Android上的OpenGL渐变带的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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