|
|
@@ -223,7 +223,7 @@ class WGSLNodeBuilder extends NodeBuilder {
|
|
|
|
|
|
_generateTextureSampleLevel( texture, textureProperty, uvSnippet, levelSnippet, depthSnippet, shaderStage = this.shaderStage ) {
|
|
|
|
|
|
- if ( shaderStage === 'fragment' && this.isUnfilterable( texture ) === false ) {
|
|
|
+ if ( ( shaderStage === 'fragment' || shaderStage === 'compute' ) && this.isUnfilterable( texture ) === false ) {
|
|
|
|
|
|
return `textureSampleLevel( ${ textureProperty }, ${ textureProperty }_sampler, ${ uvSnippet }, ${ levelSnippet } )`;
|
|
|
|
|
|
@@ -592,7 +592,7 @@ class WGSLNodeBuilder extends NodeBuilder {
|
|
|
texture.store = node.isStorageTextureNode === true;
|
|
|
texture.setVisibility( gpuShaderStageLib[ shaderStage ] );
|
|
|
|
|
|
- if ( shaderStage === 'fragment' && this.isUnfilterable( node.value ) === false && texture.store === false ) {
|
|
|
+ if ( ( shaderStage === 'fragment' || shaderStage === 'compute' ) && this.isUnfilterable( node.value ) === false && texture.store === false ) {
|
|
|
|
|
|
const sampler = new NodeSampler( `${uniformNode.name}_sampler`, uniformNode.node, group );
|
|
|
sampler.setVisibility( gpuShaderStageLib[ shaderStage ] );
|
|
|
@@ -1104,7 +1104,7 @@ ${ flowData.code }
|
|
|
|
|
|
const texture = uniform.node.value;
|
|
|
|
|
|
- if ( shaderStage === 'fragment' && this.isUnfilterable( texture ) === false && uniform.node.isStorageTextureNode !== true ) {
|
|
|
+ if ( ( shaderStage === 'fragment' || shaderStage === 'compute' ) && this.isUnfilterable( texture ) === false && uniform.node.isStorageTextureNode !== true ) {
|
|
|
|
|
|
if ( this.isSampleCompare( texture ) ) {
|
|
|
|