[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] VBO with 16 or 8 bit data incredibly slow



Yes, many GPUs have alignment requirements, which drivers will sometimes compensate for by rearranging your vertex data before sending it to the GPU - oof.

You can still use 16 and 8 bit attributes, but just keep them aligned, e.g. 4x8bit, 2x16bit, 4x16bit.

On Mon, Jul 9, 2012 at 12:11 PM, Yvonne Jung <[email protected]> wrote:

Hello all,

to improve bandwidth and memory, we tried to pass 16 and 8 bit encoded attribute data via the gl.vertexAttribPointer() call.
According to the WebGL specification you can use e.g. SHORT and BYTE as data type, too, and on NVidia hardware this performs very good.
However, using a computer with ATI card -- or the iPad 3 -- it is incredibly _slow_: instead of real-time framerates as for the same model using FLOAT buffers, we don't even get 1 fps with Int18 or Int8 buffers.

Does ATI or the iPad's GPU require 32-bit alignment or might something else be the problem?
If you want to have a look at the models -- here is the link to the model using float buffers, which performs fine everywhere:
http://examples.x3dom.org/buddha/model-bg.html
And here is the link to the same model using short and char buffers, which only performs good on NVidia GPUs:
http://examples.x3dom.org/buddha/model-bgC.html

Regards
Yvonne

-----------------------------------------------------------
You are currently subscribed to [email protected].
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------