WebGPUSampler.js 456 B

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