UNPKG

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