framebuffer getPixels()

Started by haijin, May 27, 2011, 09:38:36 PM

Previous topic - Next topic

EgonOlsen

Yes, or course. But i thought it might be better than nothing...

MrAdam

Quote from: EgonOlsen on May 25, 2012, 03:16:12 PM
Yes, or course. But i thought it might be better than nothing...
It certainly is :P

EgonOlsen

I managed to make the change a bit ealier than expected. Please try this jar: http://jpct.de/download/beta/jpct_ae.jar

MrAdam

Quote from: EgonOlsen on May 25, 2012, 05:45:36 PM
I managed to make the change a bit ealier than expected. Please try this jar: http://jpct.de/download/beta/jpct_ae.jar
Sorry for the late response :-/ Had a bit of a stressing few days lately, we just completed the project.
Anyways, we have been getting reports from users using the Galaxy SII having a completely black car:


I believe this might be due to the phones GPU having a different OpenGL implementation.
Do you have any idea what might cause this?

EgonOlsen

The S2 uses a Mali GPU. It's most likely that the custom shader does something that either the gpu (unlikely) or the driver's shader compiler doesn't like. But it's hard to tell and debug without access to an actual device (which i don't have...). If possible, get a device and try to use the default shaders instead (i.e. don't use your custom ones). That should look ok. If that's the case, try to debug your shader by wild guessing and taking desperate actions...at least that's what i did to get the default shaders working on almost any device that i know of.
In general, shader compiler quality differs largely from one gpu manufacturer to another...the order from bad to good is roughly:

Adreno->Mali->PowerVR->Nvidia

Feel free to post the current shader code you are using. Maybe i can spot something based on bad experience with my own shaders...

MrAdam

Disabling the shader certainly helped. Its no longer in nightrider mode ^^

EgonOlsen

...so it's some problem with the shader code or (more likely) the shader compiler creating stupid code...

MrAdam

Quote from: EgonOlsen on June 04, 2012, 11:24:06 AM
...so it's some problem with the shader code or (more likely) the shader compiler creating stupid code...
I don't think Im gonna find a solution to this, it's most likely a crappy driver.
Updating the phone to 4.x solves the problem ^^

EgonOlsen

When will this app actually be available to the public?

MrAdam

#24
Sorry, I forgot to enable notifications, didn't see your post until now
The app is available here: https://play.google.com/store/apps/details?id=bmw.makeityours

Although, I still haven't been able to fix the black model problem. It appears only on Galaxy S II and S III devices.
I know it's the GPU, we had the same problem with the old engine (jMonkeyEngine) but it got fixed in an update.

Got a video illustrating it: http://vimeo.com/44378417

EgonOlsen

#25
I tried it on my Nexus S...it worked fine for the most parts. I couldn't enter this "scan your code" (whatever that is) part, because it exitied in Android's Camera class. You should have received some bug reports about this. The other problem is with generating the actual add. While everything looks fine in the live view where i place the car, the end result after taking the picture looks strange. Look at this example screen shot. The car was looking fine with proper scale. It properly rested on the top of that hut. But in the final picture, the car looks slightly misplaced, fuzzy and distorted...



Edit: Another example...this is the live view:



and this the result


MrAdam

Again.. sorry for the delay. Been busy with a new project.
Anyways, I know there's problems with the scaling, and parts of the app crashes due to memory limit being reached.

But the main problem is the black car. It won't work on the Galaxy S III either.

EgonOlsen

Have you tried to revert to jPCT's default shaders on these devices? Does that render correctly?

MrAdam

Quote from: EgonOlsen on July 03, 2012, 11:20:50 AM
Have you tried to revert to jPCT's default shaders on these devices? Does that render correctly?
I tried that, yes. The car is still 100% black like in the video. And 100% lit up like a cone light when it gets very close to one light.

Thomas.

I have Galaxy S3, if you need any testing let me know ;)