Our current project is using a Post Processing Outline Shader. We have imported the Standard Assets and the Pro Standard assets to fix the original upside down errors introduced by 2.6.
However, if Anti-Aliasing is turned on now, our outline flips upside down. How do I stop the outline from flipping upside down when Anti-Aliasing is turned on?
EDIT : Here is the shader in question. To generate the Depth/Normals texture I'm using a very slightly modified version (just turned off culling on Transparent Cutout RenderType) of the "Camera - DepthNormalTexture" provided in the Built In shader package from the Unity site
Aras is right, but for some strange reason the Shader Replacement project didn't get updated on our website - this will be fixed asap.
In the meantime: this is what the Edge Detection example needed in it's vertex shader:
And it is also what your shader needs.
The reason for this inconvenience is that D3D and OpenGL interpret Y coordinate differently. We are handling that in Unity behind the scenes, so that the user doesn't have to worry about it, but with anti-aliasing on D3D it would force us to blit the entire image upside-down, which is expensive. It's a lot cheaper to just flip the Y coordinate as the example shows.
answered Nov 23, 2009 at 04:16 PM
What is the "Post Processing Outline" shader? Making Image Effects + FSAA work can be quite involved. Most of the times it all works, except when it does not.
Take a look at Edge Detection sample in Shader Replacement project for an example where solution is more involved.
answered Nov 21, 2009 at 02:09 PM
I'm finding when I use the suggested fix
That the result isn't the same as when AA is off, what happens is the result is slightly offset in Y. Any thoughts?
answered Nov 24, 2009 at 11:03 AM