Lighting & Shadows | Unity Shader Code Basics 06 @danielilett
Lighting & Shadows | Unity Shader Code Basics 06  @danielilett
Uploaded April 2026 | Updated November 2026, 1 week ago
Lighting is one of the most complex things you'll handle in shaders. The Phong reflectance model splits light into diffuse, specular, and ambient lighting, with Fresnel added as a bonus, and if we want additional realtime point lights, lighting is additive. On top of that, we can use shadow mapping for any number of lights and add a shadow caster pass to allow our own shaders to cast shadows onto objects.

Comparison of render paths: 3dgep.com/forward-plus
------------------------------------------------------------------------
👇 Download the project on GitHub: github.com/daniel-ilett/shaders-hlsl-basics
📰 Read this tutorial in article format instead: danielilett.com/2026-04-17-tut10-06-lighting
------------------------------------------------------------------------
✨ Snapshot Shaders 2 has you covered for all your post processing needs: assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/snapshot-shaders-2-for-urp-331908?aid=1101lfDLn

✨ Grab Retro Shaders Pro, my PSX and N64 shader asset pack, here: assetstore.unity.com/packages/vfx/shaders/retro-shaders-pro-for-urp-287937?aid=1101lfDLn

📚 Get a copy of my shader book here: link.springer.com/book/10.1007/978-1-4842-8652-4
------------------------------------------------------------------------
💬 Join the Discord: discord.gg/tPQEUwPpb3
☕ Or throw me a one-off coffee on Ko-fi: ko-fi.com/danielilett
------------------------------------------------------------------------
Lighting & Shadows | Unity Shader Code Basics 06Creating Zelda: Breath of the Wilds Remote Bomb in Unity Shader Graph & VFX GraphThe PS1s Affine Texture MappingUnity Shader Graph Basics (Part 13 - Terrain Lit Official Support)X-ray Stealth Vision in Unity Shader Graph and Universal Render PipelineYour First Shader | Unity Shader Code Basics 01Basic Hologram Shader | CC0Shaders #gamedev #shadersDecals & Stickers in Unity Shader Graph and URPUnity Shader Graph Basics (Part 8 - Scene Intersections 1)Snow Layer Shader | CC0Shaders #gamedev #shadersSnapshot Shaders Pro (Unity) - Installation Guide (1.4)Shader Code in Universal Render Pipeline | Unity Basics
Daniel Ilett |

Lighting & Shadows | Unity Shader Code Basics 06

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER