@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.
35 lines • 1.59 kB
JavaScript
// Do not edit.
import { ShaderStore } from "../../Engines/shaderStore.js";
const name = "pbrBlockFinalUnlitComponents";
const shader = `var finalDiffuse: vec3f=diffuseBase;finalDiffuse*=surfaceAlbedo;
finalDiffuse*=subSurfaceOut.refractionOpacity;
finalDiffuse+=diffuseTransmissionBase;
finalDiffuse=max(finalDiffuse,vec3f(0.0));finalDiffuse*=uniforms.vLightingIntensity.x;var finalAmbient: vec3f=uniforms.vAmbientColor;finalAmbient*=surfaceAlbedo.rgb;var finalEmissive: vec3f=uniforms.vEmissiveColor;
var emissiveColorTex: vec3f=textureSample(emissiveSampler,emissiveSamplerSampler,fragmentInputs.vEmissiveUV+uvOffset).rgb;
finalEmissive*=toLinearSpaceVec3(emissiveColorTex.rgb);
finalEmissive*=emissiveColorTex.rgb;
finalEmissive*= uniforms.vEmissiveInfos.y;
finalEmissive*=uniforms.vLightingIntensity.y;
var ambientOcclusionForDirectDiffuse: vec3f=mix( vec3f(1.),aoOut.ambientOcclusionColor,uniforms.vAmbientInfos.w);
var ambientOcclusionForDirectDiffuse: vec3f=aoOut.ambientOcclusionColor;
finalAmbient*=aoOut.ambientOcclusionColor;finalDiffuse*=ambientOcclusionForDirectDiffuse;
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name]) {
ShaderStore.IncludesShadersStoreWGSL[name] = shader;
}
/** @internal */
export const pbrBlockFinalUnlitComponentsWGSL = { name, shader };
//# sourceMappingURL=pbrBlockFinalUnlitComponents.js.map