- Home /
Question by
Xentarok · Jan 20 at 06:48 PM ·
shadersscene-loading
LoadAdditive and SetActiveScene break shader
Hi everyone, here's a problem that makes me want to commit eat gun, maybe someone can help:
In my project I have an initialization scene that first loads some services and then loads the main "content" scene like this:
SceneManager.LoadSceneAsync(firstSceneToLoadIndex, LoadSceneMode.Additive).completed += operation =>
{
SceneManager.SetActiveScene(SceneManager.GetSceneByBuildIndex(firstSceneToLoadIndex));
};
However, I stumbled upon a major problem: a water shader that I use partially breaks when I do that. It starts malfunctioning both in scene and game view, but is normal if I start the game from the "content" scene or if I exit play mode in it.
Here's a comparison, left is the malfunctioning one:
And here is the shader graph (I hope it's visible enough), I use URP and I'm on Unity 2020.3.26f1:
If anyone encountered this before or knows a fix I'd greatly appreciate it, cheers!
Comment