@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.
23 lines (20 loc) • 632 B
JavaScript
import { ax as PBR_HAS_ALPHA_TEST } from './index-By0tcgYN.esm.js';
const pbrExt = {
id: "alpha-test",
phase: "fragment",
frag(ctx) {
return ctx._features & PBR_HAS_ALPHA_TEST ? {
_id: "alpha-test",
_uboFields: [{ _name: "alphaCutOff", _type: "f32" }],
_fragmentSlots: { AT: `if(alpha*material.materialAlpha<material.alphaCutOff){discard;}` }
} : null;
},
writeUbo(data, mat, offsets) {
const off = offsets.get("alphaCutOff");
if (off !== void 0) {
data[off / 4] = mat.alphaCutOff ?? 0;
}
}
};
export { pbrExt };
//# sourceMappingURL=alpha-test-fragment-Bhs2fCyq.esm.js.map