Theme Catppuccin
Make yourself at homeCatppuccin

A softer light for long learning sessions.

Appearance

Loading your preference…

Dark palette

Choose a dark palette to try it.

Light uses Latte. Your choices stay in this browser.

Attributes that stay attached

SKETCHBOOK / 10 The surface workshop · 2-week chapter

Page 1 of 3: Weights can carry more than coverage

A triangle has values at its corners

Weights can carry more than coverage

Barycentric weights can blend vertex colors: a sample color is λ0 × c0 + λ1 × c1 + λ2 × c2. The current raster reference performs screen-linear RGB interpolation, then its simple gamma-2 output transform. This makes color association visible without introducing a texture or projection library.

Do arithmetic on linear-light values and apply the display transfer policy at the output boundary. Averaging encoded display values produces a different result from averaging linear light. The reference’s square-root encoding is an approximation, not an exact sRGB workflow.

Normals need their own policy. Interpolating unit normals generally produces a vector that is not unit length, so normalize at the shading point if the lighting equation requires a unit direction. Under a non-uniform model scale, normals also need the appropriate inverse-transpose transform rather than blindly reusing the position transform.

TRY IT IN YOUR STUDIO

Choose weights 0.2, 0.3, and 0.5 for red, green, and blue vertices. Calculate the linear sample color, then compare it with the reference’s encoded bytes.

From the page to your own work

Your studio assignment.

Use a checker pattern to expose an interpolation mistake, not to collect another asset library.

A finish line you can see

Your own textured-triangle extension or executable interpolation test with an affine/perspective comparison and defined sampler boundaries.

  1. Interpolate a vertex color with weights whose sum is one.
  2. Calculate a perspective-correct UV example independently.
  3. Define what the sampler does at u or v equal to 1.
  4. Explain where normals are normalized and where color encoding happens.
Keep the evidence in your weekly notebook ↗
Explain it like an engineer

Try answering aloud before opening the review notes. Use your own implementation as evidence.

Why does a perspective-projected texture need more than linear screen-space UV interpolation?
  • Perspective division changes the parameterization across the projected triangle.
  • Interpolate attributes divided by clip w and interpolate reciprocal w, then divide.
  • Keep sampler addressing, filtering, and color-space decisions separate.

These prompts support practice; they are not an automatic assessment of your work.

A small creative variation ↗

Use a tiny generated checker with your own two colors. No image loader is required.

Optional. Save it for later if this chapter already feels full.

Coming back after a break? ↩

Set every vertex w to 1 and confirm affine and perspective formulas agree. Reintroduce one unequal w next.

Books & principles behind this study +

Original Parallax explanations and assignments, with these works for further reading.

YOUR MARGIN NOTES

Leave yourself a good question.

What changed your mind? What would you try next?

Notes are private to this browser and saved as you write.

A CHECKPOINT, NOT A SCORE

Can you explain the idea and try the exercise yourself?

Completion records your own assessment. It does not compile or test your C++.
Companion source 3 files