@luma.gl/engine 9.0.5 → 9.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -886,6 +886,8 @@ var _PipelineFactory = class {
886
886
  const varyingHash = "-";
887
887
  const bufferLayoutHash = this._getHash(JSON.stringify(props.bufferLayout));
888
888
  switch (this.device.type) {
889
+ case "webgl":
890
+ return `${vsHash}/${fsHash}V${varyingHash}BL${bufferLayoutHash}`;
889
891
  default:
890
892
  const parameterHash = this._getHash(JSON.stringify(props.parameters));
891
893
  return `${vsHash}/${fsHash}V${varyingHash}T${props.topology}P${parameterHash}BL${bufferLayoutHash}`;
@@ -1190,7 +1192,12 @@ var _Model = class {
1190
1192
  vertexCount: this.vertexCount,
1191
1193
  instanceCount: this.instanceCount,
1192
1194
  indexCount,
1193
- transformFeedback: this.transformFeedback
1195
+ transformFeedback: this.transformFeedback || void 0,
1196
+ // WebGL shares underlying cached pipelines even for models that have different parameters and topology,
1197
+ // so we must provide our unique parameters to each draw
1198
+ // (In WebGPU most parameters are encoded in the pipeline and cannot be changed per draw call)
1199
+ parameters: this.parameters,
1200
+ topology: this.topology
1194
1201
  });
1195
1202
  } finally {
1196
1203
  this._logDrawCallEnd();