jPCT-AE - a 3d engine for Android > Support

Does jPCT-AE support shadow?

(1/6) > >>

kiffa:
There is a ShadowHelper  class in jPCT but not in jPCT-AE.

I want to use shadow in my world with jPCT-AE, is there any simple way to do this?

Thanks!

EgonOlsen:
The short answer would be: No, not yet. There's no official support for shadow mapping in jPCT-AE. The long answer would be: Yes, but...you would have to write the shaders for that by yourself (which might not be the "simple way" that you are looking for).
There is the option to render the depth map into a texture encoded in it's ARGB values, but there are no built-in shaders yet to take this texture and use it for shadow mapping. This is about to be added someday, but ATM, it'll be too slow on anything but the high end anyway.

Thomas.:
Take in account Mali-400 does not support high precision floating point number in fragment shader. So if you have some device with Mali-400 or you want full compatibility with this GPUs, you can not use default depth shader. But its easy rewrite them (my rewritten shader is little bit faster). If you want, I can share them. And if you want some numbers, one per-pixel point light, one per-pixel spot light, post-processing image effects (distortion), one rendering of depth buffer, one rendering of motion vectors and motion blur effect (4 samples)... game is running 49fps on Samsung Galaxy S3, without motion blur (and everything needed for this effect) it is 60fps. So your app can running smooth with shadows too. But take in account, these numbers come from high-end phone.

kiffa:
Thanks, Egon! But i really hope you can support this in jPCT-AE. ;D I think it may be helpful for someone.



--- Quote from: Thomas. on August 01, 2012, 09:02:47 pm ---Take in account Mali-400 does not support high precision floating point number in fragment shader. So if you have some device with Mali-400 or you want full compatibility with this GPUs, you can not use default depth shader. But its easy rewrite them (my rewritten shader is little bit faster). If you want, I can share them. And if you want some numbers, one per-pixel point light, one per-pixel spot light, post-processing image effects (distortion), one rendering of depth buffer, one rendering of motion vectors and motion blur effect (4 samples)... game is running 49fps on Samsung Galaxy S3, without motion blur (and everything needed for this effect) it is 60fps. So your app can running smooth with shadows too. But take in account, this numbers comes from high-end phone.

--- End quote ---

Thanks, Thomas! Please share them! You can update them to a public-web-store, or send to me by email: kiffa.gx@.gmail.com. Thanks again!

EgonOlsen:
I wasn't aware that the default depth shader doesn't work on Mali-crapsets. It would like to see the working version too!

Navigation

[0] Message Index

[#] Next page

Go to full version