Unity Courses Shader Stories: Wireframes
Unity

Shader Stories: Wireframes

A three-part dive into rendering wireframes in Unity shaders — a flat quad, a full mesh, and an overlay on top of an existing object.

3 chapters · 17m Intermediate Updated 6 Mar 2022 Phil · @FirnoxGames
Free

Free for everyone. No account needed.

Start watching →

What you'll learn

1 Rendering a quad wireframe ▶ 5 min

Improving our existing wireframe shader, to only render quads.

In this chapter
  1. Introduction
  2. Removing triangles from quads
  3. Where it can go wrong
  4. Implementation details
  5. Code changes
  6. Finished result
2 Wireframe rendering of a mesh ▶ 7 min

Here we provide several methods to create a wireframe outline from a mesh using shaders in Unity.

In this chapter
  1. Introduction
  2. Barycentric coordinates
  3. Simple wireframe shader
  4. Fixed width wireframe
  5. Anti-aliasing the wireframe
3 Wireframe over an object ▶ 4 min

Extending our quad wireframe shader to render on top of a surface shader.

In this chapter
  1. Introduction
  2. The standard surface shader
  3. The wireframe pass
  4. Adding to the windmill
  5. Finished result
Included with this course
Video walkthrough · 17m
</>Annotated source code ↗ · public domain