-
-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
While profiling the particle layer, I noticed continuous shader relinking (gl.getProgramParameter, etc) every frame.
After investigation, seems the cause is calling
weatherlayers-gl/src/deck/layers/particle-layer/particle-line-layer.ts
Lines 226 to 230 in 2d49140
| model.setParameters({ | |
| ...model.parameters, | |
| cullMode: 'front', // enable culling to avoid rendering on both sides of the globe; front-face culling because it seems deck.gl uses a wrong winding order and setting frontFace: 'cw' throws "GL_INVALID_ENUM: Enum 0x0000 is currently not supported." | |
| ...this.props.parameters, | |
| }); |
inside draw().
This leads to deck.gl's rendering loop, which also calls model.setParameters with the layer parameters, to recreate the render pipeline for the model back and forth constantly.
If you set the parameters on the layer itself to exactly match the ones inside particle-line-layer.ts, the issue goes away. Since the equality check prevents re-creation of the render pipeline.
new WeatherLayers.ParticleLayer({
...
parameters: {
depthCompare: 'always',
cullMode: 'front',
},Metadata
Metadata
Assignees
Labels
No labels