|
| float | smaa_detail::areaOrtho (float p, float d, float offset) |
| | Smoothing function used by the area calculation.
|
| void | smaa_detail::calcAreaOrtho (int d1, int d2, int e1, int e2, float offset, float &r, float &g) |
| | Compute the area for a specific orthogonal edge configuration.
|
| float | smaa_detail::subtexOffset (int idx) |
| | Map sub-pixel index [0..6] to sub-pixel offset value.
|
| void | generateAreaTex (unsigned char *out) |
| | Generate the SMAA area texture into a caller-provided buffer.
|
SMAA Area Texture generator.
Generates the 160x560 RG8 UNORM area lookup texture used by the SMAA blending weight calculation pass.
Based on the SMAA reference implementation by Jorge Jimenez et al. (MIT License).
The area texture encodes the blending areas for all possible edge patterns at all distances. It is organised as a grid of sub-textures:
- Each sub-texture is (SMAA_AREATEX_MAX_DISTANCE+1) x (SMAA_AREATEX_MAX_DISTANCE+1) = 17x17 pixels
- There are 20 crossing-edge patterns (ortho + diag) arranged horizontally, and 7 sub-pixel offsets arranged vertically.
Total size: 160 x 560 pixels, RG8 format (2 bytes/pixel = 179200 bytes).