© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
D. IlettBuilding Quality Shaders for Unity®https://doi.org/10.1007/978-1-4842-8652-4_5

5. Textures and UV Coordinates

Daniel Ilett1  
(1)
Coventry, UK
 

Now we have seen how basic shaders are made in Unity using both shader code and Shader Graph. It’s possible to add complex color patterns to the surface of an object by generating those patterns within the shader itself, but this is not always possible, so sometimes we will need to create such patterns externally and import them into the shader. We do this using textures.

The most common type of texture is a 2D array of color data that a shader can read. You can think of a texture as a regular image – texture ...

Get Building Quality Shaders for Unity®: Using Shader Graphs and HLSL Shaders 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.