A C++/DirectX 11 implementation of "A Scalable and Production Ready Sky and Atmosphere Rendering Technique"
- interactive edition of atmosphere model parameters
- efficient generation of low-resolution sky-view LUT and aerial perspective LUT
- volumetric shadow
git clone --recursive https://github.com/AirGuanZ/AtmosphereRenderer.git cd AtmosphereRenderers mkdir build cd build cmake ..
W, A, S, D, Space, LShift
- show/hide cursor:
Crucial shader performance measured on NVIDIA GTX 1060:
- Sky-view LUT generation (64 * 64): 0.036 ms
- Aerial perspective LUT generation without volume shadow (64 * 64 * 32): 0.03 ms
- Aerial perspective LUT generation with volume shadow (200 * 150 * 32): 0.2 ms
Shaders can actually be further optimized by replacing feature flags in constant buffers with compile-time macros.
LUTs with higher resolution or
ray marching with more number of steps results in better quality and of course, lower performance.
- Planet-scale rendering are not considered. Thus the sky may become strange when camera is out of the atmosphere.
- Terrain renderer is just used to show the aerial perspective effect (transmittance and in-scattering), so multi-scattering related to terrain is simply ignored.
- Terrain occlusion is ignored when computing multi-scattering LUT.
- Sunlight is approximated as a directional light when computing atmosphere scattering. Thus a very big sun disk will always have an unnatural appearance.