Shader with edge antialias?

Now with Unity 3 there has been talk of antialias not working without a special shader to do it.
Is there any example on such a shader?
Shouldn’t all built in shaders have this by default?

A geometry shader can’t do that.

Quote from Dreamora:

So what’s the solution then?
Surely we’re not supposted to have aliasing that make everything look crappy in Unity 3?

To do antialiasing in deferred there are few ways, these are the most common.

  1. Use DirectX 10 / OpenGL 3.0 and do an explicit resolve (also known as custom resolve) on an MSSA buffer that contains the scene (this looks really great and I’m a fan, but this can’t be done in unity currently and isn’t super fast).

  2. Blur any edges in the scene (where aliasing would occur). This is done in two steps. Firstly run a post process to detect the edges in the scene, then use the result of this edge detection as a mask for the blur region (Scale the amount of blur by the amount of edge detected). It would be quite easy to write a shader to do this (I haven’t looked but it is possible that the engine already is internally if you set the quality high enough). I might write a quick shader for this and post it here over the next weekend.

There is an edge blur shader included in the beta (Pro Assets).

Unhappily reality has nothing to do with easy

DX10+ is Win Vista+ only → bad
OpenGL 3+ is not supported on osx at all → no way

The simple solution is, do the antialias through a postfx in the style of 2 or something even stronger than that.
U3 offers such a shader (pro assets of u3 beta as postfx are pro only) but depending on ones need you could come up with something even stronger

In v3.5 any idea what “edge blur shader” got renamed as ?

I’ve imported the Pro Image Effects but I’m not spotting Edge Blur in the shaders, or Luminance as was mentioned in another thread.
http://forum.unity3d.com/threads/81482-I-don-t-have-the-Edge-Blur-effect

The problem I’m trying to solve is a pretty basic anti-alias one (I think :slight_smile: )

  • I have a Chess Board made of GameObject Cubes
  • they have a texture on them
  • and I want the edge to be smoothed between the black/white tiles

I’ve had a little luck with changing the texture filter mode to Point, but it’s still not great.

As it’s a static object I’ve tried Lightmapping the scene but I suspect I’m hitting an issue with lack of UVs due to the board tiles being Unity GameObjects.

Any suggestions appreciated.

Thanks,
Scott