phaser icon indicating copy to clipboard operation
phaser copied to clipboard

[Bug] setPipeline() seems bugged for Layers and Containers

Open orcomarcio opened this issue 2 years ago • 2 comments

Version

  • Phaser Version: 3.55.2
  • Operating system: Windows 10
  • Browser: Chrome

Description

Using setPipeline() on a Sprite works, using it on a layer or container doesn't.

Example Test Code

phaser.io/examples/v3/view/renderer/container-pipeline# As seen in this example (you need to use 'Edit' to actually run it), the filter is not applied to the children. If you put the same setPipeline() directly on children though it works.

Additional Information

I'm not 100% sure this is not an intended feature/expected result of latest updates. Either way I can't find any information online on the topic, neither I get replies form the Discord server (I suspect not many people use this feature that much). Another noteworthy thing, as seen here phaser.io/examples/v3/view/game-objects/layer/layer-post-pipeline using setPostPipeline() works as expected.

orcomarcio avatar Mar 29 '22 08:03 orcomarcio

This is correct as neither of those Game Objects render (both should support Post Pipelines, however).

Although there is an argument that setting it on a Container would force all children to use that pipeline, that's quite an assumption to make.

photonstorm avatar Apr 14 '22 13:04 photonstorm

Leaving this issue open as a reminder for it to throw a runtime warning about using this.

photonstorm avatar May 06 '22 16:05 photonstorm

Containers and Layers now have the new PostPipeline Component which resolves this issue.

photonstorm avatar Feb 03 '23 18:02 photonstorm