Author Topic: framebuffer getPixels()  (Read 18566 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: framebuffer getPixels()
« Reply #15 on: May 25, 2012, 03:16:12 pm »
Yes, or course. But i thought it might be better than nothing...

Offline MrAdam

  • int
  • **
  • Posts: 51
    • View Profile
Re: framebuffer getPixels()
« Reply #16 on: May 25, 2012, 03:17:33 pm »
Yes, or course. But i thought it might be better than nothing...
It certainly is :P

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: framebuffer getPixels()
« Reply #17 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

Offline MrAdam

  • int
  • **
  • Posts: 51
    • View Profile
Re: framebuffer getPixels()
« Reply #18 on: June 02, 2012, 05:39:15 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: framebuffer getPixels()
« Reply #19 on: June 02, 2012, 08:36:52 pm »
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...

Offline MrAdam

  • int
  • **
  • Posts: 51
    • View Profile
Re: framebuffer getPixels()
« Reply #20 on: June 04, 2012, 11:05:35 am »
Disabling the shader certainly helped. Its no longer in nightrider mode ^^

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: framebuffer getPixels()
« Reply #21 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...

Offline MrAdam

  • int
  • **
  • Posts: 51
    • View Profile
Re: framebuffer getPixels()
« Reply #22 on: June 04, 2012, 11:31:59 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 ^^

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: framebuffer getPixels()
« Reply #23 on: June 06, 2012, 10:40:18 pm »
When will this app actually be available to the public?

Offline MrAdam

  • int
  • **
  • Posts: 51
    • View Profile
Re: framebuffer getPixels()
« Reply #24 on: June 20, 2012, 11:57:39 am »
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
« Last Edit: June 20, 2012, 02:08:43 pm by MrAdam »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: framebuffer getPixels()
« Reply #25 on: June 20, 2012, 08:09:19 pm »
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

« Last Edit: June 20, 2012, 08:23:02 pm by EgonOlsen »

Offline MrAdam

  • int
  • **
  • Posts: 51
    • View Profile
Re: framebuffer getPixels()
« Reply #26 on: July 03, 2012, 11:11:52 am »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: framebuffer getPixels()
« Reply #27 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?

Offline MrAdam

  • int
  • **
  • Posts: 51
    • View Profile
Re: framebuffer getPixels()
« Reply #28 on: July 03, 2012, 11:44:08 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.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: framebuffer getPixels()
« Reply #29 on: July 03, 2012, 11:51:03 am »
I have Galaxy S3, if you need any testing let me know ;)