Releases GPU resources.
Renders the HBAO texture from the opaque depth buffer.
The already-captured opaque (pre-transparent) depth texture.
Canvas width in pixels.
Canvas height in pixels.
Camera near plane.
Camera far plane.
The camera's raw perspective projection matrix.
The HBAO effect parameters (radius, intensity).
The single-channel AO texture (R = occlusion factor, 1.0 = fully lit), or null if unavailable.
Generates the HBAO texture for WebGL2 -- reconstructs view-space position/normal from the already-captured opaque depth buffer and estimates per-direction horizon angles, in a single full-resolution pass (no separate blur/denoise pass; see AO.frag.glsl for the trade-off). WebGL1 has no sampleable depth texture to reconstruct from, so this is WebGL2-only.