Hard NatureAnimated
Aurora borealis
Green-purple curtains of light waving across a starless night sky.
How this challenge works
You write a fragment shader that draws the picture above, live in your browser. A match bar shows how close you are, and the score combines accuracy, code size (the par is 1034 characters in Unity (Built-in)) and GPU speed. Work in HLSL, GLSL, WGSL, Metal or Godot and export the result when you are done.
The numbers you need
- p
float2(uv.x * aspect, uv.y)- Wobble
n = fbm(float2(p.x * 1.5 + time * 0.1, time * 0.05))- Curtain line
y = uv.y - 0.55 - 0.12 * sin(p.x * 3.0 + time * 0.5) - 0.15 * n- Band
exp(-abs(y) * 5.0)- Streaks
0.6 + 0.8 * fbm(float2(p.x * 6.0, uv.y * 2.0 - time * 0.2))- Light
lerp(float3(0.1,0.9,0.5), float3(0.6,0.3,0.9), uv.y) * band * streaks- Sky
lerp(float3(0.01,0.02,0.05), float3(0.02,0.05,0.12), uv.y), then add the light
Helper functions provided
The toolbox has: hash(), vnoise(), fbm(). Add them above your frag function with one click.
Solve it in your language
Unity (Built-in), Unity (URP), Unreal, Shadertoy / WebGL, OpenGL (LWJGL, raylib), three.js, GameMaker, LÖVE (Lua), Godot, Apple (iOS, macOS), WebGPU / Bevy.
Start coding