lygia
/v1.1.6
/lighting
/common
/specularAO
)Dependencies:
#if !defined(TARGET_MOBILE) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEBGL)
#define IBL_SPECULAR_OCCLUSION
#endif
#ifndef FNC_SPECULARAO
#define FNC_SPECULARAO
float specularAO(const in float _NoV, const in float _roughness, const in float _ao) {
#if !defined(TARGET_MOBILE) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEBGL)
return saturate(pow(_NoV + _ao, exp2(-16.0 * _roughness - 1.0)) - 1.0 + _ao);
#else
return 1.0;
#endif
}
#ifdef STR_MATERIAL
float specularAO(const in Material _M, const in float _ao) {
return specularAO(_M.NoV, _M.roughness, _ao);
}
#endif
#endif
#if !defined(TARGET_MOBILE) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEBGL)
#define IBL_SPECULAR_OCCLUSION
#endif
#ifndef FNC_SPECULARAO
#define FNC_SPECULARAO
float specularAO(float NoV, float ao, float roughness) {
#if !defined(TARGET_MOBILE) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEBGL)
return saturate(pow(NoV + ao, exp2(-16.0 * roughness - 1.0)) - 1.0 + ao);
#else
return 1.0;
#endif
}
#endif
LYGIA is dual-licensed under the Prosperity License and the Patron License for sponsors and contributors.
Sponsors and contributors are automatically added to the Patron License and they can ignore the any non-commercial rule of the Prosperity Licensed software (please take a look to the exception).
It's also possible to get a permanent comercial license hook to a single and specific version of LYGIA.
Sign up for the news letter bellow, joing the LYGIA's channel on Discord or follow the Github repository