WebGPUNodeUniformsGroup.js 479 B

1234567891011121314151617181920
  1. import WebGPUUniformsGroup from '../WebGPUUniformsGroup.js';
  2. class WebGPUNodeUniformsGroup extends WebGPUUniformsGroup {
  3. constructor( shaderStage ) {
  4. super( 'nodeUniforms' );
  5. let shaderStageVisibility;
  6. if ( shaderStage === 'vertex' ) shaderStageVisibility = GPUShaderStage.VERTEX;
  7. else if ( shaderStage === 'fragment' ) shaderStageVisibility = GPUShaderStage.FRAGMENT;
  8. this.setVisibility( shaderStageVisibility );
  9. }
  10. }
  11. export default WebGPUNodeUniformsGroup;