Let me examine the rendering pipeline to explain the exact order of effects. Based on my examination of the shader code, here's the rendering order explained like Photoshop layers (from bottom to top):

Layer Stack (Bottom → Top)

🎬 BASE LAYERS (Video/Image Content)

  1. Layer 1 - Main Media (bottom-most)
  2. Levels Adjustment (on Layer 1)
  3. Pattern Overlay (on Layer 1)
  4. Color & Tone Adjustments (on Layer 1)

🎞️ DUPLICATE LAYER COMPOSITE

  1. Layer 2 - Duplicate Video Layer (if enabled)

📺 SCREEN EFFECTS (Applied to composite)

  1. Static White Noise
  2. VSync Lines
  3. Mosaic Grid (top-most visual element)

🔧 SPATIAL DISTORTIONS (Applied to sampling coordinates)

These affect WHERE pixels are sampled from, not what's drawn on top: