lygia
/lighting
/specular
)Calculate specular contribution
Dependencies:
lygia
/lighting
/shadingData
/new
.glsl
lygia
/lighting
/specular
/phong
.glsl
lygia
/lighting
/specular
/blinnPhong
.glsl
lygia
/lighting
/specular
/cookTorrance
.glsl
lygia
/lighting
/specular
/gaussian
.glsl
lygia
/lighting
/specular
/beckmann
.glsl
Use:
specular(<vec3> L, <vec3> N, <vec3> V, <float> roughness[, <float> fresnel])
specular(<vec3> L, <vec3> N, <vec3> V, <float> NoV, <float> NoL, <float> roughness, <float> fresnel)
#ifndef SPECULAR_FNC
#if defined(TARGET_MOBILE) || defined(PLATFORM_RPI) || defined(PLATFORM_WEBGL)
#define SPECULAR_FNC specularBlinnPhongRoughness
#else
#define SPECULAR_FNC specularCookTorrance
#endif
#endif
#ifndef FNC_SPECULAR
#define FNC_SPECULAR
vec3 specular(ShadingData shadingData) { return vec3(1.0, 1.0, 1.0) * SPECULAR_FNC(shadingData); }
#endif
Dependencies:
lygia
/lighting
/specular
/phong
.glsl
lygia
/lighting
/specular
/blinnPhong
.glsl
lygia
/lighting
/specular
/cookTorrance
.glsl
lygia
/lighting
/specular
/gaussian
.glsl
lygia
/lighting
/specular
/beckmann
.glsl
Use:
specular(<float3> L, <float3> N, <float3> V, <float> roughness[, <float> fresnel])
specular(<float3> L, <float3> N, <float3> V, <float> NoV, <float> NoL, <float> roughness, <float> fresnel)
#ifndef SPECULAR_FNC
#if defined(TARGET_MOBILE) || defined(PLATFORM_RPI) || defined(PLATFORM_WEBGL)
#define SPECULAR_FNC specularBlinnPhongRoughness
#else
#define SPECULAR_FNC specularCookTorrance
#endif
#endif
#ifndef FNC_SPECULAR
#define FNC_SPECULAR
float3 specular(ShadingData shadingData) { return float3(1.0, 1.0, 1.0) * SPECULAR_FNC(shadingData); }
#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