Thanks for the repro!
This PR will fix the problem:
BabylonJS:master
← Popov72:fix-mismatch-effectdefine-rtt
opened 06:23PM - 15 Oct 22 UTC
See https://forum.babylonjs.com/t/exception-if-material-parameter-set-on-linesme… sh/34769/8
It's actually a problem of the `isReady` function being called for the wrong material when testing for material readyness in a RTT.
It was normally already handled by #11696, but the `mesh.isReady(false)` call I added at the start of the `customIsReadyFunction` implementation can end up calling a `isReady` function for the wrong material if the `Mesh.isReady` function is overriden, which is what `LineMesh` is doing:
```typescript
public isReady() {
if (!this._lineMaterial.isReady(this, !!this._userInstancedBuffersStorage)) {
return false;
}
return super.isReady();
}
```
Note that even with the fix you will see some flickering and/or different colors for the shading of the lines: that’s because the standard material is applying lighting. You probably want to use the emissive color for the line color and disable lighting, as in: