@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) • 1.02 kB
JavaScript
import{S as o}from"./index-BPURObVq.esm.min.js";const e="iblVoxelGridPixelShader",r="var voxel_storage: texture_storage_3d<r8unorm,write>;varying vNormalizedPosition: vec3f;flat varying f_swizzle: i32;@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var size: vec3f=vec3f(textureDimensions(voxel_storage));var normPos: vec3f=input.vNormalizedPosition.xyz;var outputColor: vec4f=vec4f(0.0,0.0,0.0,1.0);switch (input.f_swizzle) {case 0: {normPos=normPos.zxy; \noutputColor=vec4f(1.0,1.0,0.0,1.0);break;}\ncase 1: {normPos=normPos.yzx;outputColor=vec4f(1.0,1.0,1.0,1.0);break;}\ndefault: {normPos=normPos.xyz;outputColor=vec4f(1.0,1.0,0.0,1.0);break;}}\ntextureStore(voxel_storage,vec3<i32>(i32(normPos.x*size.x),i32(normPos.y*size.y),i32(normPos.z*size.z)),outputColor);fragmentOutputs.color=vec4<f32>(vec3<f32>(normPos),1.);}";o.ShadersStoreWGSL[e]||(o.ShadersStoreWGSL[e]=r);const t={name:e,shader:r};export{t as iblVoxelGridPixelShaderWGSL};
//# sourceMappingURL=iblVoxelGrid.fragment-D0MjXls8.esm.min.js.map