Skip to content

Why image sample inside compute shader is invalid? #5369

Closed Answered by ltxitai
jj11hh asked this question in Q&A
Discussion options

You must be logged in to vote

According to WGSL reference textureSample can only be used in fragment shaders: https://www.w3.org/TR/WGSL/#texturesample
You can use textureLoad in compute shaders: https://www.w3.org/TR/WGSL/#textureload

As for the reasons - I don't know. Probably better to ask over at https://github.com/gpuweb/gpuweb

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jj11hh
Comment options

Answer selected by jj11hh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants