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

Re: [Public WebGL] WebKitCSSMatrix and WebGL

On 22/06/2010, at 4:02 AM, Chris Marrin wrote:
Interestingly, J3DIMatrix can also use a "copy" function. This is a method I experimentally added to CSSMatrix. You pass a Float32Array with space for at least 16 floats and the current matrix will be copied into it. This yielded an improvement of 30-40% over both the version that did matrix math in JS and the CSSMatrix version which picked values out of the matrix by hand. This tells me that CSSMatrix probably IS faster, but the GC overhead is eating all that extra performance. It also tells me that with a few small changes and additions, we can significantly improve matrix math in WebGL.

That's great news and good to hear. I had a look at SVGMatrix as well, but that seems to be 3x3 for 2D, as opposed to CSSMatrix which is 4x4 for 3D (with 6 numbers off on the side?).

A mutable version of CSSMatrix would make it easier to get started with WebGL before delving into libraries, and allows tutorials and examples to reduce the initial amount of code loaded to demonstrate a point.

Thanks for looking into this!


You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: