- Home /
Simple shader works in Editor-view but not in game-view.
I mde a simple shader to render stars, it's just an additive unlit shader which I apply on a sphere that follows the camera, but I added Zwrite Off and set the Queue to "Background+1", so it would render after the skybox but before everything else (in theory).
It works perfectly in the editor, but it's not beeing rendered in game-view. I tried lots of different thing but to no avail, (ZTest Always fixes nothing btw)
Only when I change the camera's Clear Flags to Solid Color instead of Skybox it works.
So it seems like the skybox for some reason occludes this stars-shader, but I don't understand why.
Am I missing something obvious here?
I'm using Forward rendering btw.
Is your skybox definitely drawing in the background queue? What happens if you change your shader to use, say, Geometry+1 ins$$anonymous$$d?
Yeah it is, I also tried other sbybox shader but it's always the same.
But I just remembered I had a similar problem a while ago: http://answers.unity3d.com/questions/1021267/changing-queue-in-shader-has-no-effect.html I wonder now if it's the same issue. I don't have my stars-shader here now (I am at work now), but I'll check later,when I get home, to see if it is that same problem.
Yeah, the queue system's a bit broken at the moment. Just check the material queue in debug mode.
Your answer
Follow this Question
Related Questions
Changing Texture From a Point? 0 Answers
How to made a normal skybox with a rectangle part of solid color 0 Answers
How do I get objects to render against the skybox? 2 Answers
Rendering full-screen gradient background without overdraw? 1 Answer
Strumpy shader - Overlay(Add) two textures for Unlit 1 Answer