0
0
Unityframework~5 mins

Custom shader fundamentals in Unity - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a shader in Unity?
A shader in Unity is a small program that tells the computer how to draw something on the screen, controlling the color, lighting, and texture of objects.
Click to reveal answer
beginner
What are the two main types of shaders in Unity?
The two main types are Vertex Shaders, which handle the position of vertices, and Fragment (or Pixel) Shaders, which handle the color of each pixel.
Click to reveal answer
beginner
What is the purpose of the 'Properties' block in a Unity shader?
The 'Properties' block defines variables like colors or textures that you can change in the Unity Editor without editing the shader code.
Click to reveal answer
intermediate
Explain the role of the 'SubShader' in a Unity shader.
A 'SubShader' contains the actual shader code that runs on the GPU. Unity can have multiple SubShaders to support different hardware or rendering paths.
Click to reveal answer
intermediate
What is the difference between a Surface Shader and a Vertex/Fragment Shader in Unity?
Surface Shaders are easier to write and handle lighting automatically, while Vertex/Fragment Shaders give you full control but require more code to manage lighting and effects.
Click to reveal answer
Which part of a Unity shader controls the color of each pixel?
ASubShader
BVertex Shader
CFragment Shader
DProperties Block
What does the 'Properties' block in a Unity shader allow you to do?
AControl vertex positions
BWrite GPU code
CDefine lighting models
DChange shader variables in the Unity Editor
Why might you use multiple SubShaders in a Unity shader?
ATo support different hardware or rendering paths
BTo add more colors
CTo increase texture size
DTo speed up the CPU
Which shader type in Unity automatically handles lighting for you?
ASurface Shader
BVertex/Fragment Shader
CCompute Shader
DGeometry Shader
What is the main role of a Vertex Shader?
ATo set pixel colors
BTo calculate the position of vertices
CTo define textures
DTo manage lighting
Describe the basic structure of a custom shader in Unity and the role of each part.
Think about how you set variables, write GPU code, and control drawing.
You got /5 concepts.
    Explain the difference between Surface Shaders and Vertex/Fragment Shaders and when you might choose each.
    Consider how much control you want versus how much work you want to do.
    You got /4 concepts.