@animech-public/playcanvas
Version:
PlayCanvas WebGL game engine
17 lines (13 loc) • 423 B
JavaScript
var aoSpecOccSimplePS = /* glsl */`
uniform float material_occludeSpecularIntensity;
void occludeSpecular(float gloss, float ao, vec3 worldNormal, vec3 viewDir) {
float specOcc = mix(1.0, ao, material_occludeSpecularIntensity);
dSpecularLight *= specOcc;
dReflection *= specOcc;
sSpecularLight *= specOcc;
sReflection *= specOcc;
}
`;
export { aoSpecOccSimplePS as default };