Version updates!

Started by EgonOlsen, March 28, 2010, 09:47:50 PM

Previous topic - Next topic

EgonOlsen

As long as jPCT-AE is still in alpha stage, i'll post changes in this thread.

EgonOlsen

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.

dl.zerocool

alway nice to see updates :P

EgonOlsen

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...

EgonOlsen

And another update with slightly higher blitting performance and a new method (Texture.keepPixelData(<boolean>)).

raft

cool, there seem to be %10-15 blitting performance increase ;D

EgonOlsen

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.

EgonOlsen

Uploaded a new jar version with greatly improved animation and blitting performance as well as a moderately improved overall performance.

raft

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

EgonOlsen

#9
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...


raft

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 ;)


EgonOlsen

Nope, it's a cast. I'm using this floatToIntBits() in some other locations like the normal calculations but not here.

EgonOlsen

#12
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...

raft

i see. so model scale should be appropriate.

EgonOlsen

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.