0
0
Unityframework~20 mins

Shader Graph basics in Unity - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Shader Graph Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
What is the output color of this simple Shader Graph?

Consider a Shader Graph that outputs a color using a Color node set to (1, 0, 0, 1) connected directly to the Base Color input of the Master Node. What color will the shader render on the object?

AThe object will appear transparent.
BThe object will appear solid green.
CThe object will appear solid blue.
DThe object will appear solid red.
Attempts:
2 left
💡 Hint

Remember the RGBA color format where (1, 0, 0, 1) means full red, no green or blue, and fully opaque.

🧠 Conceptual
intermediate
2:00remaining
What does the 'Time' node provide in Shader Graph?

In Shader Graph, what kind of value does the Time node output and how is it commonly used?

AIt outputs the current time in seconds and is often used to create animations or effects that change over time.
BIt outputs the system clock time and is used to sync shaders with real-world time.
CIt outputs a random value every frame to create flickering effects.
DIt outputs the time since the last frame and is used to control frame rate.
Attempts:
2 left
💡 Hint

Think about how you can make a shader change smoothly as time passes.

🔧 Debug
advanced
2:00remaining
Why does this Shader Graph output a black color instead of white?

Given a Shader Graph where a Vector1 node with value 0 is connected to the Metallic input and a Color node set to white (1,1,1,1) is connected to the Base Color, but the object appears black. What is the most likely cause?

AThe shader graph is missing a connection to the <strong>Emission</strong> input, causing black output.
BThe <strong>Metallic</strong> input set to 0 causes the shader to render black.
CThe object’s material is not assigned to the mesh renderer, so it appears black.
DThe <strong>Alpha</strong> channel of the Color node is set to 0, making the object fully transparent and appear black.
Attempts:
2 left
💡 Hint

Check the alpha channel of the color input and how transparency affects rendering.

📝 Syntax
advanced
2:00remaining
Which node setup correctly blends two colors based on a mask in Shader Graph?

You want to blend Color A and Color B using a Mask node that outputs values between 0 and 1. Which node connection correctly produces the blended color?

AUse a <strong>Multiply</strong> node with Color A and Mask, then add Color B.
BUse a <strong>Lerp</strong> node with Color A as input A, Color B as input B, and Mask as the T input.
CUse an <strong>Add</strong> node to add Color A and Color B, then multiply by Mask.
DUse a <strong>Subtract</strong> node with Color B minus Color A, then multiply by Mask.
Attempts:
2 left
💡 Hint

Think about how linear interpolation (Lerp) works to blend between two values based on a factor.

🚀 Application
expert
3:00remaining
How to create a pulsing glow effect using Shader Graph?

You want to create a pulsing glow effect on an object’s emission color that smoothly changes brightness over time. Which node setup achieves this effect?

AUse a <strong>Sine</strong> node connected to the <strong>Time</strong> node’s output, then multiply the result by the base emission color before connecting to the Emission input.
BUse a <strong>Step</strong> node with Time input to create a pulsing on/off effect, then connect to Emission input.
CUse a <strong>Random</strong> node connected to Emission input to create a flickering glow.
DUse a <strong>Divide</strong> node dividing Time by a constant, then connect directly to Emission input.
Attempts:
2 left
💡 Hint

Think about how sine waves create smooth oscillations over time.