Native backendinitializing
color gather above · depth compare below
Forced WebGL2 referenceinitializing
same TSL graph · GLSL translation
THREE.JS / FOUNDATIONS 185

Four neighboring texels. One gather.

Texture sampling usually returns one filtered value. Gather reads a four-texel neighborhood from a selected channel, then the same operation can compare a depth texture against a reference.

Initializing —

Building the color and depth render-target sources.

Primary
—
Reference
—
Source
—
Draw calls
—
Sample
—
Color gathertop half

Four neighboring values from the selected color channel become RGBA.

Channel
R (0)
Offset
0, 7
Depth comparebottom half

Gathered depth values run through a comparison sampler reference.

Compare
1.00
Texture
DepthTexture
Gather controls
Node contract
sample→offset→gather(channel)→compare

The selected channel is a compile-time gather index; graph rebuilds make that boundary explicit.

Change the channel or offset, rebuild the node graph, and compare the two backends.

Previous: render target array / 3D →
LAB 185 / TEXTURE GATHER