UNPKG

@luma.gl/shadertools

Version:

Shader module system for luma.gl

33 lines 975 B
// luma.gl // SPDX-License-Identifier: MIT // Copyright (c) vis.gl contributors import { lighting } from "../lights/lighting.js"; import { LAMBERT_WGSL } from "./lambert-shaders-wgsl.js"; import { LAMBERT_VS, LAMBERT_FS } from "./lambert-shaders-glsl.js"; /** A matte material model that applies diffuse-only Lambert lighting per fragment. */ export const lambertMaterial = { name: 'lambertMaterial', firstBindingSlot: 0, bindingLayout: [{ name: 'lambertMaterial', group: 3 }], dependencies: [lighting], source: LAMBERT_WGSL, vs: LAMBERT_VS, fs: LAMBERT_FS, defines: { LIGHTING_FRAGMENT: true }, uniformTypes: { unlit: 'i32', ambient: 'f32', diffuse: 'f32' }, defaultUniforms: { unlit: false, ambient: 0.35, diffuse: 0.6 }, getUniforms(props) { return { ...lambertMaterial.defaultUniforms, ...props }; } }; //# sourceMappingURL=lambert-material.js.map