- Home /
How can I get soft edges on planes/quads?
I'm making a 2.5D game using a bunch of quads and other flat meshes as background tiles. These create really sharp edges, and I really want to smooth them out a bit. Here is a side-by-side comparison for reference:
The left side is the hard edge that's there by default. The right side is the soft edge effect I'm going for.
I have this effect working now (the right side) using a shader that applies an alpha based on the vertex color. However, this requires making a custom mesh for even simple quads, applying the vertex colors and UV map, and raises the poly count.
I'd really like to get this effect without putting all this extra work on the artists, and it seems like a lot of unnecessary steps for an idea that should be pretty straightforward.
Any ideas?
Thanks!
Answer by Sisso · Feb 19, 2014 at 06:59 PM
It is like 'terrain blend texture shader'. Instead blend the texture using vertex color, that is a mesh component, use simple use another texture to blend.
I'm not sure I follow - are you suggesting making a custom texture for each one? That seems just as problematic, art-wise, as it's a lot of extra work for a simple faded edge effect.
I was thinking one blend texture for all meshes, like lightmap, but I don't know how to achieve it.
I don't know, my last sugestions:
1) try to change a outline shader to blend alpha
2) create a algorithm that detect mesh edges and change the mesh updating its alpha