ENGLISH

Unity 2018 Shaders and Effects Cookbook: Transform your game into a visually stunning masterpiece with over 70 recipes, 3rd Edition

Book information

Year
2018
Language
english
Format
PDF
Filesize
37 MB (39156259 bytes)
Pages
534\534
Time added
2018-08-30 03:27:21

Description

Since their introduction to Unity, shaders have been seen as notoriously difficult to understand and implement in games. Complex mathematics has always stood in the way of creating your own shaders and attaining the level of realism you crave. Unity 2018 Shaders and Effects Cookbook changes that by giving you a recipe-based guide to creating shaders using Unity. It will show you everything you need to know about vectors, how lighting is constructed with them, and how textures are used to create complex effects without the heavy math. This book starts by teaching you how to use shaders without writing code with the post-processing stack. Then, you'll learn how to write shaders from scratch, build up essential lighting, and finish by creating stunning screen effects just like those in high-quality 3D and mobile games. You'll discover techniques, such as normal mapping, image-based lighting, and animating your models inside a shader. We'll explore how to use physically based rendering to treat light the way it behaves in the real world. At the end, we'll even look at Unity 2018's new Shader Graph system. With this book, what seems like a dark art today will be second nature by tomorrow. Title Page......Page 2 Copyrights and Credits......Page 3 Unity 2018 Shaders and Effects Cookbook Third Edition......Page 4 PacktPub.com......Page 6 Why subscribe?......Page 7 PacktPub.com......Page 8 Contributors......Page 9 About the authors......Page 10 About the reviewers......Page 11 Packt is searching for authors like you......Page 12 Preface......Page 30 Who this book is for......Page 31 What this book covers......Page 32 To get the most out of this book......Page 34 Download the example code files......Page 35 Download the color images......Page 36 Conventions used......Page 37 Sections......Page 39 Getting ready......Page 40 How to do it…......Page 41 How it works…......Page 42 There's more…......Page 43 See also......Page 44 Get in touch......Page 45 Reviews......Page 46 Post Processing Stack......Page 47 Introduction......Page 48 Installing the Post Processing Stack......Page 49 Getting ready......Page 50 How to do it.........Page 51 Getting a filmic look using grain, vignetting, and depth of field......Page 57 Getting ready......Page 58 How to do it.........Page 59 How it works.........Page 65 Mimicking real life with bloom and anti-aliasing......Page 66 Getting ready......Page 67 How to do it.........Page 68 How it works.........Page 71 Setting mood with color grading......Page 72 Getting ready......Page 73 How to do it.........Page 74 Creating a horror game look with fog......Page 76 Getting ready......Page 77 How to do it.........Page 78 How it works.........Page 82 Creating Your First Shader......Page 83 Introduction......Page 84 Creating a basic Standard Shader......Page 85 Getting ready......Page 86 How to do it.........Page 89 How it works.........Page 92 There's more.........Page 93 Adding properties to a shader......Page 95 Getting ready......Page 96 How to do it.........Page 97 How it works.........Page 99 See also......Page 101 Using properties in a Surface Shader......Page 102 How to do it.........Page 103 How it works.........Page 107 There's more.........Page 108 See also......Page 110 Surface Shaders and Texture Mapping......Page 111 Introduction......Page 112 Diffuse shading......Page 113 Getting ready......Page 114 How to do it.........Page 115 How it works.........Page 118 Accessing and modifying packed arrays......Page 120 How to do it.........Page 121 There's more.........Page 123 See also......Page 124 Adding a texture to a shader......Page 125 Getting ready......Page 126 How to do it.........Page 127 How it works.........Page 132 There's more.........Page 133 See also......Page 134 Scrolling textures by modifying UV values......Page 135 Getting ready......Page 136 How to do it.........Page 137 How it works.........Page 141 Creating a shader with normal mapping......Page 143 Getting ready......Page 145 How to do it.........Page 147 How it works.........Page 150 There's more.........Page 151 Creating a transparent material......Page 153 Getting ready......Page 154 How to do it.........Page 157 How it works.........Page 160 Creating a Holographic Shader......Page 162 Getting ready......Page 163 How to do it.........Page 164 How it works.........Page 167 There's more.........Page 168 See also......Page 169 Packing and blending textures......Page 170 Getting ready......Page 172 How to do it.........Page 174 How it works.........Page 179 Creating a circle around your terrain......Page 181 Getting ready......Page 182 How to do it.........Page 184 Moving the circle......Page 187 How it works.........Page 189 Understanding Lighting Models......Page 190 Introduction......Page 191 Creating a custom diffuse lighting model......Page 192 Getting ready......Page 194 How to do it.........Page 195 How it works.........Page 198 Creating a toon shader......Page 201 Getting ready......Page 202 How to do it.........Page 204 How it works.........Page 206 There's more.........Page 207 Creating a Phong Specular type......Page 209 Getting ready......Page 210 How to do it.........Page 211 How it works.........Page 215 Creating a BlinnPhong Specular type......Page 218 Getting ready......Page 219 How to do it.........Page 220 How it works.........Page 223 See also......Page 225 Creating an Anisotropic Specular type......Page 226 Getting ready......Page 227 How to do it.........Page 229 How it works.........Page 235 Physically-Based Rendering......Page 237 Introduction......Page 238 Understanding the metallic setup......Page 240 Getting ready......Page 242 How to do it.........Page 243 How it works.........Page 245 See also......Page 246 Adding transparency to PBR......Page 247 Getting ready......Page 248 How to do it.........Page 249 Semi-transparent materials......Page 250 Fading objects......Page 253 Solid geometries with holes......Page 255 See also......Page 257 Creating mirrors and reflective surfaces......Page 258 Getting ready......Page 259 How to do it.........Page 260 How it works.........Page 263 See also......Page 265 Baking lights in your scene......Page 266 Getting ready......Page 267 How to do it.........Page 268 Configuring the static geometry......Page 269 Configuring the light probes......Page 271 Baking the lights......Page 274 How it works.........Page 276 See also......Page 278 Vertex Functions......Page 279 Introduction......Page 280 Accessing a vertex color in a Surface Shader......Page 281 Getting ready......Page 282 How to do it…......Page 284 How it works…......Page 286 There's more…......Page 288 Animating vertices in a Surface Shader......Page 289 Getting ready......Page 290 How to do it…......Page 291 How it works…......Page 294 Extruding your models......Page 295 Getting ready......Page 296 How to do it…......Page 297 How it works…......Page 299 There's more…......Page 300 Adding extrusion maps......Page 301 Implementing a snow shader......Page 303 Getting ready......Page 304 How to do it…......Page 305 How it works…......Page 308 Coloring the surface......Page 309 Altering the geometry......Page 310 See also......Page 311 Implementing a volumetric explosion......Page 312 Getting ready......Page 313 How to do it…......Page 315 How it works…......Page 318 There's more…......Page 320 See also......Page 321 Fragment Shaders and Grab Passes......Page 323 Introduction......Page 324 Understanding Vertex and Fragment Shaders......Page 325 Getting ready......Page 326 How to do it…......Page 327 How it works…......Page 329 There's more…......Page 331 Input semantics......Page 332 Output semantics......Page 333 See also......Page 335 Using the grab pass to draw behind objects......Page 336 Getting ready......Page 337 How to do it…......Page 338 How it works…......Page 340 There's more…......Page 341 Implementing a Glass Shader......Page 342 Getting ready......Page 343 How to do it…......Page 345 How it works…......Page 347 There's more…......Page 348 Implementing a Water Shader for 2D games......Page 349 Getting ready......Page 350 How to do it…......Page 352 How it works…......Page 355 Mobile Shader Adjustment......Page 357 Introduction......Page 358 Techniques to make shaders more efficient......Page 359 Getting ready......Page 360 How to do it.........Page 363 How it works.........Page 366 Profiling your shaders......Page 369 Getting ready......Page 370 How to do it.........Page 372 How it works.........Page 377 There's more.........Page 378 Modifying our shaders for mobile......Page 379 Getting ready......Page 380 How to do it.........Page 381 How it works.........Page 385 Screen Effects with Unity Render Textures......Page 386 Introduction......Page 387 Setting up the screen effects script system......Page 388 Getting ready......Page 389 How to do it.........Page 391 How it works.........Page 397 There's more.........Page 398 Using brightness, saturation, and contrast with screen effects......Page 403 Getting ready......Page 404 How to do it.........Page 405 How it works.........Page 410 Using basic Photoshop-like Blend modes with screen effects......Page 411 Getting ready......Page 412 How to do it.........Page 414 How it works.........Page 418 There's more.........Page 419 Using the Overlay Blend mode with screen effects......Page 423 How to do it.........Page 424 How it works.........Page 427 Gameplay and Screen Effects......Page 428 Introduction......Page 429 Creating an old movie screen effect......Page 430 Getting ready......Page 431 How to do it.........Page 434 How it works.........Page 441 See also......Page 444 Creating a night vision screen effect......Page 445 Getting ready......Page 446 How to do it.........Page 449 How it works.........Page 456 There's more.........Page 457 Advanced Shading Techniques......Page 459 Introduction......Page 460 Using Unity's built-in CgInclude files......Page 461 Getting ready......Page 462 How to do it.........Page 464 How it works.........Page 467 There's more.........Page 468 Making your shader world in a modular way with CgInclude......Page 469 Getting ready......Page 470 How to do it.........Page 473 How it works.........Page 478 Implementing a Fur Shader......Page 479 Getting ready......Page 480 How to do it.........Page 481 How it works.........Page 485 There's more.........Page 487 Implementing Heatmaps with arrays......Page 489 Getting ready......Page 490 How to do it.........Page 492 How it works.........Page 498 Shader Graph......Page 499 Introduction......Page 500 Creating a Shader Graph project......Page 501 How to do it.........Page 502 How it works.........Page 505 Implementing a simple a Shader Graph......Page 506 Getting ready......Page 507 How to do it.........Page 508 How it works.........Page 514 Exposing properties to the Inspector via Shader Graph......Page 515 Getting ready......Page 516 How to do it.........Page 518 How it works.........Page 522 Implementing a glowing highlight system......Page 523 Getting ready......Page 524 How to do it.........Page 525 How it works.........Page 531 Other Books You May Enjoy......Page 532 Leave a review - let other readers know what you think......Page 534

Similar books