Computes a position in view space based on a fragment’s screen position expressed as uv coordinates, the fragments depth value and the camera’s inverse projection matrix.
| Parameter | Type | Default Value |
|---|---|---|
| screenPosition | Node<vec2> | — |
| depth | Node<float> | — |
| projectionMatrixInverse | Node<mat4> | — |
Returns
Node<vec3>Computes a screen position expressed as uv coordinates based on a fragment’s position in view space and the camera’s projection matrix
| Parameter | Type | Default Value |
|---|---|---|
| viewPosition | Node<vec3> | — |
| projectionMatrix | Node<mat4> | — |
Returns
Node<vec2>Computes a normal vector based on depth data. Can be used as a fallback when no normal render target is available or if flat surface normals are required.
| Parameter | Type | Default Value |
|---|---|---|
| uv | Node<vec2> | — |
| depthTexture | DepthTexture | — |
| projectionMatrixInverse | Node<mat4> | — |
Returns
Node<vec3>Interleaved Gradient Noise (IGN) from Jimenez 2014.
IGN has “low discrepancy” resulting in evenly distributed samples. It’s superior compared to default white noise, blue noise or Bayer.
References:
| Parameter | Type | Default Value |
|---|---|---|
| position | Node<vec2> | — |
Returns
Node<float>Vogel disk sampling for uniform circular distribution.
This function generates sample points distributed uniformly on a disk using the golden angle, resulting in an efficient low-discrepancy sequence for sampling. The rotation parameter (phi) allows randomizing the pattern per-pixel when combined with IGN.
| Parameter | Type | Default Value |
|---|---|---|
| sampleIndex | Node<int> | — |
| samplesCount | Node<int> | — |
| phi | Node<float> | — |
Returns
Node<vec2>