GitHub
Translate

Opens Google Translate in a new tab. Website translation availability varies by region. Details

WebGL2 Shader • Dual-Texture Ping-Pong FBO

Brush Reveal

Dissolves a foreground image along a continuous cursor brush trail with an Additive Color Blending (ACD) edge shimmer to reveal a pixel-aligned hidden image underneath, then smoothly heals back.

Live Playground & Upload

FluxFX
Dual-Image FBO Brush Portrait to Reveal
Brush Radius 0.14
Heal Retention 0.985
Edge Noise 0.38
Ambient Drift
Upload Base Image
Upload Reveal Image
Demo Images

Where to Use It

AI & Robotics Hero Banners

Float a transparent portrait cutout over large hero typography so visitors brush to reveal a cybernetic or wireframe twin underneath.

Hardware & Product X-Ray

Show a sleek product exterior (`baseImage`) and let shoppers brush across it to inspect internal PCBs, batteries, or acoustic drivers (`revealImage`).

Before / After Comparisons

Interactive photo retouching, architectural renders, or fashion lookbook transformations without clunky split-slider bars.

AI Prompts for Generating Aligned Images

For seamless blending, both baseImage and revealImage must match pixel-for-pixel in framing and pose. Generate the base cutout first (or upload your own photo), then feed that exact image into Image-to-Image / Edit mode with the second prompt:

Step 1 — Base Cutout Prompt (text-to-image)
Studio editorial portrait of a person from chest up, centered symmetrical front-facing pose, direct eye contact, neutral calm expression, sleek matte black turtleneck, crisp frontal studio lighting, shot on 85mm lens f/4, completely transparent background (isolated PNG cutout, zero backdrop shadows), generous headroom.
Step 2 — Reveal Layer Prompt (image-to-image / edit)
Using the exact same reference image (keep head position, eyes, nose, lips, hair, and shoulders 100% pixel-aligned without shifting framing): transform only the visible skin into precision-machined brushed silver titanium and matte ceramic android plates with fine panel seams and subtle glowing optical eyes, keeping the exact same transparent background cutout.

Usage (Copy & Paste)

<section style="position: relative; min-height: 75vh; background: #ea580c; overflow: hidden;">
  <!-- Backdrop Text sits BEHIND the cutout portrait (z-index: 1) -->
  <h1 style="position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; font-size: 18vw; color: rgba(255,255,255,0.92); margin: 0; pointer-events: none;">
    FluxFX
  </h1>

  <!-- Foreground BrushReveal layer sits ABOVE the backdrop text (z-index: 2) -->
  <div
    data-fx="brush-reveal"
    data-fx-base-image="/images/fluxfx-human.png"
    data-fx-reveal-image="/images/fluxfx-robot.png"
    data-fx-bg-color="transparent"
    data-fx-fit="contain"
    data-fx-position="bottom"
    data-fx-radius="0.14"
    data-fx-edge-noise="0.38"
    data-fx-dissipation="0.985"
    style="position: relative; z-index: 2; height: 75vh; width: 100%;"
  ></div>
</section>
<script src="https://unpkg.com/@votax572002/fluxfx/dist/fluxfx.min.js"></script>
'use client';
import { BrushReveal } from '@votax572002/fluxfx/react';

export function RevealHero() {
  return (
    <section style={{ position: 'relative', minHeight: '75vh', background: '#ea580c', overflow: 'hidden' }}>
      <h1 style={{ position: 'absolute', inset: 0, zIndex: 1, display: 'grid', placeItems: 'center', fontSize: '18vw', color: '#fff', margin: 0, pointerEvents: 'none' }}>
        FluxFX
      </h1>
      <BrushReveal
        baseImage="/images/fluxfx-human.png"
        revealImage="/images/fluxfx-robot.png"
        bgColor="transparent"
        fit="contain"
        position="bottom"
        radius={0.14}
        edgeNoise={0.38}
        dissipation={0.985}
        style={{ position: 'relative', zIndex: 2, height: '75vh', width: '100%' }}
      />
    </section>
  );
}
import { FluxFX } from '@votax572002/fluxfx';

FluxFX.apply(el, 'brush-reveal', {
  baseImage: '/images/fluxfx-human.png',
  revealImage: '/images/fluxfx-robot.png',
  bgColor: 'transparent',
  fit: 'contain',
  position: 'bottom',
  radius: 0.14,
  softness: 0.22,
  edgeNoise: 0.38,
  edgeGlow: 0.24,
  dissipation: 0.985,
  ambient: false,
  clickReveal: true,
});

How It Works (Flowchart)

Capsule Stroke sdSegment(prev, cur) Self-Healing FBO Decay via uDissipation FBM Edge Frontier Dissolve noise + glow Mix 2 Textures uBaseTex ↔ uRevealTex

Props & Attributes

HTML AttributeJS / React PropTypeDefaultDescription
data-fx-base-imagebaseImagestring''Foreground image URL/path.
data-fx-reveal-imagerevealImagestring''Aligned hidden image revealed under the brush.
data-fx-bg-colorbgColorstring'transparent'Backdrop color or 'transparent' for alpha cutouts.
data-fx-radiusradiusnumber0.13Brush radius relative to container height.
data-fx-softnesssoftnessnumber0.22Edge feather softness (0.02–0.48).
data-fx-edge-noiseedgeNoisenumber0.38Organic fracture/dissolve noise strength.
data-fx-edge-glowedgeGlownumber0.24Accent shimmer along the dissolving edge.
data-fx-dissipationdissipationnumber0.985How long the reveal stays open before healing.
data-fx-fitfit'cover' | 'contain''cover'Image aspect-ratio fitting mode.
data-fx-positionposition'center' | 'top' | 'bottom''center'Image alignment inside the canvas.
data-fx-ambientambientbooleanfalseGentle idle brush drift when pointer is away.
data-fx-click-revealclickRevealbooleantrueExpands brush radius 1.5x while holding click/touch.