Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Unity Shader Programming: Beginners to Advanced Techniques
Rating: 3.8 out of 5(8 ratings)
122 students

Unity Shader Programming: Beginners to Advanced Techniques

Master Unity Shader Programming from basics to advanced with our comprehensive course designed for all skill levels!
Last updated 6/2024
English
English [Auto],

What you'll learn

  • Fundamentals of Unity 5 shader programming.
  • Creating and customizing shader properties and variables.
  • Developing various shaders, including textures, water effects, and normal maps.
  • Implementing lighting models and custom lighting in shaders.
  • Writing and optimizing shaders for mobile platforms.
  • Creating and adjusting screen effects for unique visual experiences.
  • Advanced shader techniques, including CG Inc files and heat maps.
  • Using the profiler to enhance shader performance.
  • Applying advanced shader effects like fur and night vision.

Course content

3 sections84 lectures12h 6m total length
  • Introduction to Unity 5 Shader Programming6:45

    Explore Unity shader programming from basics to advanced techniques, building shaders and post-effects in Unity 5, mastering physically based rendering, global illumination, and diverse effects from textures to screen post-processing.

  • Theory - Creating A Basic Shader10:23

    Explore basic shader creation in Unity, migrate legacy shaders, and apply shader properties to achieve diffuse realism for objects; learn how materials, renderers, and cg shader code drive appearance.

  • Lab - Creating A Basic Shader10:12

    Set up a minimal Unity project, add a plane and two spheres, create a custom standard diffuse shader, and apply it to a material to test lighting and color.

  • Migrating from Unity4 to Unity 5 Shaers6:56

    Migrate from Unity 4 to Unity 5 by automatic upgrade or switching to the standard shader, backing up the entire project folder to preserve metadata and legacy shaders.

  • Migrating from Unity4 to Unity 5 Shaers Continues5:33

    Migrate from Unity 4 to Unity 5 by converting legacy shaders to the standard shader, explore rendering modes such as transparent, cutout, and vertex lit, and note light intensity changes.

  • Understanding Shader Properties12:02

    Learn how to define and expose shader properties in Unity using the properties block, creating GUI elements for colors, textures, sliders, and other types that drive material appearance.

  • Create Properties6:35

    Wire properties to a surface shader in Unity shader programming, exposing ambient color and a slider value from the materials inspector to drive albedo and alpha via pow.

  • Create Subshader Variable6:21

    Declare subshader variables that mirror properties from the properties block, link them to ambient color and color values via the materials inspector, and apply the slider value in the subshader.

  • Using Packed Arrays11:25

    Explore texture mapping and surface shaders, mastering diffuse shading, packed arrays, and how to add, scroll, and blend textures using UVs, normal mapping, and transparency.

  • Use Albedo Color7:43

    Explore packed arrays in CG shaders, using color as a four-component factory with RGB and A aliases. Apply swizzling, smearing, and _mrc matrix access to albedo colors.

  • Creating A Scrolling Texture9:43

    Apply textures to a Unity shader using UV mapping and 2D texture sampling; explore bilinear, trilinear, and anisotropic filtering, and implement scrolling textures for waterfalls and lava.

  • Water Effect Shader11:05

    Learn to build a water effect shader by creating a standard surface shader, setting a main texture and diffuse tint, and animating UVs with scroll speeds.

  • Creating A Normal Map Shader8:26

    Learn how normal maps replace per-vertex normals to fake smooth lighting on low-poly models, using Unity surface shaders and a normal map texture for realistic shading.

  • Normal Map Test Shader10:45

    Create and customize a normal map shader in Unity by defining a custom shader, adding a normal map texture, unpacking normal data, and applying them to per-pixel lighting.

  • Bump Intensity10:09

    Explore implementing bump and normal maps in Unity shaders, adjusting bump intensity, normal intensity, glossiness, and metallic properties to illuminate a realistic albedo texture.

  • Creating A Transparent Shader10:20

    Explore creating a transparent shader in Unity, handling alpha blending, z-order, and render queues to render glass-like and other transparent materials with a texture's alpha channel.

  • Creating a Holographic Shader6:33

    Design a holographic shader that renders semi-transparent outlines of objects with noise, scan lines, and vibrations, using a lambertian reflectance model and alpha fade in Unity.

  • Silhouette Shader6:22

    Create a silhouette shader in Unity that uses the dot product of view direction and world normal to form a rim-lit holographic edge, controlled by alpha and rim strength.

  • Blending Textures Using Lerp9:44

    Learn how to pack grayscale textures into the rgba channels of a single texture and blend multiple textures for terrain shading in a memory-efficient shader.

  • Blending Textures Using Lerp Continues10:07

    Blend four terrain textures in a Unity shader using a blend texture and tiling data with the lerp function. Multiply final color by terrain tint colors and assign to albedo.

  • Drawing Circle in Terrain9:58

    Learn to draw a circle around a unit on terrain in Unity using a custom radius shader, centering it and handling arbitrary terrain geometry with animation.

  • Mat Radius10:50

    Learn to render a circle around a character by adjusting radius, center, and color in a Unity shader, using world coordinates, and a simple C# script.

  • Lighting Models5:26

    Explore how lighting models drive pixel shade in Unity shaders, from Lambertian to Phong, and build custom diffuse and specular shaders for mobile-friendly rendering.

  • Writing the First Custom Lighting9:34

    Write a simple lambertian lighting shader in Unity by sampling a texture with uv, applying n dot l lighting, and implementing a custom lighting function.

  • Writing Toon Shader6:38

    Create a toon shader in Unity with a custom lighting model and ramp texture, using clamp and point sampling to achieve sharp cel shading on 3D models.

  • Writing Toon Shader Continues7:40

    Develop a toon shader in Unity using a ramp map to remap n dot l for stepped shading, or snap values for cell shading, with a cell shading level property.

  • Writing Phong Shader9:18

    Learn how to implement a Phong specular shader in Unity, comparing per-vertex and per-pixel techniques, and understand how view direction shapes specular highlights.

  • Phong Secular Shader7:18

    Implement a custom Phong lighting model in a Unity surface shader by defining a Phong lighting function, using hash pragma, and balancing diffuse and specular with a reflection vector.

  • Writing Blinn Phong Shader8:29

    Learn to implement a Blinn-Phong specular shader in Unity using the half-vector for efficient lighting, and to control diffuse and specular properties via a custom shader.

  • Blinn Phong Shader – Half Vector4:39

    Explore Blinn-phong shading by using the half vector of light and view directions to compute a specular highlight, offering a lighter, more efficient alternative to Phong.

  • Writing Anisotropic Specular Shader9:50

    learn to create an anisotropic specular shader in unity to simulate brushed metal by stretching highlights perpendicular to groove direction, enabling stressed reflections and hair-like effects.

  • Writing Anisotropic Specular Shader Continues10:01

    Implement anisotropic specular lighting in a Unity surface shader using a custom lighting function and anisotropic normal maps to create directional brushed-metal highlights.

  • GI And Light Baking9:52

    Explore physically based rendering in Unity 5, from standard lighting models and metallic versus specular workflows to global illumination and light baking, including real-time shading trade-offs.

  • More on GI And Light Baking7:25

    Explore transparency in PBR shaders with three modes—semi-transparent, fade, and cut out—using alpha or albedo maps, and build real-time mirrors with global illumination.

  • Creating Reflection Probe9:41

    Create reflection probes to generate real-time or baked cube maps for reflections, using skyboxes and six-face textures, and bake reflections for static objects.

  • Light Probe Groups5:11

    Explore how light probe groups enclose a volume to interpolate global illumination for moving objects, blending probes with skybox and light maps, and baking lights in Unity.

