Getting ready

The effect in this recipe creates a heatmap from a set of points. This heatmap can be overlaid on top of another picture, like in the preceding screenshot. The following steps are necessary:

  1. Create a quad with the texture that you want to use for the Heatmap (GameObject | 3D Object | Quad). In this example, a map of London has been used. In order to put the texture on the quad, create a new material (Map) using the Unlit/Texture shader, and assign the image to the Base (RGB) property. Once created, drag and drop that object onto the quad. The position of quad object must be set to (0, 0, 0).
  2. Create another quad and place it on top of the previous one. Our Heatmap will appear on this quad.
  3. Attach a new shader (Heatmap) and material ...

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.