@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.
37 lines • 1.28 kB
JavaScript
// Do not edit.
import { ShaderStore } from "../../Engines/shaderStore.js";
const name = "pbrBlockAmbientOcclusion";
const shader = `struct ambientOcclusionOutParams
{ambientOcclusionColor: vec3f,
ambientOcclusionColorMap: vec3f
};
fn ambientOcclusionBlock(
ambientOcclusionColorMap_: vec3f,
vAmbientInfos: vec4f
)->ambientOcclusionOutParams
{
var outParams: ambientOcclusionOutParams;var ambientOcclusionColor: vec3f= vec3f(1.,1.,1.);
var ambientOcclusionColorMap: vec3f=ambientOcclusionColorMap_*vAmbientInfos.y;
ambientOcclusionColorMap= vec3f(ambientOcclusionColorMap.r,ambientOcclusionColorMap.r,ambientOcclusionColorMap.r);
ambientOcclusionColor=mix(ambientOcclusionColor,ambientOcclusionColorMap,vAmbientInfos.z);
outParams.ambientOcclusionColorMap=ambientOcclusionColorMap;
outParams.ambientOcclusionColor=ambientOcclusionColor;return outParams;}
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name]) {
ShaderStore.IncludesShadersStoreWGSL[name] = shader;
}
/** @internal */
export const pbrBlockAmbientOcclusionWGSL = { name, shader };
//# sourceMappingURL=pbrBlockAmbientOcclusion.js.map