receiveShadows on mobile devise not working

I don’t know if this is a bug, but receiveShadows on mobile devise (Huawei Mate 10 Pro, Chrome 81.0.4044.138) not working, ground is not rendering.

https://playground.babylonjs.com/#SU7C7U#5

ground.receiveShadows = true; //Line 66
Not working

ground.receiveShadows = false; //Line 66
Working

Do you have any idea why this is the case. Do I need to change the phone :joy:

First question would be is your phone supporting WebGL2 ? cause Contact Shadows can only work in WebGL2.

Also what error can you see in the console ?

On a side note, I would not recommend contact shadows on phone if you do not want them to melt :slight_smile:

Your PG works only a single time, so you should remove the “var” in line 16 to make sure it is not the problem.

To know if it is a WebGL2 problem as @sebavan said, you should comment the line 58: this way, it won’t use any filtering method and so will work in WebGL1.

2 Likes

@sebavan, @Evgeni_Popov

Yes, my phone is supporting WebGL2.
The are no errors in the console, its just not rendering mesh if receiveShadows=true.
And finally, commenting line 58, does nothing.
What can you guys suggest for me to get shadows working, so I do not melt my phone :slight_smile:

w00000t not relying on contact hardening shadows should definitely make it work. Also usually not rendering would mean the shader does not compile ending up as a console error. This is definitely strange and might be related to your phone drivers ?

Is there any other examples of shadows working on your phone ?

@sebavan ,

I cleared cash and line 58 does the trick. But the shadows don’t look great. How I can improve this?

So it definitely looks like a driver issue :frowning:

About improving you could try out other types of generator like esm blurred esm and so on ?

1 Like

@sebavan, @Evgeni_Popov. Thank you guys :+1:.

I will need to check everything through other mobile devices.