Three.js Cyberpunk Neon Street (Rain & Bloom)

A rain-soaked cyberpunk alley in Three.js, with canvas-texture neon signs (some flickering), lit windows, overhead cables, wet asphalt reflecting a CubeCamera capture, 6,000 rain streaks, flying cars and UnrealBloom glow as the camera walks the street.

Key topics: cyberpunk, neon street, three.js bloom, rain effect, wet reflections, night city

What this code does

- Neon Signs: canvas text with shadowBlur glow on MeshBasicMaterial with toneMapped: false, so the colours stay saturated before bloom.
- Wet Street: low roughness and metalness reflect an environment map from a CubeCamera re-rendered every fourth frame with the street hidden.
- Rain: 6,000 short line segments falling and wrapping; drying the street raises roughness and kills the reflections.
- Lighting: dim hemisphere and moonlight, plus a capped set of point lights in sign colours so forward shading stays fast.
- Post-Processing: EffectComposer → UnrealBloomPass → OutputPass, sized with the renderer.
- Controls: rain, neon intensity, bloom, traffic and walk; all signage is fictional.

Continue Learning

JavaScript Implementation

ES6+
// Neon sign: canvas text with shadowBlur glow on an unlit, non-tone-mapped material + bloom
const g = canvas.getContext('2d')
g.font = 'bold 74px Arial'; g.shadowColor = g.fillStyle = '#ff2bd6'; g.shadowBlur = 18
g.fillText('NOODLE', 256, 68)
const sign = new THREE.Mesh(new THREE.PlaneGeometry(5, 1.25), new THREE.MeshBasicMaterial({ map: new THREE.CanvasTexture(canvas), toneMapped: false }))
// Wet street: low roughness + metalness, env map from a CubeCamera refreshed every few frames
street.material.envMap = cubeRenderTarget.texture
composer.addPass(new UnrealBloomPass(size, 1.1, 0.6, 0.2))