﻿NativeXRenderer - the GLSL 450 compute and pixel shaders of the ambient occlusion (gtao.h), compiled at startup
by glslang (glsl.h, D16).

A port of King Kong Recompiled's backend/shaders/gtao.hlsl (Copyright (c) 2026 TekRantGaming and contributors,
MIT: thirdparty/king-kong-recompiled/LICENSE) and of the parts of XeGTAO it uses, from HLSL to GLSL:

  XeGTAO, version 1.30. Copyright (C) 2016-2021, Intel Corporation. SPDX-License-Identifier: MIT.
  Based on GTAO/GTSO, Jimenez et al., "Practical Real-Time Strategies for Accurate Indirect Occlusion".
  Implementation: Filip Strugar and Steve Mccalla. https://github.com/GameTechDev/XeGTAO
  The sample's normal decoding and noise (vaGTAO.hlsl) are under the same licence.

  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
  documentation files (the "Software"), to deal in the Software without restriction, including without
  limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
  Software, and to permit persons to whom the Software is furnished to do so, subject to the following
  conditions: The above copyright notice and this permission notice shall be included in all copies or
  substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
  AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

XeGTAO's math, constants and passes are kept as they are, with KK's choices: 32-bit depths
(XE_GTAO_FP32_DEPTHS), full precision, XE_GTAO_USE_DEFAULT_CONSTANTS 1 (XeGTAO.h's default: the radius
multiplier, sample distribution power and the falloff range's share are XeGTAO's own; EffectRadius,
EffectFalloffRange's start, FinalValuePower, DenoiseBlurBeta and DepthMIPSamplingOffset come from the
constants), no bent normals. What changes is the language only:
  - HLSL's GatherRed is GLSL's textureGather (the same four texels in the same order, Vulkan's and D3D's);
    SampleLevel is textureLod; Load is texelFetch; RWTexture2D stores are imageStore.
  - The edges image is R32_FLOAT and the AO terms and normals are R32_UINT: every Vulkan device stores to those
