Sprite particle transparency breaks when disposing postprocess

Hi everyone,

Accidentally discovered this one: https://playground.babylonjs.com/#3Q2OTJ#1

By the looks of it, the alpha values seem to remain in the postprocess state.

Tried this one: Alpha doesn't seem to work correctly with postprocess in 4.1.0. No effect.

Best wishes
Joe

cc @Evgeni_Popov

1 Like

This is “by design”.

When you create an image processing post-process, the default behavior is to use the scene’s image processing configuration (scene.imageProcessingConfiguration). So, if you modify certain properties via the post-processing, then delete the post-processing, your changes will remain effective in scene.imageProcessingConfiguration.

The easiest way to solve this problem is to pass your own instance of ImageProcessingConfiguration when you create an ImageProcessingPostProcess:

2 Likes