[HELP REQUIRED] Testing the upcoming Layer System

We are close to deploying a fairly major change to the PlayCanvas runtime. It introduces a Layer System which grants you the ability to control the order in which your scenes are rendered.

I recommend that you test your projects against the dev build of the PlayCanvas Engine. See this page for instructions on how to do that:

https://developer.playcanvas.com/en/user-manual/scripting/custom_engine/

We have tested this change very thoroughly to ensure backwards compatibility. But if you notice any different behavior when using the dev engine, please follow up on this thread and we will investigate. Otherwise, we should be in a position to deploy this change later this week.

5 Likes

Wow! Finally! It is exactly what do I need right now :smiley:

Yesterday, I released a post-effect component. And it doesn’t work with this version :frowning:

https://launch.playcanvas.com/601586?use_local_engine=https://code.playcanvas.com/playcanvas-latest.min.js
against old
https://launch.playcanvas.com/601586

Seems like pc.app.scene._activeCamera.renderTarget is always equal to null.

Yes, pc.CameraComponent#renderTarget has been broken with this change. Pretty much everything else is backwards compatible, but that isn’t. That’s a super-nice post effect - looks great. Hey, @Mr_F, how do you recommend this effect code be updated to work with the new system? Code is here:

https://playcanvas.com/editor/code/546676?tabs=11880432

2 Likes

Camera.renderTarget is deprecated, use Layer.renderTarget instead.

There is a new post effect system included with this change, but we’re fully releasing it a bit later.
You can still use the old way of doing post effects, but the new system should be easier to use, provides more flexibility and works with anti-aliasing.
Refraction is also fairly straightforward to do with the new system (I have a sample code somewhere).

Okay… So you are about to release a new layers system, and then a new post-effects.

Should i rewrite my post-effect on this new layers or better wait for post-effects instead?

And when you say “use new pc.layer” I cant, there is no actual documentation right now, so I wonder is it possible to render layer into a differert render target, but with World’s depth (or blending) ?

This is how my post-effect works.

this is going to get interesting

For particle systems that have “Lighting” enabled when they get to line 28634 in playcanvas-stable.js and check for “this.layers.length” in the for loop the “this.layers” is undefined. It results in a crash.

Disabling the Lighting setting on all particle systems skips that part and the app works.

On start we are also getting a:

Warning
[.Offscreen-For-WebGL-000001E979F21990]GL ERROR :GL_INVALID_OPERATION : glBlitFramebufferCHROMIUM: source buffer and destination buffers are identical.

In Chrome. Or rather 256 of them in quick succession after which it stops logging them with the line:

WebGL: too many errors, no more errors will be reported to the console for this context.

Thank you we will look into those - For the WebGL warning can you share a link to your project or if it’s private can you add vaios to it so I can have a look?

I am currently getting this error too (in the release build) - was this fixed?

Can you post a link to a scene that exhibits this warning?

I’m afraid I can’t - it’s offline, and the project is under NDA.