Build rendering different on browsers

Hi, I have created a webgl project which works as expected in unity, but once it’s built and on unity play, it renders different for different browsers. I followed the warning to remove webgl 1 but on safari it shows as black and white pixels to the point it’s unrecognisable and on chrome, the lighting follows the user which is also incorrect and pixellates some of the meshes like a glitch.

Here’s the published build to see the issues: Magic Crystal Collection Game




Can’t load, stuck at 90%.

Generally speaking, WebGL is a severely limited target platform. Even if it runs on your desktop with many cores and fast GPU, it just does not support many of the modern features. It’s easy to break WebGL builds by using postprocessing effects such as bloom or using complex shaders and generally shadows. Also the choice of render pipeline is critical, URP is highly recommended over built-in.

You will have to strip down your build to a bare minimum set of rendering features and then turn them back on one by one to see if WebGL can manage.

1 Like

It seems to be the third person starter asset scene that is where it is happening. I started a new URP project for webGL, added the asset and used the playground scene provided, converted it to URP (maybe I missed something there) and it was this exact issue, but not sure what needs fixing there

This is the one I know as “Third Person Starter Asset”, it’s a template when starting a new project from the Hub. But that doesn’t seem to be the asset you used.
8856466--1208113--upload_2023-3-6_20-30-32.png

This is the one I used, here is a screenshot of how just the plain playground scene builds instead of my full project

What Unity version? For WebGL projects I would recommend the latest tech stream, 2022.2 that is.
Since you mention Safari I assume this is running on a Mac. What model?
Since these glitches happen across browsers I would normally suggest checking video driver updates on a Windows system.

Unity 2021.3.16f1 on M1 MacBook Pro at the moment. I’ll install and try 2022.2, does it matter that its not LTS?

It’s still rendering glitchy in 2022.2 like this:

Update: when I remove one of the objects’ cinemachine components it looks a bit better but still not right, although I need these to move the camera and character

Another update, once I added either the MainCamera or PlayerFollowCamera to a new scene, even after deleted them then this glitching starts happening

Do other WebGL games on that Unity publishing site work or do they also render with glitches? There are also general WebGL compatibility tests and benchmarks you could try.

The M1 series CPU may have some video issues with WebGL is my suspicion, or it may be faulty to begin with but I wouldn‘t go that far if other 3d apps work fine.

1 Like

Seemed to have found the issue! The Player settings quality for webgl was set as some automatic option by unity that was using one of their render pipeline assets. I created a new unedited pipeline asset and made sure webgl used that one instead of unity’s ones. Thanks for the help! :slight_smile:

Other games on unity play look fine so I am hoping it was just this causing it but I would like to learn about those general webGL compatibility tests and benchmarks