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

查看:597
本文介绍了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):

所以它真的看起来像GS2只是做一个可怕的工作抖动时试图映射颜色在888空间到565配置。

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天全站免登陆