Re: [android-developers] OpenGL and Camera Preview - blending together gets “over saturated” color

2012-08-08 Thread Tobias Reich
Okay, I will try this but after all, it happens in OpenGL 1.0 as well and there is no chance to change the shader there. What could I do there? And why did it work on older phones/android versions like the S1 and the S2 with Android 2.x? Am Dienstag, 7. August 2012 09:08:57 UTC+2 schrieb Romain

Re: [android-developers] OpenGL and Camera Preview - blending together gets “over saturated” color

2012-08-08 Thread Tobias Reich
Alright. I got it. Now it works. I simply didn't multiply the values! Man, you helped me a lot! Really! How can I thank you for this??? I was working on that problem for... ages! It doesn't explain why it worked perfectly fine on older machines nor does it explain what to do in OpenGL 1.0 but at

Re: [android-developers] OpenGL and Camera Preview - blending together gets “over saturated” color

2012-08-08 Thread Romain Guy
You should be able to make it work with OpenGL ES 1.0 by choosing another blending equation. On Wed, Aug 8, 2012 at 4:44 AM, Tobias Reich tobiasreic...@gmail.comwrote: Okay, I will try this but after all, it happens in OpenGL 1.0 as well and there is no chance to change the shader there.

Re: [android-developers] OpenGL and Camera Preview - blending together gets “over saturated” color

2012-08-08 Thread Tobias Reich
So than it was just pure luck it worked fine with all the previous versions? What changed? Why can't it just be like it was before? I mean, its okay now and not really a big problem. - even though I don't know where I could have seen that information in the API. Thanks anyway! -- You received

[android-developers] OpenGL and Camera Preview - blending together gets “over saturated” color

2012-08-07 Thread Tobias Reich
I'm working on a new Galaxy S3 and found a problem that didn't occur on other phones like my old Galaxy S1 or the Galaxy S2 - which has almost the same GPU as the S3. When drawing my OpenGL models on top of my camera image like this: mGLView = new GLSurfaceView(this);

Re: [android-developers] OpenGL and Camera Preview - blending together gets “over saturated” color

2012-08-07 Thread Romain Guy
Hi, You should output your colors with premultiplied alpha. Your code should look like this: vec3 color = clamp(textureColor.rgb * lightWeighting.xyz, 0.0, 1.0); color *= 0.5; // premultiply by alpha gl_FragColor = vec4(color, 0.5); On Mon, Aug 6, 2012 at 4:21 PM, Tobias Reich