Getting ready

This recipe requires the following operations:

  1. Create a shader (GrabShader) that we will initialize later.
  2. Create a material (GrabMat) to host the shader.
  1. Attach the material to a flat piece of geometry, such as a quad. Place it in front of some other object so that you cannot see through it. The quad will appear transparent as soon as the shader is complete:

Get Unity 2018 Shaders and Effects Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.