WebGPUSampler.js 435 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. }
  11. }
  12. WebGPUSampler.prototype.isSampler = true;
  13. export default WebGPUSampler;