Question by
trulden · Aug 31, 2020 at 09:42 AM ·
shaderbuildshadersbuild-errorbuildpipeline
ShaderGraph shaders not working in builds
I've made shader which replaces color of pixels further than maxDistance from anchor position. In editor it runs fine, but in win, android and webgl builds it doesn't work — everything just turns white.
That shader is included in «Always included shaders».
I'm using URP.
Anyone had similar problem?
That's how my shader graph looks like:
And that's editor/build comparsion:
shader.png
(156.6 kB)
be.png
(213.0 kB)
Comment
Answer by trulden · Sep 01, 2020 at 07:45 AM
My mistake was in setting global shader params only in OnValidate()
. Because it's called only in editor, values wasn't set it build. So, making OnStart()
also init those values fixed everything.