depthRampBlur
The blur half of a mirror floor: blurs the child more the further a row sits below the line.
depthRampBlur(opts: {line: PropRef; blur: PropRef; blurDistance: PropRef; halfKernel: number}): {compute: GpuComputeNode}
Import effects from shaders/std and use effects.blurs.depthRampBlur.
line is the same 0–1 line prop as mirrorAcrossRow. blur is the blur far below the line, 0–5 where 1 is a radius of about 12 pixels. blurDistance (in uv, 0.01–1) is how far below the line the blur takes to reach full strength. halfKernel is the number of taps each side per pass; 30 is a good value. Spread it into a definition with species: 'custom' and read the result in the fragment as computeOutputs.blurredTexture.
Parameters
| Name | Type | Notes |
|---|---|---|
opts | {line: PropRef; blur: PropRef; blurDistance: PropRef; halfKernel: number} |
Example
...depthRampBlur({line: p('height'), blur: p('blur'), blurDistance: p('blurDistance'), halfKernel: 30})
See also
planarReflection— A mirror floor: the child as it is above a line, and its reflection fading out below it.mirrorAcrossRow— The coordinate mirrored across a horizontal line, for reading a reflection below it.progressiveBlur— A blur that ramps from sharp to full strength in one direction across the child.