Artistic Experiments
  • Home
  • Reel
  • Shaders
    • Stylized Shaders
    • Lighting Techniques
    • Shader Effects
    • Cubemaps
    • Pixel Lit Shaders (Basic)
    • Vertex Lit Shaders (Basic)
    • Unlit Shaders (Basic)
  • Tools
  • WIP
  • Contact

CG Shaders - Outline

4/12/2014

0 Comments

 
This is a fairly simple extension of my ramp shader. It uses an early pass to inflate the vertices via the vertex normal and color them. This produces an outline that is rendered in world space and fades appropriately in the distance.  Potentially you could model your own outline mesh and get similar results but this is somewhat impractical for building a whole game, so its worth knowing how to do.
Picture
You can also shift the outline according to the light direction, giving you thicker outlines in the shadows.
Picture
I plan to explore a other methods to generate other lines, as this is only really useful for thin contour lines. Frensel lines should be able to enhance these, bridging gaps and thickening them up. 

Maya CGFX File:

outline.cgfx
File Size: 8 kb
File Type: cgfx
Download File

Unity SHADER File:

outline.shader
File Size: 12 kb
File Type: shader
Download File

0 Comments



Leave a Reply.

    CG Shaders

    Shaders I've built as i teach myself CG. Feel free to download and use for whatever. If you like them you can buy me a beer or something.

    Archives

    December 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013

    Categories

    All

    RSS Feed

Powered by Create your own unique website with customizable templates.