Engine Release: v1.55

@slimbuck hi! I noticed, I am losing a reflection on a material with a custom chunk in 1.55. Could you please, advice what needs to be changed? I verified with Spector and the code is in the shader.

combineDiffuseSpecularPS

float blendLighten(float base, float blend) {
	return max(blend,base);
}

vec3 blendLighten(vec3 base, vec3 blend) {
	return vec3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b));
}

vec3 blendLighten(vec3 base, vec3 blend, float opacity) {
	return (blendLighten(base, blend) * opacity + base * (1.0 - opacity));
}

vec3 combineColor() {
    return blendLighten(dAlbedo, dSpecularLight + dReflection.rgb, 0.6);
}

Hi all,

I just updating my latest project to work with the newest release candidate version, and I’ve run into a somewhat odd behavior. It seems like both the initial load take a noticeable amount of extra time and spawning template instances (that have never been spawned before) causes noticeable delays now that clustered lighting is enabled by default.

Disabling clustered lighting appears to restore the performance of the items being created, but I want to understand why I might be seeing this behavior. Does it have something to do with the compiling of shaders?

There are two live directional lights, only one of which uses shadows, and a skybox that serve as my lighting solution. I haven’t altered any of the clustered light settings, so there is no subdivision of the grid that the clusters use unless there is a default setting.

Any ideas for changes would be really appreciated.

Thank you!

Hi @eproasim,

Clustered lighting shaders are quite a lot larger than the old lighting system and this likely results in slower load times. It is possible we are including clustered lighting shaders when it shouldn’t, we’ll continue investigating.

Can you disable clustered lighting in your projects for now?

Thanks!

Can’t say off hand unfortunately @LeXXik. Can you share a cut-down version so I can take a look?

Thanks for letting me know! Clustered lighting has been disabled for now.

Hi slimbuck, I appreciate your help with this. I tried to deactivate the Clustered lighting, but the problem continues, there is something with the shaders. I’m going to prepare a simplified version of my project and I’d really appreciate it if you could give me a hand to fix the bugs. Thank you

1 Like

Here is a small repro. Thank you in advance!

https://playcanvas.com/project/961683/overview/shader-issue

I want to report some differences that I find from one version to another and that I think have nothing to do with custom shaders.

If we hide the skybox in the camera

Skybox off

or if you hide it in the layers

in version 1.54, everything works normal

but in 1.55, it loses all reflections

Another thing I don’t understand is simply switching between one version and another, without any kind of custom hader, because there is so much difference in the render result. Again I have verified that it is due to the amount of reflection configured in the material

1.54

1.55

here the link to the project

1.55 Diferences | Editor (playcanvas.com)

Hi LeXXik,

Reflections now respect specular lighting - just set specular to white!

Thanks

2 Likes

Yes, that did the trick, thank you, @slimbuck!

2 Likes

Hi @MLB,

Just to give you a quick update - we’re investigating the difference here. Will keep you updated.

Thanks!

Hello @MLB,

This problem can be addressed by setting the Index of Refraction to be 0.667, which will be treated as a specular fresnel factor of 0.04. The specular change added that IOR participates in the calculation of specularity, that’s why you’re seeing this change :slight_smile:

Thanks,
Gustav

3 Likes

I’ve seen some updates in the examples, some of them are performing extremely bad in my laptop.

For reference, playcanvas 1.55.0, resolution 1080p, CPU i7-9750H and GPU RTX 2080:

The swimming pool example also performed very bad weeks ago, but I took it as a working in progress. Now that the plan is to more 1.55 from candidate to current in a couple of weeks, I wonder if I’m doing something wrong.

Thinking most likely your laptop is using the integrated GPU instead of the discreet Nvidia GPU.

Still those times are super slow, @mvaligursky may be able to comment on that.

Can you try adding the following line before app.start() in the examples browser and check times again please?

app.scene.clusteredLightingEnabled = false;

@ Gustav_Sterbrant

Thanks for your feedback, this worked very well.

I still have the skybox thing, when I hide it or remove it from the camera, it no longer works on reflections. It was very useful in the previous version, to be able to hide the skybox, and that the reflections still work. What will happen to this?

1 Like

Thanks! Created ticket to investigate here: https://github.com/playcanvas/engine/issues/4487

Sorry to bother you again for benchmarking, can you run these examples and compare 1.54.1 and 1.55.X please as your laptop has issues:

Area Lights: 1.54 | 1.55

No problem

1.54:

  • DrawCalls: 30
  • Frame: 22.1 ms
  • GPU: 18.9 ms
  • CPU: 1.4 ms

1.55:

  • DrawCalls: 29
  • Frame: 40.1 ms
  • GPU: 36.5 ms
  • CPU: 3.5 ms
1 Like