You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
463 B
30 lines
463 B
2 years ago
|
import WebGPUBinding from './WebGPUBinding.js';
|
||
|
import { GPUBindingType } from './constants.js';
|
||
|
|
||
|
class WebGPUSampler extends WebGPUBinding {
|
||
|
|
||
|
constructor( name, texture ) {
|
||
|
|
||
|
super( name );
|
||
|
|
||
|
this.isSampler = true;
|
||
|
|
||
|
this.texture = texture;
|
||
|
|
||
|
this.type = GPUBindingType.Sampler;
|
||
|
this.visibility = GPUShaderStage.FRAGMENT;
|
||
|
|
||
|
this.samplerGPU = null; // set by the renderer
|
||
|
|
||
|
}
|
||
|
|
||
|
getTexture() {
|
||
|
|
||
|
return this.texture;
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
export default WebGPUSampler;
|