@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
34 lines • 1.22 kB
JavaScript
// Do not edit.
import { ShaderStore } from "../../Engines/shaderStore.js";
const name = "pbrBlockAmbientOcclusion";
const shader = `struct ambientOcclusionOutParams
{vec3 ambientOcclusionColor;
vec3 ambientOcclusionColorMap;
};ambientOcclusionOutParams ambientOcclusionBlock(
in vec3 ambientOcclusionColorMap_,
in vec4 vAmbientInfos
)
{ambientOcclusionOutParams outParams;vec3 ambientOcclusionColor=vec3(1.,1.,1.);
vec3 ambientOcclusionColorMap=ambientOcclusionColorMap_*vAmbientInfos.y;
ambientOcclusionColorMap=vec3(ambientOcclusionColorMap.r,ambientOcclusionColorMap.r,ambientOcclusionColorMap.r);
ambientOcclusionColor=mix(ambientOcclusionColor,ambientOcclusionColorMap,vAmbientInfos.z);
outParams.ambientOcclusionColorMap=ambientOcclusionColorMap;
outParams.ambientOcclusionColor=ambientOcclusionColor;return outParams;}
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStore[name]) {
ShaderStore.IncludesShadersStore[name] = shader;
}
/** @internal */
export const pbrBlockAmbientOcclusion = { name, shader };
//# sourceMappingURL=pbrBlockAmbientOcclusion.js.map