Screen Space Ambient Occlusion - Custom Lighting Models - Episode 9
Автор: Ben Cloward
Загружено: 2025-03-13
Просмотров: 5510
Описание:
In this shader tutorial, I show how to write the code required to bring screen space ambient occlusion into our custom lighting model in Unity. Once available we can use it in the traditional way to darken the ambient - but we can also use it in other, unique ways to get just the look we're looking for.
Here's the code for the Custom Function node:
#if defined(_SCREEN_SPACE_OCCLUSION) && !defined(_SURFACE_TYPE_TRANSPARENT) && !defined(SHADERGRAPH_PREVIEW)
float ssao = saturate(SampleAmbientOcclusion(ScreenPos) + (1.0 - _AmbientOcclusionParam.x));
IndirectAO = ssao;
DirectAO = lerp(1.0, ssao, _AmbientOcclusionParam.w);
#else
DirectAO = 1.0;
IndirectAO = 1.0;
#endif
Take a look at the playlist for the whole series:
• Custom Lighting Models
Here's last week's video on making our custom lighting model modular:
• Modular Lighting System - Custom Lighting ...
Shader Book Recommendations
https://www.bencloward.com/resources_...
------------------------------
Theme Music
Peace in the Circuitry - Glitch Hop
http://teknoaxe.com/Link_Code_3.php?q...
Background Music
Speo - The Little Things
• Speo - The Little Things
#UnrealEngine #shadergraph #Unity
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: