Web GL Error on Safari

Hey all,
I get this error on Safari when using light mapping on imported models:

WebGL: ERROR: 0:438: 'dAmbientLight' : undeclared identifier

To reproduce I used the model viewer template, imported my model, deleted the PlayCanvas cube, placed my template in the scene, and then turned on light mapping on the imported model. This model does have UV1’s. Here is the project:
https://playcanvas.com/project/880175/overview/ambientlighterror

I have been working on a project for quite a while with this error looming. It doesn’t seem to affect the scene in any way, I just always get the error in the console. I get the same error from using a default cube and checking on light mapping instead of using an imported model. I cannot reproduce this error on Chrome. Thoughts?

Hmm that’s quite strange. @mvaligursky any idea?

I’m not sure what the problem is, but we’ll investigate. Thanks for the report!

1 Like

Thanks. And just incase it wasn’t clear enough, the simplest way I have found to reproduce the bug on Safari is this:

  1. Create new Model Viewer Template
  2. Delete PlayCanvas Cube
  3. Place a new box primitive in the scene
  4. Turn on light mapping for the newly placed box
  5. Launch the scene
1 Like

@mvaligursky Any update on this / any way I can help?

There is no update yet - is this in some way critical issue?

I wouldn’t say it is a critical issue but we are targeting as many mobile phones as we can so we would just like to be able to weed it out as an issue whenever we come across graphical issues

1 Like

Added as engine issue so we can track it and prioritise it: https://github.com/playcanvas/engine/issues/4030

Thanks so much. Not really sure when its appropriate for me to add engine issues myself, otherwise I would have done that. I would hate to submit an issue that is just user error on my end.

1 Like

if u cant reproduce the bug/issue on chrome then its safari it dosent support the same things as chrome does
or webgl safari issue

it’s our problem, we have a repro and can fix it. In general - in one case we create a shader with a missing line … so this prints the error. But in this case when there’s the error we do not use the shader, so there is no impact. I’ll change to code to stop generating this shader in this one case.

1 Like

Awesome thanks :+1: