- Home /
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 am having the same issue and I am new to shades. How do you change them? I imported the URP and now on webgl my while game is invisible but everywhere else it works fine
Answer by unity_03shiju123 · Apr 28 at 05:01 AM
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
Your answer
Follow this Question
Related Questions
orthographic camera with deferred lighting 2 Answers
Lighting issues (weird lines/circles on 3D objects) 1 Answer
Edge Detection with Deferred Rendering? 1 Answer
exclude_path:deferred causes see through? 0 Answers
Deferred Lighting Rendering 1 Answer