Deferred rendering causing objects to become invisible, but only on WebGL build!

Game runs fine in editor and in PC/Mac builds, everything is visible. But when I build and run for WebGL the majority of my objects don’t render. Oddly, some objects do - some grass and the transparent elements on the windows.

If I walk around the environment I still collide with the unrendered objects and if I twist the camera at very specific angles I can see brief flashes of the invisible objects.

I’ve tried:

  • changing the shaders of the unrendered objects
  • turning on and off static batching
  • changing the camera clipping
  • turning on and off the occlusion of the objects in inspector

If I convert the rendering of the solid materials to ‘Transparent’ they show up, but no other rendering mode. The only thing I can find that works is changing the camera rendering from Deferred to Forward, then everything show’s up. However, with rendering with any setting other than Deferred my draw call (batches) doubles… I’m trying to optimise this build to be able to run on very low-end systems so I was trying to keep this down!

UPDATE: Ok so if I change the shader to for example a Mobile diffuse it renders, but does anyone know why this is? (and only on WebGL?) And is there another alterative shader to the standard that would be recommended?

UPDATE2: Using a custom shader and changing the render queue to ‘transparent’ allows it to be visible, no idea why! Or if using this would pose any running issues.

I’m also facing the same issue.deferred rendering path makes everything invisible but changing to forward increases the drawcalls.

Did anyone found any fixes for this issue

@TopBananaShana