WebGPUSampler.js 420 B

123456789101112131415161718192021
  1. import WebGPUBinding from './WebGPUBinding.js';
  2. import { GPUBindingType } from './constants.js';
  3. class WebGPUSampler extends WebGPUBinding {
  4. constructor( name ) {
  5. super( name );
  6. this.type = GPUBindingType.Sampler;
  7. this.visibility = GPUShaderStage.FRAGMENT;
  8. this.samplerGPU = null; // set by the renderer
  9. Object.defineProperty( this, 'isSampler', { value: true } );
  10. }
  11. }
  12. export default WebGPUSampler;