Unity 6 -Intermitent Hang in ShadowPass in any ShaderGraph Shaders

So, this started happening with just unity 6 (all version so far).

Whenever changing a script, unity reloads, and for some reason decides to recompile the shaders.
This in turn, hangs randomly on any Shader Graph Shader. I have tried multiple shaders, computers and U6 versions and projects.

image

This does not happen consistently, but when it happens I know its going to be one of those days… It just continues to happen.

This happens with DX12, DX11, and Vulkan on Windows 11 and across multiple devices.

Only way to solve is to close the editor and reopen, and hope it doesn`t show again.

When reopening the editor this shows up:

A default asset was created for ‘Assets/Shaders/ColorCustomPBR 1.shadergraph’ because the asset importer crashed on it last time.
You can select the asset and use the ‘Assets → Reimport’ menu command to try importing it again, or you can replace the asset and it will auto import again.

Reimporting it makes that go away and the shader works correctly - but it does come back.

1 Like

Bump. Anyone else having the same issue, and or a fix?

DX11 or DX12 mode?

This has been happening to me since i added a custom CBUFFER on a shader (through CustomFunction include)

As you stated, It kinda happens randomly, and gets stuck on ShadowCaster. I directly kill the process and re-open the editor.

I thought it had to be something wrong in my shader, but now that i see this, i will try tomorrow to keep debugging enabled so i can inspect where exactly is getting stuck when it happens

I have tried going that route as well, but it seems there is no specific cause - I have multiple different shaders, and tried in different projects, it still happens.
I am using HDRP, which pipeline are you on?

Killing the editor is the only “solution” I have found - I am lucky that my project is not that big yet, so reopening is not that big of a deal, yet.

It happens on all, dx11, dx12, and vulkan - and across multiple machines and projects.

I was on Unity6 17f1 with URP and DX11.

I was working on a single shader on this project. However it has yet no happened again, it happened constantly yesterday, but since then, i kept modifying my Shader so it might have been something specific about mine. I would report if it happens again and i’m able to provide some more info

Its completely random for me, I have days without happening and days where it happens all the time, I have noticed you need to have “prefab” or game object open with that shader that it triggers more often, so something about the saving of that prefab makes it happen.

Any chance to get some official input here?

Happens to me too. Unity 6 preview, HDRP, DX12. Very frustrating and no way to reproduce it to file a bug report.

Update to 6000.22, still happens.

For me it started happening in the 22, not befor

delete Library\ShaderCache\shadergraph, and delete the problem shadergraph and put it again, you can solve it without kill the process. Please i wish solve this bug.