Avoiding spikes on enabling groups of entities

I have a fix to those shader related errors

It seems a lot faster with clustered lighting … for me the slow down went from 4s to about 0.5s.

I’ll profile it a bit more now that I’ve fixed the error.

mvaligursky

Hmm, now I have severe rendering issues while flying trough the tunnels. Means visuelly, every now and then artifacts in a severe way pop up. I will try to catch such a situation

Oh wow, it is definitely light related, 157 dynamic lights :sweat_smile:

The strong recommendation here is to use as few dynamic lights (unclustered) as possible, even as few as 8.

Even with clustered lighting, using as few as possible is recommended. 157 is far too many.

With clustered lights this flies much better :slight_smile:

I see the corruption as well, but only with the engine without the mentioned fix. With the shader error fix, all is good.

you can launch it this way with the latest (fixed) engine - note the XXXXXX - replace this with your project number. When the fixed engine gets released properly (in maybe 2 weeks) you can stop doing it.

https://launch.playcanvas.com/XXXXXX?debug=true&ministats=true&use_local_engine=https://code.playcanvas.com/playcanvas-latest.js

Also, clustered lighting handles up to 254 lights, so 157 is within its budget … especially if you disable many in distant parts of the level.

2 Likes

mvaligursky:

that’s good to know.
However 1. you link is dead.
2.nd did I upload my screenshot of the glitch? I am trying again.

note this strange vertical line. it flickers and shows up on other locations also,

yes. that’s the glitch due to shader not compiling.
My link is an example and as I mentioned, you need to replace the XXXXXX part of it - I didn’t want to post a link to your actual project.

Launch your project from editor and copy and paste the relevant bit.

aha, I did not notice this. However, I need to go to another meeting now and investigate the issue later again. Which might mean tomorrow (I am in Germany)

but thanks for your help so far!

greetz, M!

1 Like

Hi, it’s all working now. When will the shader fix be available in a release?

Thanks a lot!

We unfortunately don’t have plans to do a release soon. Maybe in a few weeks time.

in the meantime, you can run it with the parameter to use the fixed engine. If you need to release the build to public, you can download it, replace the engine by the one with the fix and release that as well.