Requirements

  • Basic understanding of Unity and its interface. Familiarity with basic programming concepts. Access to Unity 5 or later versions. Willingness to experiment and practice with shader programming. Basic knowledge of C# programming is beneficial but not mandatory.

Description

Course Introduction: Welcome to the "Comprehensive Unity Shader Programming: From Beginners to Advanced Techniques" course! This course is designed to equip you with the essential skills and knowledge needed to master shader programming in Unity. Whether you're just starting or looking to enhance your existing skills, this course will take you through a structured learning journey from the fundamentals to advanced shader techniques. You'll learn how to create stunning visual effects, optimize performance, and implement complex shaders using Unity's ShaderLab and CG programming. Get ready to dive into the exciting world of shader development and unleash your creativity in game and application development!

Section 1: Unity Shader Programming - Beginners

In this beginner's section of Unity Shader Programming, students are introduced to the fundamentals of shader programming in Unity 5. The journey starts with an overview of shader programming, highlighting the differences between Unity4 and Unity5 shaders. Students then delve into creating basic shaders through both theoretical and practical labs, gaining hands-on experience in shader development. Essential shader properties and variables are explored, including subshader variables and packed arrays, enabling students to customize shader behaviors. The section covers creating various types of shaders, such as scrolling textures, water effects, normal maps, and transparent shaders, providing a comprehensive understanding of shader functionalities. Advanced techniques like blending textures using Lerp, drawing circles in terrain, and implementing lighting models are also discussed. Students will write custom lighting, toon shaders, Phong shaders, Blinn Phong shaders, and anisotropic specular shaders. The section concludes with an introduction to global illumination (GI) and light baking, reflection probes, and light probe groups, equipping students with the foundational knowledge required for more advanced shader programming.

