← COURSE LIBRARY
Shaders · 45 min
Coordinate Spaces and the MVP Chain
IntermediateNeeds: MatricesNeeds: Vectors
Sign in to record mastery, quiz results and reviews for this course.Sign in
You will be able to
- Name every space a vertex passes through and what each one is good for.
- Choose the correct space for a given effect (world-space noise vs screen-space distortion).
- Diagnose transform bugs by reasoning about matrix order.
The concept
A vertex travels object → world → view → clip → NDC → screen. Each matrix in the chain answers a different question: where is this on the model, where is the model in the level, where is the camera, and how does perspective squash it. Choosing the wrong space is the most common cause of effects that swim with the camera or slide across a moving object.
In your engine
UnityObjectToClipPos(v.vertex) collapses the whole chain; use TransformObjectToWorld / TransformWorldToView in URP when you need an intermediate space.
Practice (4)
Concept check
Your dissolve noise swims across the mesh as the object moves. Which space is the noise sampled in?
Predict the result
In HLSL with column-vector convention, which multiplication order transforms an object-space position to clip space?
Find the bug
A screen-space scanline effect ripples when the camera rotates but should stay locked to the screen. Which input is wrong?
Tune the value
A clip-space position has w = 4 and x = 2. What is the NDC x after the perspective divide?
Knowledge check
01Perspective divide happens between which two spaces?
02Tangent space is defined per:
03Which space should drive a triplanar projection?
04An effect that sticks to the mesh regardless of transform should sample:
Build challenge
Author one material with a switch that samples the same noise in object, world and screen space. Move the object and the camera, and record which artefact each space produces. Document the correct use case for each in one sentence apiece.
SELF-CHECK RUBRIC