- Home /
Shader renders differently in editor and in exported app
Ok, this drives me crazy now.
I made (adopted) this shader - a simple wave propagation effect.
It looks fine when I run in the editor:
But if I build a standalone app, the screen is full of artifacts:
What can be the cause? Why it is different in editor and in the built app on the same computer? Is there any extra checks in the shaders when running in the editor or something?
Probably won't help but I will suggest 2 things: 1- Double check the quality settings. $$anonymous$$aybe your build use a different quality setting than you use in the editor.
2- Also sometimes unity discards shaders from the build if it can't find it in the scene. You should explicitly add that shader to Shader Variants. Or put a dummy object using that shader in the scene.
Yeah, I already tried those. I didn't touch the quality settings so those should be ok, but for good measure I also set it from script to the highest one. And this don't seem to be a stripping issue, because the shader is there, and working, it just produces different results, than in the editor. But again, for good measure, I also added to the "Always included shaders" section in the preferences.
It seems that the artifacts happen at the parts of the image where there could be a negative value in the shader - at least it seems if I clamp the value, the artifacts disappear. But that not a real solution, because it changes the look of the effect, and also: it looks correctin the editor without clamping. That's why I though there could be some extra checks/measures in the shaders in the editor, and hope that I can enable or copy them to the runtime exported shader/app.
Your answer
Follow this Question
Related Questions
Sprite texture incorrect 0 Answers
Problem using multiple materials 0 Answers
Simple 2D Shader renders black 0 Answers
Strange Artifact in sprite with additive material. Any ideas? 0 Answers