Blur Shader mesh not showing up in game view when camera is set to perspective

I’ve been having trouble the past few days getting my shader mesh to display properly in the game view. For whatever reason, it only shows up in the 2D scene view, or if I switch the camera to orthographic projection. However, I have a lot of background assets that I need to show depth on so a perspective camera is essential. One last detail is that tint effect of the shader can be seen regardless of the camera projection type which.

I included some screen grabs of the effect cranked all the way to max settings to help illustrate the situations it is, and isn’t working in. If anyone knows how to get the effect to display properly please let me know. I’ve tried everything from adjusting Z values to playing with the render queue and all of the forums I’ve looked at didn’t seem to have the solution I need.

My knowledge of shaders is still very limited so I grabbed this one off the unity forums.
Link to the post: Simple Optimized Blur Shader





My guess is the blur shader, and by extension the grab pass, is running at the wrong time.

Try uses the Frame Debugger and checking when the geometry with the blur shader is running. It’s probably before the background. Perspective cameras default to using the spherical bounds distance from camera, where as orthographic sprites use pivot depth. You can override how depth is calculated to some extent, but you’re probably better off using material queues to force the “background” elements to get rendered before the blur pass rather than hoping the draw order works out in your favor. Also to make sure the blur pass doesn’t sometimes render after foreground elements.

1 Like

So I’m using the frame debugger (which thank you for telling me about, its really useful) but the thing thats got me confused is that it looks like everything is being drawn in the correct order, the blur just isnt taking effect when it appears in the list. I’ve got some more screen grabs, in the second photo the mesh has gone through its three draws but doesn’t effect the wall drawn before it. I tried messing with the material queue but that didn’t seem to change it, although its entirely possible I didn’t do it correctly.


If try one more thing. Try having the blur shader output a solid color, like red, and see if you can even see it.

I changed it to output white and for whatever reason it shows up just fine.

I have the same problem. May I ask where exactly you changed the output?

Sorry for digging this old topic but I have the exact same problem, anyone has resolved it ? :smile: