Custom Post Effects
Would be great to have a simple and nice API for creating custom post effects with the new CameraFrame system.
Currently, docs: https://developer.playcanvas.com/user-manual/graphics/posteffects/ As well as the engine: https://github.com/playcanvas/engine/tree/main/scripts/posteffects Contains old post-effects, while they all are deprecated. And does not work out of the box when used with recent engine (requires to use class instead of prototype inheritance). Also, the old system does not mix with the new system, if you try to use both systems together, it simply renders black screen.
It would be great to have a proper new system, that allows an easy way to define custom post-effects, and add them into the queue in CameraFrame.
New system while it has higher quality effects, it really lacking in examples and flexibility for custom effects. It is not even possible to override its implementation chunks: https://github.com/playcanvas/engine/issues/7921
I keep thinking about how to make something like this possible, and it certainly is not easy, as easy and performant are often two ends of the spectrum.
I have one example showing how to add custom render passes. Note that this does not use CamerFrame, and so it's a bit limited: https://playcanvas.vercel.app/#/graphics/render-pass
On the other hand, the CameraFrame is set up in a way the user can extend the class, and add custom rendering passes. It's not easy, as users rendering passes need to often integrate with other passes (be done in the right order for example), so this is something more advanced users would do.
But it's definitely on my list to improve, make easier to add passes in perhaps less than optimal way. And also add more built-in post effects that are simply available.
On the other hand, the
CameraFrameis set up in a way the user can extend the class, and add custom rendering passes. It's not easy, as users rendering passes need to often integrate with other passes (be done in the right order for example), so this is something more advanced users would do.
If there would be more documentation and/or example of such, that would be amazing.
here's one example which documents a simple compose shader modification, that does not require additional render passes: https://github.com/playcanvas/engine/pull/7989