Unlit vs Lit Shaders in Unity
📖 Scenario: You are creating a simple Unity scene where you want to understand the difference between unlit and lit shaders. Unlit shaders do not react to light and show colors as they are, while lit shaders respond to lighting and shadows in the scene.This project will help you create two materials: one using an unlit shader and one using a lit shader, and apply them to two cubes to see the difference.
🎯 Goal: Build a Unity scene with two cubes: one with an unlit shader material and one with a lit shader material. You will create the materials in code and apply them to the cubes to observe how lighting affects each.
📋 What You'll Learn
Create two cubes in the scene using code.
Create a material with an unlit shader and assign a color.
Create a material with a lit shader and assign a color.
Apply the materials to the respective cubes.
Print the names of the shaders used to the console.
💡 Why This Matters
🌍 Real World
Understanding unlit vs lit shaders helps game developers control how objects appear under different lighting conditions, which is essential for creating realistic or stylized visuals.
💼 Career
Shader knowledge is important for roles like game developer, technical artist, and graphics programmer, where controlling object appearance and performance is key.
Progress0 / 4 steps