Search Issue Tracker

Fixed in Unity 2018.1

Votes

0

Found in

2017.1.2f1

Issue ID

957024

Regression

No

Changes to .cginc files does not cause shaders in different directories to recompile

Shaders

-

-

Priority: 7Not yet prioritized for a release

-

Severity: 3Secondary functionality broken

Reproduction steps:

1. Open "CGIncludeBug.zip" project
2. Open "Test" scene
3. See that both Quads are yellow
4. Open the "Include.cginc" file with a text editor
5. Change the "return fixed4(1, 1, 0, 1);" to "return fixed4(0, 1, 0, 1);"
6. Go back to the Editor and see that the right Quad changed to Green, but the left one didn't
7. a) Reimport All (Or just the "SubDirectory" -> "SubDirectory" Shader)
b) 1) Open "SubDirectory" -> "SubDirectory.shader.meta" with a text Editor
2) Do any change and save
3) Go back to the Editor
8. See that the left Quad changed the color to Green

Expected Result: After doing changes to the .cginc file, all relevant shaders should reimport
Actual Result: After doing changes to the .cginc file, only the shader in the same directory reimports

Fixed in: 2018.1.0a3

Reproduced with: 2017.3.0b4, 2017.2.0f3, 2017.1.2f1, 5.6.4f1, 5.5.5f1

Note:
If not Reimported, the shader doesn't change even when making a build

Comments (3)

  1. 9e7a33b43b528b40ff667d9618e6e4db?d=mm

    IIporpammep

    Dec 26, 2017 09:32

    Why didn't it fixed in some patch release for unity 2017?

  2. A0dd37e4919b4543927e6bfdcc52d7f1?d=mm

    ArConstructor

    Dec 01, 2017 08:19

    Also, does this fix the problem with dependency tracking for package export? (https://issuetracker.unity3d.com/issues/shadercompiler-shaders-do-not-get-recompiled-on-changes-in-includes)

  3. 9f0a5861673b228edaa1dcf88ff981f8?d=mm

    Nexusmaster

    Oct 21, 2017 13:21

    This is still an issue with compute shaders, do they get fixed too?

All about bugs

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