textureBicubic
Applies mipped bicubic filtering to a given texture sample node. The optional 'strength' (0–1) scales the blur by the texture’s max mip level: 0 keeps details, 1 approaches the coarsest level for heavy smoothing.
Core Advantages
Greatly reduces aliasing and shimmering at minification and grazing angles compared to bilinear/trilinear; adapts to the texture’s available mip chain and is simple to integrate.
Common Uses
Anti-shimmering/anti-aliasing for distant or minified surfaces
Roughness- or DoF-driven soft sampling in screen-space friendly ways
High-quality scaling/softening for UI, fonts, logos
How to adjust
Use 'strength' in [0,1]. Internally computes lod = strength * maxMipLevel(textureNode) and calls textureBicubicLevel(textureNode, lod). If the texture lacks mipmaps, max level≈0 and the effect diminishes. Bicubic needs more taps than bilinear, so balance quality vs. cost.
Code Examples
1// Basic: bicubic-filter a standard texture sample
2const tex = texture( myMap, uv() );
3const filtered = textureBicubic( tex, 1.0 );
4material.colorNode = filtered;
5
6// Strength driven by material roughness (0–1)
7const base = texture( baseMap, uv() );
8const smooth = textureBicubic( base, materialRoughness.saturate() );
9material.colorNode = smooth;
10
11// Blend with regular sampling for comparison
12const raw = texture( baseMap, uv() );
13const bic = textureBicubic( raw, 0.7 );
14material.colorNode = mix( raw, bic, 0.5 );