Search Issue Tracker

Won't Fix



Found in






Issue ID




Multiple Shader Compiler errors are thrown when compiling a Shader

Shader System


How to reproduce:
1. Open the user-submitted project
2. In the project window, search for and select the shader "VoronoiFragment"
3. In the Inspector window, select "Compile and show code"
4. Inspect the Console window (Window > General > Console)

Expected result: No errors are seen in the Console
Actual result: Multiple errors are seen in the Console

Reproducible with: 2019.4.33f1, 2020.3.24f1, 2021.2.4f1, 2022.1.0a16

Shader Compiler IPC Exception: Terminating shader compiler process
Shader compiler: Compile Unlit/VornoiFragment - <Unnamed Pass>, Fragment Program: Internal error communicating with the shader compiler process. Please report a bug including this shader and the editor log.

  1. Resolution Note:

    This is dying inside the DirectX shader compiler.
    The reason it's crashing is because you're assigning textures in branches which is illegal in FXC (around line 572).
    This can also be seen by commenting out the line: finalCol = contentTex.Sample(my_point_clamp_sampler, samplerValue);
    which is what reads the texture that is assigned in the conditional.
    As this is code we don't own we can't fix this. There's also no way to pre-emptively check this.

Comments (1)

  1. domportera

    Nov 25, 2021 08:53

    Hi, I am the one who reported this bug.

    We were able to circumvent it because we found the specific cause of it - trying to sample a Texture2D variable. We had created a function for returning one of several textures, then sampled the result of that function after storing it in a variable. This caused the compiler to fail. I forget the specific line, though.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.