Author Topic: Version updates!  (Read 78451 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11770
    • View Profile
    • http://www.jpct.net
Version updates!
« on: March 28, 2010, 09:47:50 pm »
As long as jPCT-AE is still in alpha stage, i'll post changes in this thread.
« Last Edit: November 14, 2013, 12:12:47 pm by EgonOlsen »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11770
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #1 on: March 28, 2010, 09:48:59 pm »
New version uploaded with better support for 16bit textures. It now determines if 4bpp or 5/1 is the better choice, so that it can use a higher color accuracy on textures that don't need 4bits of alpha.

Offline dl.zerocool

  • long
  • ***
  • Posts: 104
    • View Profile
Re: Version updates!
« Reply #2 on: March 29, 2010, 12:11:14 am »
alway nice to see updates :P

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11770
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #3 on: March 31, 2010, 08:33:56 pm »
I've updated the jar with a new version that includes the ability to unload textures via the TextureManager. The renderer already supported this, i just missed to port the methods in TextureManager. This is fixed now, happy unloading...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11770
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #4 on: March 31, 2010, 11:13:35 pm »
And another update with slightly higher blitting performance and a new method (Texture.keepPixelData(<boolean>)).

Offline raft

  • quad
  • ******
  • Posts: 1971
    • View Profile
    • http://www.aptalkarga.com
Re: Version updates!
« Reply #5 on: March 31, 2010, 11:55:43 pm »
cool, there seem to be %10-15 blitting performance increase ;D

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11770
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #6 on: April 01, 2010, 07:07:30 am »
Yes, it uses indexed geometry now, which reduces vertex uploads to the GPU by 25% but adds maintaining the additional indices. 10-15% is quite ok as a result.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11770
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #7 on: April 07, 2010, 09:28:43 pm »
Uploaded a new jar version with greatly improved animation and blitting performance as well as a moderately improved overall performance.

Offline raft

  • quad
  • ******
  • Posts: 1971
    • View Profile
    • http://www.aptalkarga.com
Re: Version updates!
« Reply #8 on: April 07, 2010, 11:00:26 pm »
awesome. there is about 50% fps increase at bones ninja demo ;D
so how is this happened, profiling miracle ?

note: apk is up to date

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11770
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #9 on: April 07, 2010, 11:24:05 pm »
While still doing the calculations in floating point, i'm sending the results converted to fixed point to the GPU now. While this makes no difference at all if you do it one by one, it largely improves performance when doing it in batch, i.e. instead of transfering float[]s into native memory, i'm now using int[]s. I really don't understand why this is the case. I would have expected the floats to be copied without any changes from VM to native memory but that doesn't seem to be the case somehow.

One ninja animates @18fps now, two at @10, three @6 on my phone now.

Edit: The increase doesn't come from rendering the scene itself, because static geometry doesn't improve that much (not even 10%), so it has to be the data transfer. My MD2 test case now runs at 54 fps instead of 26 and my blitting test at 44 instead of 12. Considering that i started with 4fps for that MD2 with the initial release, this is not too bad...

« Last Edit: April 07, 2010, 11:28:36 pm by EgonOlsen »

Offline raft

  • quad
  • ******
  • Posts: 1971
    • View Profile
    • http://www.aptalkarga.com
Re: Version updates!
« Reply #10 on: April 08, 2010, 02:28:56 am »
quite impressive indeed ;D

very similar results on G1. 17, 10, 6 fps with 1,2,3 ninjas. 26, 16, 11 fps when converted to keyframe meshes. here is the apk. definetely a boost

so i suppose you dont cast floats to ints, but use Float.floatToIntBits(..) or Float.floatToRawIntBits(..) method ?

i wonder how this will perform on nexus one ? maybe dl.zerocool may test it if he's around ;)


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11770
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #11 on: April 08, 2010, 07:41:26 am »
Nope, it's a cast. I'm using this floatToIntBits() in some other locations like the normal calculations but not here.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11770
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #12 on: April 08, 2010, 08:42:18 am »
However, i somehow have to add support for float[] back in, because int[]s are too limiting in some situations. I just have to find a good way to do it without hurting performance of the int[]s...
« Last Edit: April 08, 2010, 09:05:30 am by EgonOlsen »

Offline raft

  • quad
  • ******
  • Posts: 1971
    • View Profile
    • http://www.aptalkarga.com
Re: Version updates!
« Reply #13 on: April 08, 2010, 02:00:38 pm »
i see. so model scale should be appropriate.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11770
    • View Profile
    • http://www.jpct.net
Re: Version updates!
« Reply #14 on: April 08, 2010, 08:50:46 pm »
Another update, now with the option to revert to floating point. Object3D has a new method (setFixedPointMode(<boolean>)) for this, default is true. If set to false, vertex data will use floating point again. The rest remains in fixed point, i.e. animations will still run faster than before...just not as fast as with fixed point only.