Sign in to follow this  
BMWPilote

32bit float framebuffer on IOS not possible?

Recommended Posts

Hi Folks,

Does anyone know whether it is possible to create 32bit floating point buffer on IOS? It not possible, is there a way to avoid losing too much precision by using 16 bit floating point buffer?

Thanks

Share this post


Link to post
Share on other sites

Last time I checked on iPhone, I believe you are correct that its not supported. You can check this with ( scene.getEngine().getCaps().textureFloatRender ). One option might be to use multiple 16 bit float buffers and store pieces of your result across all of them in your shader.

Share this post


Link to post
Share on other sites
13 hours ago, trevordev said:

Last time I checked on iPhone, I believe you are correct that its not supported. You can check this with ( scene.getEngine().getCaps().textureFloatRender ). One option might be to use multiple 16 bit float buffers and store pieces of your result across all of them in your shader.

OK I understand. Thanks for the idea. But does bitwise shift work on such device like iPhone?

Share this post


Link to post
Share on other sites
14 hours ago, trevordev said:

Last time I checked on iPhone, I believe you are correct that its not supported. You can check this with ( scene.getEngine().getCaps().textureFloatRender ). One option might be to use multiple 16 bit float buffers and store pieces of your result across all of them in your shader.

Could you please help me more on that? I need a 32 bit normal buffer. How can I exactly use two 16 bit normal buffers and then combine them in a fragment shader?

Share this post


Link to post
Share on other sites
6 hours ago, Sebavan said:

Yup we are relying on the same kind of code in shadows for instance to store depth on 4 bytes to simulate a 32 bits float depth buffer 🙂

So if I would like to simulate a 32 bit normal buffer, I will need 3 unsigned int buffers? 😯

Share this post


Link to post
Share on other sites
6 hours ago, Sebavan said:

Yup we are relying on the same kind of code in shadows for instance to store depth on 4 bytes to simulate a 32 bits float depth buffer 🙂

Could you please point me out where I can find the relative code in the repo of Babylonjs?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.