Hard Nature
Misty mountains
Three layered ridgelines in front of a warm dusk sky, each darker than the one behind.
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 1030 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
- x
uv.x * aspect- Sky
lerp(float3(1.0,0.75,0.5), float3(0.35,0.5,0.85), uv.y)- Ridge 1
h = 0.55 + 0.25 * fbm(float2(x * 1.5 + 3.0, 0.0)), float3(0.55, 0.5, 0.7)- Ridge 2
h = 0.4 + 0.22 * fbm(float2(x * 2.0 + 11.0, 0.0)), float3(0.35, 0.3, 0.5)- Ridge 3
h = 0.25 + 0.2 * fbm(float2(x * 3.0 + 23.0, 0.0)), float3(0.15, 0.12, 0.25)- Painting
back to front: col = lerp(col, ridgeColor, step(uv.y, h))
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