Skip to content

Latest commit

 

History

History
69 lines (35 loc) · 1.44 KB

Unity-Shaders.md

File metadata and controls

69 lines (35 loc) · 1.44 KB

<

Unity + Shaders


Introduction

  • A shader is a set of graphics and image manipulation instructions run on the GPU
  • A CPU runs serial operations while a GPU runs parallel operations (at the same time=faster)

Shader Types

  1. Vertex - Draws the vertices of the geometry
  2. Geometry - Use to manipulate the geometry
  3. Pixel (or fragment) - Fills the area in the geometry (fragment contributes to the final color of the pixel)
  4. Compute - General purpose (outside of the shader pipeline)
  5. Tesselation / Hull - Used to subdivide a mesh (fixed function shaders embedded in the hardware)

Basic Operation

If you draw an object, say a triangle, on the screen...

  1. First you draw the vertices
  2. Mesh then primitives

Vertex Shaders


Pixel Shaders


References

Tutorial Series

Topics