visgl / luma.gl

High-performance Toolkit for WebGL-based Data Visualization
https://luma.gl
Other
2.32k stars 212 forks source link

RFC: Improving ClipSpace performance #1203

Open mattes3 opened 5 years ago

mattes3 commented 5 years ago

Background

luma's ClipSpace currently works with 2 triangles that form a square. Other frameworks (e.g. gl-react) use one big triangle, instead. There even is an npm component called a-big-triangle that shows this idea. It points to a blog post that claims that one triangle is about 8% faster than 2 triangles and leads better results.

I'm NOT an expert who could judge this difference or who could change the code correctly, therefore, a question to y'all:

To Do List

tsherif commented 5 years ago

This is quite interesting! Thank you for the references. It should be easy to run benchmarks on a few different hardware setups to see if it's worth making the change.

ibgreen commented 5 years ago

Yes, could be worth a look. I seem to remember considering using a single larger triangle, but opted for using two perfectly fitted triangles instead. No strong reasons I believe, I was mainly focused on getting things functionally correct, didn't do any benchmarks.