Which RenderPipelines work with WebGL?

Recently moved a project from the Built In render pipeline to the Universal Render Pipeline and all of a sudden - my scenes are empty. The whole world just disappears. Can still interact with the camera and I can tell that my scene is running because of cinemamachine camera effects, but nothing is rendering.

Tried changing the project back from the Universal Render Pipeline to the BuiltIn render pipeline and same result - empty scene.

Even went to create a simple scene with a single cube in it with a material and nothing is appearing.

Even the SampleScene for the URP doesn’t work so I’m going to assume that it is a no on URP support. I’ll open a defect because it should state that in the build window if it obviously doesn’t support that render path.

Afaik the URP should be supported. The only RP not supporting WebGL is the HDRP because “it relies on a lot of wizardly things not available in WebGL” (source ).

Have you tried creating a fresh URP project via the Hub without adding anything additional to it? Does it still not want to work?

Also, what version of Unity are you on?
.

That is correct. Created a new project entirely. Used Unity’s own Sample Scene and had it build a WebGL version with Unity 2021.2.5f1 and received an empty scene for my troubles. Previously I was using the BuiltIn Render Pipeline for my project and has zero issues with getting something that rendered to the browser. I’ve tried in Firefox and Chrome on Windows and neither work. Opened a new project with the BuiltIn Render Pipeline and worked with no issues in all browsers.

1 Like

As opposed to the scene actually looking like this:

7711675--966637--upload_2021-12-5_14-18-21.png

Meanwhile I’m doing this with the BuiltIn Rendering Pipeline:

1 Like

URP works good for webGL.
But the latest version 2021.2.x has some bugs. URP shaders are not included in the build e.g
→ URP "Lit" sample is missing all shaders in WebGL build

just use a 2021.1 version of unity.

Whitch Quality were you used? Change it to low or high. I have encountered it before, and it can work after changing

I tried forcing it to the lowest quality and the highest and neither worked. The message that @sumpfkraut sent is definitely the issue. Those are the errors I’m seeing and the same results.

Not sure how you can forget to ship an entire set of shaders for a NUMBER of releases, but that appears to be the problem. Seems a simple unit test of the SampleScene would visually show that something was wrong.

If I revert to 2021.1.25f1 everything works just fine. Problem is that there is no easy way in Unity to revert a project from 2021.2.x to 2021.1.x

For those that are also in the 2021.2 release branch. 2021.2.1 and 2021.2.2 appear to be the last releases where it actually works.

Less painful to go back to those releases than to have to rebuild everything for 2021.1.

Just had this great surprise too: a project perfectly working in WebGL until yesterday, the update to 2021.2.5 and the whole world disappeared. Half a day wasted trying to understand what happened, and going back to my 2021.1.25 project backup.

That’s horrid, an entire platform that stops working for weeks through several Unity versions, did macroscopic issues like that not emerge from testing, before releasing it?

Yep. I was on 2021.2.1 and stopped to build the CI/CD pipeline. Then upgraded the project and spent days trying to figure out where in the pipeline things were broken only to find that it was an issue in Unity.

Yeah, 2021.2 URP has some issues on webgl. Unity knows about it and the fix is coming.
(maybe already fixed in one of the recent patches of 2021.2.x)

Sadly it isn’t :confused: I mean I’m not one of those guys that thinks Unity should be perfect. I’ve been using the product since it was Mac-only… but this one is pretty egregious.

URP is supported, but the recent release of URP has a bug that broke WebGL. The new version with the fix should be out shortly, it’s in the release queue.

4 Likes

Is there an easy answer to the question of whether or not URP or Built-In is better performatively for WebGL builds?

Easy answer: Both should be performant for WebGL.

I am downloading the 2021.3.23f1 version. is there any URP bug for WebGL or should i keep using 2021.3.15f1 version that i use

I’m maintaining a list of various unity versions with builtin and URP in WebGL 1 and WebGL2 versions, so you can easily comapre them and see on your target devices what works, have a look here: https://deml.io/experiments/unity-webgl/
The underlying project is this one: https://github.com/JohannesDeml/UnityWebGL-LoadingTest
I think that should help you make a decision on which version to use :slight_smile:
If you have only a very small application I would recommend builtin render pipeline, since URP adds 3MB to your build, other than that, URP with WebGL2 works quite well on all platforms with recent versions.

3 Likes