چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

توسعه شیدر مبتنی بر فیزیک برای یونیتی ۲۰۱۷: توسعه سیستم‌های نورپردازی سفارشی

Physically Based Shader Development for Unity 2017 : Develop Custom Lighting Systems

Claudia Doppioslash (auth.)

قیمت نهایی

۴۴٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۰٪ تخفیف
  • تخفیف زمان‌دار−۵٬۰۰۰ تومان

۵٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

سال انتشار
۲۰۱۸
فرمت
PDF
زبان
انگلیسی
حجم فایل
۸٫۳ مگابایت
شابک
9781484233085، 9781484233092، 9781484233108، 9781484246313، 1484233085، 1484233093، 1484233107، 1484246314

دربارهٔ کتاب

Benefit from the latest rendering tech developments, currently covered only in papers and talks from Siggraph, in a way any developer or technical artist using Unity can take advantage of. This book starts by introducing how shader programming works in general, the common principles of different platforms (OpenGL, Vulkan, and DirectX), and the shading languages Unity uses: Cg, GLSL, and ShaderLab.__Physically Based Shader Development for Unity 2017__ discusses artistic choices, presenting various techniques (such as translucency and subsurface scattering) and BRDFs (Oren-Nayar, Cook-Torrance, and Ashikhmin-Shirley), and what they can be used for. Finally you’ll cover the importance of optimizing your code by developing approximations, which achieve similar end results, but are computationally cheaper.By the end of your journey you’ll be able to develop the look of your game or Unity-rendered animated short so that it looks both unique and impressively realistic, thanks to your own custom lighting system.**What You Will Learn** * Master shader programming * Gain all you need to know about physically based shading * Take almost full control of the shader subsystem * Discover what you can achieve with that control * Implement a custom physically based lighting system and examine the logic behind every choice **Who This Book Is For** Most game developers (both indie and AA) that use Unity and technical artists who are responsible for the final look of a game. Contents 5 About the Author 14 Acknowledgments 15 Introduction 16 Part I: Introduction to Shaders In Unity 21 Chapter 1: How Shader Development Works 22 What Is a Shader? 22 Shaders as Light Simulations 22 Rendering as Perspective Drawing 24 Rendering Process 25 Shaders as Code Running on GPUs 25 Shader Execution 26 Different Types of Shaders 27 Coordinate Systems 28 Types of Light 28 Point Light 28 Directional Light 29 Area Light 29 The Rendering Equation 29 The Behavior of Light 29 Bounced Light 32 Renderer Types 34 Forward 34 Deferred 34 Forward+ (Tiled Forward Shading) 34 Future Renderers 34 Shader Visual Graphs 34 Summary 35 Next 35 Chapter 2: Your First Unity Shader 36 Introduction to Unity 36 Set Up 36 Unity UI 37 Make Your First Scene 38 Shader Editing 43 Path and Name of the Shader 45 Properties 45 Sub-Shaders 45 Tags 45 Passes 45 CGPROGRAM (and ENDCG) 46 Pragma Statements 46 Includes 46 Output and Input Structures 46 Variable Declaration 47 Vertex Function and Fragment Function 47 Shader Editing 47 From White to Red 48 Adding Properties 49 Summary 51 Next 51 Chapter 3: The Graphics Pipeline 52 Why Learn the Basics of Graphics APIs 52 A General Structure of the Graphics Pipeline 52 The Rasterizer 54 The Structure of an Unlit Shader 55 Vertex Data Structure 56 Vertex Function 57 Fragment Data Structure 57 Fragment Function 57 Adding Vertex Colors Support 58 Appdata Additions 58 v2f Additions 58 Assign the Color in the Vertex Function 58 Use the Color in the Fragment Function 59 Final Result 59 Summary 61 Next 61 Chapter 4: Transforming Coordinate Spaces 62 Coordinate Spaces Who’s Who 62 Object Space 62 World Space 63 Transformation Between Spaces 64 Camera Space 65 Clip Space 66 Normalized Device Coordinates 67 Screen Space 67 Underneath Built-In Functions 68 Where to Find the Shader “Standard Library” Code 69 Summary 69 Next 69 Chapter 5: Your First Unity Lighting Shader 70 Lighting Shaders 70 What Is an Approximation 71 Diffuse Approximation 71 Specular Approximation 72 Diffuse and Specular Combined 72 Calculating Basic Lighting 73 Diffuse 73 Your First Lighting Unity Shader 75 Implementing a Diffuse Term 75 Adding a Texture Property 79 Adding an Ambient Value 81 Summary 83 Next 83 Chapter 6: Specular Implementation 84 Calculating Basic Lighting (Part II) 84 Specular 84 Your First Lighting Unity Shader (Part II) 85 Implementing a Specular 85 Supporting More Than One Light 89 Summary 94 Next 94 Chapter 7: Surface Shaders 95 What Is a Surface Shader? 95 The Default Surface Shader 95 Pragmas 97 New Data Structures 97 The Surface Function 98 What’s a Lighting Model? 98 Data Flow of a Surface Shader 99 Editing a Surface Shader 100 Add a Second Albedo Map 100 Add a Normal Map 103 Making Sure Shadows Work 105 Use Different Built-In Lighting Models 105 Writing a Custom Lighting Model 107 Lighting Model Function Signatures 107 The SurfaceOutput Data Structure 108 The Surface Function 108 Properties Block 108 The Custom Lighting Function 109 Summary 113 Next 113 Part II: Physically Based Shading 114 Chapter 8: What Is Physically Based Shading? 115 Light Is an Electromagnetic Wave 115 Microfacet Theory Overview 115 Refraction and Other Beasts 116 Fresnel Reflectance 120 How to Measure Light 121 Solid Angle 121 Power 122 Irradiance 122 Radiance 123 How to Represent a Material 123 Bidirectional Reflectance Distribution Function (BRDF) 123 Positivity 125 Reciprocity 125 Energy Conservation 125 Microfacet Theory 125 Fresnel 126 Normal Distribution Function 126 Geometry Function 126 The Rendering Equation (Part II) 127 Hacks Real-Time Rendering Needs 127 HDR and Tone Mapping 128 Linear Color Space 128 Why Is Physically Based Shading Useful? 129 Summary 129 Next 129 Chapter 9: Making a Shader Physically Based 130 Analyzing Phong 130 Checking for Positivity 131 Checking for Reciprocity 131 Checking for Energy Conservation 131 The Modified Phong 131 Summary 135 Next 135 Chapter 10: Post-Processing Effects 136 How Post-Processing Effects Work 136 Why Post-Processing Effects Are Useful 136 Setting Up a Post Effect 137 HDR and Linear Setup 137 Script Setup 138 Conversion to Linear 145 RenderTextures Brief Overview 146 A Simple Tone Mapper 147 Post-Processing Stack v1 149 Post-Processing Stack v2 149 Summary 150 Next 150 Chapter 11: BRDFs Who’s Who 151 BRDF Explorer 151 BRDF Parameterizations 152 Reading BRDF Explorer’s Output 154 Phong 155 MERL Database 160 Comparing BRDFs 160 An Incomplete List of BRDFs Used in Real-Time Rendering 161 Ashikhmin Shirley 162 Cook Torrance 164 Oren Nayar 165 Ward 166 Disney 166 Summary 168 Next 168 Chapter 12: Implementing a BRDF 169 Which BRDF to Implement? 169 Finding References 169 CookTorrance 170 Disney 170 Starting from the Paper 171 CookTorrance (or Microfacet) BRDF 171 Disney BRDF 173 Implementation 174 Properties 174 Custom Light Function Implementation 176 Utility Functions 177 CookTorrance Implementation 177 Modified GGX Distribution Term 178 Schlick Fresnel Term 178 Modified Schlick Geometry Term 178 Putting the CookTorrance Together 179 Disney Diffuse 181 Another Implementation of the Disney Diffuse 185 Putting It All Together 188 Summary 189 Next 189 Chapter 13: Hooking Into the Standard Shader 190 Reverse-Engineering the Standard Shader 190 Shader Keywords 192 Standard Shader Structure 192 Chasing Down Shader Keywords 196 Implementing the Standard Shader Substitute 197 Implementing the BRDF 198 Making the BRDF Shader 200 Making a GUI for the BRDF Shader 205 Summary 206 Next 206 Chapter 14: Implementing Advanced Techniques 207 Where to Find Techniques 207 Implementing Translucency 207 Properties 208 Implementation 208 Real-Time Reflections 210 What Is a Cubemap 210 What Are Reflection Probes 211 Evaluating a Cubemap 212 Cubemap Processing Programs 213 Summary 215 Next 215 Part III: Shader Development Advice 216 Chapter 15: Making Shaders Artists Will Use 217 The UX of the Disney BRDF 217 Typical Problem #1: Too Many Settings 217 Typical Problem #2: The Effect of a Setting Is Unclear 218 Typical Problem #3: Settings Dependencies 219 Typical Problem #4: Unclear Compacting of Textures 219 Typical Problem #5: Strange Ranges 220 Positive Example: Disney BRDF in Blender 221 Summary 222 Next 222 Chapter 16: Complexity and Ubershaders 223 What Is an Ubershader? 223 The Standard Shader 223 What Causes Complexity in Shaders? 225 Ubershader Gotchas 226 Ubershader Advantages 226 Summary 226 Next 226 Chapter 17: When Shading Goes Wrong 227 Common Tricks 227 Debugging Tools 229 Looking at the Generated Shader Code 231 Performance Profiling 232 Summary 234 Next 234 Chapter 18: Keeping Up with the Industry 235 Conferences 235 Books 236 Online Communities 236 Web Sites 236 Social Media 237 Conclusion 238 Index 239 Benefit from the latest rendering tech developments, currently covered only in papers and talks from Siggraph, in a way any developer or technical artist using Unity can take advantage of. This book starts by introducing how shader programming works in general, the common principles of different platforms (OpenGL, Vulkan, and DirectX), and the shading languages Unity uses: Cg, GLSL, and ShaderLab. Physically Based Shader Development for Unity 2017 discusses artistic choices, presenting various techniques (such as translucency and subsurface scattering) and BRDFs (Oren-Nayar, Cook-Torrance, and Ashikhmin-Shirley), and what they can be used for. Finally you’ll cover the importance of optimizing your code by developing approximations, which achieve similar end results, but are computationally cheaper. By the end of your journey you’ll be able to develop the look of your game or Unity-rendered animated short so that it looks both unique and impressively realistic, thanks to your own custom lighting system. What You Will Learn Master shader programming Gain all you need to know about physically based shading Take almost full control of the shader subsystem Discover what you can achieve with that control Implement a custom physically based lighting system and examine the logic behind every choice Who This Book Is For Most game developers (both indie and AA) that use Unity and technical artists who are responsible for the final look of a game. Front Matter ....Pages i-xxiii Front Matter ....Pages 1-1 How Shader Development Works (Claudia Doppioslash)....Pages 3-16 Your First Unity Shader (Claudia Doppioslash)....Pages 17-32 The Graphics Pipeline (Claudia Doppioslash)....Pages 33-42 Transforming Coordinate Spaces (Claudia Doppioslash)....Pages 43-50 Your First Unity Lighting Shader (Claudia Doppioslash)....Pages 51-64 Specular Implementation (Claudia Doppioslash)....Pages 65-75 Surface Shaders (Claudia Doppioslash)....Pages 77-95 Front Matter ....Pages 97-97 What Is Physically Based Shading? (Claudia Doppioslash)....Pages 99-113 Making a Shader Physically Based (Claudia Doppioslash)....Pages 115-120 Post-Processing Effects (Claudia Doppioslash)....Pages 121-135 BRDFs Who’s Who (Claudia Doppioslash)....Pages 137-154 Implementing a BRDF (Claudia Doppioslash)....Pages 155-175 Hooking Into the Standard Shader (Claudia Doppioslash)....Pages 177-193 Implementing Advanced Techniques (Claudia Doppioslash)....Pages 195-203 Front Matter ....Pages 205-205 Making Shaders Artists Will Use (Claudia Doppioslash)....Pages 207-212 Complexity and Ubershaders (Claudia Doppioslash)....Pages 213-216 When Shading Goes Wrong (Claudia Doppioslash)....Pages 217-224 Keeping Up with the Industry (Claudia Doppioslash)....Pages 225-228 Back Matter ....Pages 229-232 Benefit from the latest rendering tech developments, currently covered only in papers and talks from Siggraph, in a way any developer or technical artist using Unity can take advantage of. This book starts by introducing how shader programming works in general, the common principles of different platforms (OpenGL, Vulkan, and DirectX), and the shading languages Unity uses: Cg, GLSL, and ShaderLab. Physically Based Shader Development毲 Unity 2017 discusses artistic choices, presenting various techniques (such as translucency and subsurface scattering) and BRDFs (Oren-Nayar, Cook-Torrance, and Ashikhmin-Shirley), and what they can be used for. Finally youll cover the importance of optimizing your code by developing approximations, which achieve similar end results, but are computationally cheaper. By the end of your journey youll be able to develop the look of your game or Unity-rendered animated short so that it looks both unique and impressively realistic, thanks to your own custom lighting system. You will: Master shader programmingǡin all you need to know about physically based shading Take almost full control of the shader subsystem Discover what you can achieve with that control Implement a custom physically based lighting system and examine the logic behind every choice

قیمت نهایی

۴۴٬۰۰۰ تومان