Files
apt-nl-map/static/Magic4/js/three.js-dev/examples/jsm/renderers/webgpu/WebGPUSampler.js

30 lines
481 B
JavaScript
Raw Normal View History

2024-12-04 10:21:04 +08:00
import WebGPUBinding from './WebGPUBinding.js';
import { GPUBindingType } from './constants.js';
class WebGPUSampler extends WebGPUBinding {
constructor( name, texture ) {
super( name );
this.texture = texture;
this.type = GPUBindingType.Sampler;
this.visibility = GPUShaderStage.FRAGMENT;
this.samplerGPU = null; // set by the renderer
}
getTexture() {
return this.texture;
}
}
WebGPUSampler.prototype.isSampler = true;
export default WebGPUSampler;