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

问题描述

我有一个活的壁纸哪些使用OpenGL渲染一些基本的形状和平面投放市场。简单的光线,创造出在地平面上,它看起来罚款大多数设备渐变效果。三星Galaxy S2系列似乎有一些麻烦渲染渐变,不过,你可以在这个截图中看到:

特别是相对于这个屏幕截图来自一个令人难以置信的色带看起来可怕,

我使用的是565 EGL配置在这两种情况下,所以我相信这只是一个显示问题,与GS2设备。任何人都可以证实这一点怀疑?

请问有什么解决束带?

解决方案

看起来它真的是GS2的显示器,或者更准确地说,它的抖动算法。我试着正在增加我的要求的配置,以RGB888,这是我所得到的(从我的测试用户的电话):

所以,这真的好像GS2只是做尝试的颜色在888空间映射到一个565的配置时,抖动了可怕的工作。

现在我不知道如果我想起来在所有设备(质量越好,但性能损失),或只在这我知道抖动不佳设备的配置,以888。嗯。

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:

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?

Is there any solution to the banding?

解决方案

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):

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.

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的梯度条带的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 01:14