Section 2: Unity Shader Programming - Intermediate

Building on the basics, the intermediate section delves into more complex aspects of Unity shader programming. Students begin by learning about vertex functions and the animation of vertices, followed by extrusion shaders and creating unique effects like snow shaders and volumetric explosions. The curriculum covers the creation of fragment shaders, including the use of Grab Pass shaders for effects like glass and stained glass normals. Further, students explore writing and optimizing shaders for mobile platforms, utilizing the profiler to enhance performance. The section also introduces screen effects, custom shader image effects, and various visual adjustments such as depth effect, brightness, saturation, contrast, and blend modes. Unique effects like old film and night vision are explored in detail, providing students with the skills to create visually captivating shaders.

Section 3: Unity Shader Programming - Advanced

In the advanced section, students tackle the creation of custom CG Inc files and CG include shaders, enabling more efficient and reusable shader code. Advanced shader techniques such as creating fur and heat maps are covered, along with their practical applications and further exploration. This section equips students with the ability to develop highly complex and performance-optimized shaders for professional use. By the end of this section, students will have a comprehensive understanding of advanced shader programming concepts, preparing them for sophisticated shader development projects in Unity.

Course Conclusion: Congratulations on completing the "Comprehensive Unity Shader Programming: From Beginners to Advanced Techniques" course! Throughout this journey, you've gained a deep understanding of shader programming in Unity, starting from basic shader creation to advanced topics like custom lighting models, screen effects, and shader optimization. Armed with these skills, you're now equipped to create visually compelling games and applications, optimize shader performance, and experiment with cutting-edge shader techniques. Keep exploring, experimenting, and pushing the boundaries of what's possible with shaders in Unity. Happy shader programming!

Who this course is for:

  • Aspiring Game Developers: Individuals aiming to enhance their game development skills with shader programming.
  • Graphic Artists: Artists looking to incorporate advanced visual effects into their Unity projects.
  • Experienced Developers: Developers wanting to deepen their knowledge of shader programming and optimization.
  • Students and Educators: Those in academic settings who want to learn or teach advanced Unity shader techniques.
  • Technical Artists: Professionals who bridge the gap between programming and visual art in game development.
  • Hobbyists and Enthusiasts: Anyone with a passion for game development and visual effects who wants to explore the capabilities of Unity shaders.
  • Freelancers: Freelancers looking to offer advanced shader programming services to clients.
  • Professionals in Related Fields: Professionals in animation, VFX, and related fields who want to incorporate Unity shaders into their work.
  • Indie Game Developers: Independent developers seeking to add polished visual effects to their games.
  • Career Changers: Individuals transitioning into game development or technical art roles who need comprehensive training in shader programming.