Search Unity

5.4 to 5.5 Upgrade = Pink Screen?

Discussion in '5.5 Beta' started by MrEsquire, Aug 30, 2016.

  1. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Has anyone got similar issues?

    After upgrading project from 5.4 to 5.5 to take advantages of the long list of bug fixes, all seems fine apart from the whole game, there many bits just all pink. Example, background animation on the main menu, yet can see some of the GUI menu is fine.

    I get no warning messages about specific errors, but I do feel now it could be related to shaders as this is always causing problems on upgrades especially older ones.

    Anyone else have experience please comment below, thanks..
     
    Last edited: Aug 31, 2016
  2. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    Same troubles here with ALL shaders with
    Code (csharp):
    1.  
    2. #pragma only_renderers d3d9
    3.  
    :confused:
     
    Last edited: Aug 30, 2016
    Rodolfo-Rubens likes this.
  3. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,093
    do you have any image effects where the shader is not compiling?
     
  4. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,177
    I do. I have same project and compiled for Windows Store, Android, & WebGL I get this error message:

    Code (CSharp):
    1. Shader error in 'Hidden/ScreenSpaceReflection': invalid subscript 'ndotl' at line 297 (on gles3)
    2.  
    3. Compiling Vertex program
    4. Platform defines: UNITY_NO_LINEAR_COLORSPACE UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP
     
  5. Ro9AM

    Ro9AM

    Joined:
    Mar 10, 2014
    Posts:
    5
    You get that shader to compile and show reflections by commenting out the line
    light.ndotl = 0;
    in that shader.. Fixed it for me, but I'm not sure yet if this doesn't break anything!
     
  6. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,177
    OK, my scene still runs but I haven't looked yet for visual problems in the scene everywhere. I'll try what you say & re-bake the realtime GI lighting is all I use.
     
  7. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Yes my scene works, but not getting any warning messages about specific error.
    Does one need click on the shader itself?
     
  8. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,177
    No, the error message show up when you compile if you are using that shader.
     
  9. Kaneleka

    Kaneleka

    Joined:
    Sep 23, 2013
    Posts:
    15
    Seeing a lot of those same errors related to 'invalid subscript 'ndotl', especially those shaders that were created using ShaderForge. Was ndotl removed from the UnityLight struct in UnityLightingCommong.cginc?

    Side question - how do we get our hands on the built-in shaders for this beta?
     
  10. LukaKotar

    LukaKotar

    Joined:
    Sep 25, 2011
    Posts:
    378
    Look for "Additional Resources" on the download page: https://unity3d.com/unity/beta
     
  11. Ro9AM

    Ro9AM

    Joined:
    Mar 10, 2014
    Posts:
    5
    I can only find built in shaders for 5.4.. Anyone had any luck? The release notes states they renamed some vars in other cginc files, and I guess the same is the case with this..
     
  12. LukaKotar

    LukaKotar

    Joined:
    Sep 25, 2011
    Posts:
    378
  13. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,093
    Yes it was and was mean to be in the upgrade guide (which seems to not have been published).
    Rumour is that the field will be readded in either b2 or b3 to stop this backwards breaking madness. Even though it won't be used.
     
  14. Kaneleka

    Kaneleka

    Joined:
    Sep 23, 2013
    Posts:
    15
    Commenting out ndotl doesn't appear to be the only change that was needed to fix those shaders.
    Looks like there was also a few changes to UnityGIInput and Unity_GlossyEnvironmentData whereby a lot of the variables needed to be reassigned.
    Also, roughness is now perceptualRoughness?
     
  15. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,093
    I think so yeah.

    Is this some custom shader you are using (shader forge or self made)? I know that the only issue with the image effects package is the ndotl issue.
     
  16. Kaneleka

    Kaneleka

    Joined:
    Sep 23, 2013
    Posts:
    15
    Any ShaderForge created shaders including all of its own examples. Unfortunately there are also assets from the Asset Store which use ShaderForge and those also have the same issues. (e.g., AQUAS) Who knows how many others...
    However, the changes are minor to make on these shaders and I haven't noticed any ill effects from them "yet".
     
  17. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    189
    Also UNITY_GI macro has been removed.
    So I had to replace

    Code (CSharp):
    1.   UNITY_GI(gi, s, data);
    with

    Code (CSharp):
    1. #if defined(UNITY_PASS_DEFERRED) && UNITY_ENABLE_REFLECTION_BUFFERS
    2.     gi = UnityGlobalIllumination(data, s.Occlusion, s.Normal);
    3. #else
    4.     Unity_GlossyEnvironmentData g = UnityGlossyEnvironmentSetup(s.Smoothness, data.worldViewDir, s.Normal, s.Specular);
    5.     gi = UnityGlobalIllumination(data, s.Occlusion, s.Normal, g);
    6. #endif
     
  18. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    262
    Yeah, the removal of ndotl broke nearly all of my shaders, too. Patiently waiting for the fix.
     
  19. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,093
  20. Waz

    Waz

    Joined:
    May 1, 2010
    Posts:
    254
    Was this ndotl workaround added in beta2? It's not explicitly mentioned in the release notes as far as I can tell, and I'd rather avoid another large download, since there isn't anything else critical for me.
     
  21. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,093
    No it's not in beta 2.
     
  22. Lloyd_RedironLabs

    Lloyd_RedironLabs

    Joined:
    May 17, 2013
    Posts:
    319
    I also had the issues, had to remove a bunch of shaders and switch to the Standard ones temporarily.
     
  23. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,100
    is the workaround in beta 3?
     
  24. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,093
    I reviewed the changes yesterday. I'm guessing beta 4.
     
  25. JonDadley

    JonDadley

    Joined:
    Sep 2, 2013
    Posts:
    139
    Anyone know if this made it into B4? I can't spot anything about it in the release notes but I might just be being blind.
     
  26. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,093
    I just saw the merge to 5.5 branch today. So I was wrong. But def b5.
     
    Last edited: Sep 20, 2016
    JonDadley likes this.
  27. JonDadley

    JonDadley

    Joined:
    Sep 2, 2013
    Posts:
    139
    Thanks for the update!
     
  28. JonDadley

    JonDadley

    Joined:
    Sep 2, 2013
    Posts:
    139
    Did this make it into b5? I couldn't spot it in the release notes but again, I may have just missed it :)
     
  29. ramy_d

    ramy_d

    Joined:
    Oct 12, 2014
    Posts:
    19
    Very curious about the status of this now that 5b is out.
     
  30. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,100
    Well, all my shaders created with shader forge are still pink in b5, also time of day sky.
     
  31. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Seems beta 5 didnt have any UI changes, small list - we need some fixed mentioned in these threads and the 5.4x changes
     
  32. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,581
    It will be in b6.
     
  33. JonDadley

    JonDadley

    Joined:
    Sep 2, 2013
    Posts:
    139
    Can't see anything in the b6 release notes about it. Did the change go in?
     
  34. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,581
    I'm sorry, that one was actually a typo. It's going to be in b7. Last week it was still in QA.
     
  35. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,100
    bump... still nothing on the release notes...
     
  36. ramy_d

    ramy_d

    Joined:
    Oct 12, 2014
    Posts:
    19
    must still be in QA in that case
     
  37. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,100
    It's b9 already, does someone know if that was fixed?
     
  38. Lloyd_RedironLabs

    Lloyd_RedironLabs

    Joined:
    May 17, 2013
    Posts:
    319
    Lots of pink still in b9. If I right click on some of them, and do a reimport, it seems to fix some of them though.

    The quickest way to do this, is to go to your Project search entry, and just type in:
    t:Shader

    Select all of them, right click and press Reimport.
     
    Last edited: Oct 27, 2016
    Scatabrain likes this.
  39. ramy_d

    ramy_d

    Joined:
    Oct 12, 2014
    Posts:
    19
    good tip, i'll def. try it out.
     
  40. Scatabrain

    Scatabrain

    Joined:
    Aug 28, 2015
    Posts:
    17
    Works great!
     
    Lloyd_RedironLabs likes this.
  41. topaz7

    topaz7

    Joined:
    Dec 15, 2012
    Posts:
    76
    Is this fixed yet?
     
  42. Kaneleka

    Kaneleka

    Joined:
    Sep 23, 2013
    Posts:
    15
    Just upgraded from b1 to b9 and it does seem like those changes referenced earlier in this thread were reverted. I just had to go through all those same shaders and undo my changes back to their original state.
     
    Rodolfo-Rubens likes this.
  43. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,100
    The first time I opened it showed some pink objects but after switching scenes everything fixed, also, shader forge shaders seems to be working.