dimension5/BeautifulDissolves

Shader error with Deferred Rendering + Fog in Unity 2018.3

Closed this issue · 1 comments

We recently upgraded to Unity 2018 and when we have fog enabled in a scene with deferred rendering, but using PostProcessing v2's Deferred Fog mode, we get an error in the Standard Dissolve Shader:

Shader error in 'Beautiful Dissolves/Standard Dissolve': invalid subscript 'fogCoord' at Assets/Plugins/BeautifulDissolves/Shaders/Standard/DissolveStandardCore.cginc(42) (on d3d11)

This happens here: UNITY_APPLY_FOG(i.fogCoord, c.rgb);

Repro steps:
Unity 2018.3.11f1
Install PostProcessing v2 package
Create a scene, set rendering to deferred on Camera
Add PostProcessingLayer to Camera, enable deferred Fog
Enable Fog in Lighting panel of Scene
Add a Beautiful Dissolve material'ed object to the scene with the Standard Dissolve setup (not specular)

There is an incorrect import in the Standard-Dissolve.shader file, open up the Standard-Dissolve.shader file (located under BeautifulDissolves/Shaders folder) and change line #245 from #include "DissolveStandardCoreForward.cginc" to #include "DissolveStandardCore.cginc".

Thanks for bringing this to my attention, I will update the package ASAP.