Rotating UV

12 / 15

📝 Exercise Goal

Rotate UV around the center over time.

💡 💡 Tutorial Content

Rotate UV around the center over time.

Overview

  • Follow the steps to complete the exercise.

Learning Objectives

  • Animate with u_time

Prerequisites

  • uv-coordinates

Inputs

  • float u_time — Time in seconds.

Key Concepts

  • vUv is normalized UV in [0,1].
vec2 uv = vUv;
  • Animate with u_time + sin/cos.
float pulse = sin(u_time) * 0.5 + 0.5;

How To Implement (Step-by-step)

  • Start from vUv.
  • Animate with u_time (optional).

Self-check

  • Does it compile without errors?
  • Does the output match the goal?
  • Are key values kept in [0,1]?

Common Mistakes

  • If output is black, check your mask/factor isn’t always 0.

GLSL Code Editor

Correct Code Preview

Current Code Preview