Replies: 3 comments 2 replies
-
@usaken Thanks for reaching out.
|
Beta Was this translation helpful? Give feedback.
-
Are you actually measuring GPU performance using The bigger perf hit is that you are still running the non-visible points through the shaders, not just the if statement itself (perhaps that is what you meant). |
Beta Was this translation helpful? Give feedback.
-
I'm not sure what you mean by "customized PointCloudLayer". If you are subclassing deck.gl's PointCloudLayer, then no, because the layer already uses an index buffer to draw each instance (circle). If you are writing your own primitive layer that draws GL_POINT, then sure, you can create an index buffer to select points. It is hard to agree with a blanket statement such as "using if is bad". It greatly depends on how you write your shader. Aside from experimenting with WebGL techniques, I also recommend that you investigate:
|
Beta Was this translation helpful? Give feedback.
-
I am now using customized PointCloudLayer. I need to treat a large number of points, but I need to change the displayed points depending on the situation. I want to change points to show with index buffer. Can I use index buffer on PointCloudLayer ?
Index buffer means the following URL description:
https://webglfundamentals.org/webgl/lessons/webgl-indexed-vertices.html
Beta Was this translation helpful? Give feedback.
All reactions