/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/RendererCore/BakedProbes/BakingUtils.h
28 строк
1 KB
Jan Krassnigg
Added code documentation to RendererCore (#1697)
28 окт 2025, 13:18
Не верифицирован
28 окт 2025, 13:18
d573105
Код
Авторство
О чём код?
#pragma once #include <Core/Graphics/AmbientCubeBasis.h> #include <RendererCore/Declarations.h> /// Compressed representation of ambient cube sky visibility data. /// /// Packs 6 directional visibility values into a 32-bit integer using variable bit depths /// (5 bits for the 4 horizontal directions, 6 bits for the 2 vertical directions). using ezCompressedSkyVisibility = ezUInt32; namespace ezBakingUtils { /// Generates a point on a unit sphere using Fibonacci spiral sampling. /// /// This produces evenly distributed points on a sphere, useful for hemisphere sampling /// during baking. The distribution minimizes clustering and gaps. EZ_RENDERERCORE_DLL ezVec3 FibonacciSphere(ezUInt32 uiSampleIndex, ezUInt32 uiNumSamples); /// Compresses ambient cube sky visibility into a 32-bit value. /// /// Uses variable bit depths per direction (5 or 6 bits) to pack the data. /// Values are clamped to [0,1] before compression. EZ_RENDERERCORE_DLL ezCompressedSkyVisibility CompressSkyVisibility(const ezAmbientCube<float>& skyVisibility); /// Decompresses sky visibility from a 32-bit value back to ambient cube format. EZ_RENDERERCORE_DLL void DecompressSkyVisibility(ezCompressedSkyVisibility compressedSkyVisibility, ezAmbientCube<float>& out_skyVisibility); } // namespace ezBakingUtils