12. Texturing and Sampling
Texture is something we forget—it makes outfits look very expensive. You can do a monochromatic outfit, if you’re afraid of things that are more colorful and printed, and still create interest.—Stacy London
Shaders are incredibly powerful programs capable of displaying a lot of interesting and realistic effects. However, the more effects you add, the more processing power and time your program takes. Every millisecond is precious, so it’s important to optimize your project as much as possible. One easy way to get the most bang for your buck is to map textures to your objects rather than procedurally generating your textures in shaders. This chapter introduces you to texture mapping and sampling in Metal.
Texture Mapping ...
Get Metal Programming Guide: Tutorial and Reference via Swift 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.