downsample
A smaller copy of a source, box-filtered so it does not alias.
downsample(source: InputSource, opts: {scale: number}): DownsampleInput
Import downsample from shaders/std.
Read it by name. Use it to make an expensive read cheap: sample the small copy many times instead of the full one.
Parameters
| Name | Type | Notes |
|---|---|---|
source | InputSource | |
opts | {scale: number} |
Example
inputs: {small: downsample(child, {scale: 0.25})},