TobiasReich Posted August 7, 2012 Share Posted August 7, 2012 Hello everyone, I have a problem with my new Galaxy S3 and I hope someone here might help me with that. I'M trying to make an AR-app. So I have a Camera-Preview and on top of it an OpenGLES SurfaceView. So I render some objekts on the camera image. On my old Galaxy S1 and the S2 everything works great. But now I got a problem on my new S3. The colors look "burning" for the transparent pixels. Opaque pixels look all fine. If you want, here is a picture of my problem: Nobody really seems to know that problem so I'm thinking it might be a problem with my phone. I made a very small test program to show this. You may download the code here: dl.dropbox.com/u/13527005/CameraGLTest.zip or if you only want to test it you will find the .apk here: dl.dropbox.com/u/13527005/CameraGLTest.apk So everyone - even if you are not a programmer - may help me finding the problem. I would be very, very glad for any information about this. Even if you tell me it works perfectly fine on your S3. After all than I would know I have a problem with my phone! Thank you very much for your help! Tobias Quote Link to comment Share on other sites More sharing options...
TobiasReich Posted August 8, 2012 Author Share Posted August 8, 2012 Alright, I got an answer for that. The problem was the premultiplication for the alpha values. So in the easiest way it is enough to write: vec3 color = clamp(textureColor.rgb * lightWeighting.xyz, 0.0, 1.0); color *= 0.5; // premultiply by alpha gl_FragColor = vec4(color, 0.5); Even though I don't see why it worked perfectly fine on older systems and it I'm still not sure how to manage this on Gl1.0 where I can't write my own shader code. So hope this helps to anyone who has the same problem! Thanks, Tobias Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.