Hard WaterAnimated
Liquid droplets (3D)
Water-like blobs that stretch and merge, with a bright specular glint and a sky reflection.
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 1314 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
- Map
three spheres merged with smin(k = 0.7): centers float3(sin(time) * 0.9, 0.3 * cos(time * 1.7), 0), float3(-0.8 * sin(time * 0.7), -0.4 * cos(time * 1.2), 0), float3(0.0, 0.7 * sin(time * 0.9), 0.0); radii 0.5, 0.55, 0.4- Camera / loop
as in the Raymarching lesson- Color
base float3(0.1, 0.4, 0.6); sky reflection: lerp(float3(0.1,0.2,0.4), float3(0.7,0.9,1.0), 0.5 + 0.5 * reflect(rd, n).y); mix: lerp(base, reflection, 0.4 + 0.6 * pow(1.0 - max(dot(n, -rd), 0.0), 3.0))- Glint
+ pow(max(dot(reflect(rd, n), normalize(float3(0.6, 0.8, -0.5))), 0.0), 60.0)- Background
float3(0.05, 0.06, 0.1)
Helper functions provided
The toolbox has: calcNormal(), smin(). 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