lygia
/v1.1.6
/lighting
/material
/shininess
)get material shininess property from GlslViewer's defines https://github.com/patriciogonzalezvivo/glslViewer/wiki/GlslViewer-DEFINES#material-defines
Dependencies:
lygia
/v1.1.6
/lighting
/toShininess
.glsl
Use:
vec4 materialShininess()
#ifndef FNC_MATERIAL_SHININESS
#define FNC_MATERIAL_SHININESS
float materialShininess() {
float shininess = 15.0;
#ifdef MATERIAL_SHININESS
shininess = MATERIAL_SHININESS;
#elif defined(FNC_MATERIAL_METALLIC) && defined(MATERIAL_METALLIC) && defined(FNC_MATERIAL_ROUGHNESS) && defined(MATERIAL_ROUGHNESS)
float roughness = materialRoughness();
float metallic = materialMetallic();
shininess = toShininess(roughness, metallic);
#endif
return shininess;
}
#endif
Dependencies:
lygia
/v1.1.6
/lighting
/toShininess
.glsl
lygia
/v1.1.6
/lighting
/material
/roughness
.glsl
lygia
/v1.1.6
/lighting
/material
/metallic
.glsl
Use:
float4 materialShininess()
#ifndef FNC_MATERIAL_SHININESS
#define FNC_MATERIAL_SHININESS
float materialShininess() {
float shininess = 15.0;
#ifdef MATERIAL_SHININESS
shininess = MATERIAL_SHININESS;
#elif defined(MATERIAL_METALLIC) && defined(MATERIAL_ROUGHNESS)
float roughness = materialRoughness();
float metallic = materialMetallic();
shininess = toShininess(roughness, metallic);
#endif
return shininess;
}
#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