PCSS doesn't work in builds
artyom-zuev opened this issue · comments
We've tested this in several versions of Unity (5.5, 5.6.0, 5.6.4, 2017.3) and it looks like PCSS is never applied in builds - only standard Unity shadows are visible. All references are correct at runtime (RT is non null, same light is shadow casting in same mode, etc.), and are no errors raised in the logs, so we're a bit stumped as to how to debug this. What might be the reason for shadows working perfectly in editor but disappearing in the final application?
In case that's relevant: we're using Windows 10, Nvidia GPUs, DX11, linear lighting and deferred rendering with aforementioned versions of Unity.
@artyom-zuev
Try removing the function: ResetShadowMode() from OnDisable() and clean your old build before building a new one.
Mine works perfectly.
@artyom-zuev @Teogai The issue was that it was stripping the necessary shader variants. I've added a shader variant collection asset that tracks the variants used in the editor and includes them in the build. It should be working now :) Sorry about the delay, I've been dealing with a lot of personal stuff, and focusing on spending time with my daughter.