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.

28 lines 1.25 kB
// Do not edit. import { ShaderStore } from "../../Engines/shaderStore.js"; const name = "openpbrThinFilmLayerData"; const shader = `#ifdef THIN_FILM var thin_film_weight: f32=uniforms.vThinFilmWeight;var thin_film_thickness: f32=uniforms.vThinFilmThickness.r*1000.0f; var thin_film_ior: f32=uniforms.vThinFilmIor; #ifdef THIN_FILM_WEIGHT var thinFilmWeightFromTexture: f32=textureSample(thinFilmWeightSampler,thinFilmWeightSamplerSampler,fragmentInputs.vThinFilmWeightUV+uvOffset).r*uniforms.vThinFilmWeightInfos.y; #endif #ifdef THIN_FILM_THICKNESS var thinFilmThicknessFromTexture: f32=textureSample(thinFilmThicknessSampler,thinFilmThicknessSamplerSampler,fragmentInputs.vThinFilmThicknessUV+uvOffset).g*uniforms.vThinFilmThicknessInfos.y; #endif #ifdef THIN_FILM_WEIGHT thin_film_weight*=thinFilmWeightFromTexture; #endif #ifdef THIN_FILM_THICKNESS thin_film_thickness*=thinFilmThicknessFromTexture; #endif let thin_film_ior_scale: f32=clamp(2.0f*abs(thin_film_ior-1.0f),0.0f,1.0f); #endif `; // Sideeffect if (!ShaderStore.IncludesShadersStoreWGSL[name]) { ShaderStore.IncludesShadersStoreWGSL[name] = shader; } /** @internal */ export const openpbrThinFilmLayerDataWGSL = { name, shader }; //# sourceMappingURL=openpbrThinFilmLayerData.js.map