@babylonjs/viewer
Version:
The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.
3 lines (2 loc) • 635 B
JavaScript
import{S as e}from"./index-BPURObVq.esm.min.js";const t="packingFunctions",s="fn pack(depth: f32)->vec4f\n{const bit_shift: vec4f= vec4f(255.0*255.0*255.0,255.0*255.0,255.0,1.0);const bit_mask: vec4f= vec4f(0.0,1.0/255.0,1.0/255.0,1.0/255.0);var res: vec4f=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}\nfn unpack(color: vec4f)->f32\n{const bit_shift: vec4f= vec4f(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(color,bit_shift);}";e.IncludesShadersStoreWGSL[t]||(e.IncludesShadersStoreWGSL[t]=s);const c={name:t,shader:s};export{c as p};
//# sourceMappingURL=packingFunctions-0n6YnGJP.esm.min.js.map