Outline Shader Effect for Orthogonal Geometry in XNA

Posted by Griffin on Game Development See other posts from Game Development or by Griffin
Published on 2012-09-24T05:47:49Z Indexed on 2012/09/24 9:51 UTC
Read the original article Hit count: 279

Filed under:
|
|
|
|

I just recently started learning the art of shading, but I can't give an outline width to 2D, concave geometry when restrained to a single vertex/pixel shader technique (thanks to XNA).

the shape I need to give an outline to has smooth, per-vertex coloring, as well as opacity. The outline, which has smooth, per-vertex coloring, variable width, and opacity cannot interfere with the original shape's colors.

A pixel depth border detection algorithm won't work because pixel depth isn't a 3.0 semantic.
expanding geometry / redrawing won't work because it interferes with the original shape's colors.

I'm wondering if I can do something with the stencil/depth buffer outside of the shader functions since I have access to that through the graphics device. But I don't believe I'm able to manipulate actual values.

How might I do this?

© Game Development or respective owner

Related posts about XNA

Related posts about c#