-
The shader above just doesn't compile with naga, the error message is below:
Is this a designed behavior or just a bug? |
Beta Was this translation helpful? Give feedback.
Answered by
ltxitai
Mar 10, 2024
Replies: 1 comment 1 reply
-
According to WGSL reference As for the reasons - I don't know. Probably better to ask over at https://github.com/gpuweb/gpuweb |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jj11hh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to WGSL reference
textureSample
can only be used in fragment shaders: https://www.w3.org/TR/WGSL/#texturesampleYou can use
textureLoad
in compute shaders: https://www.w3.org/TR/WGSL/#textureloadAs for the reasons - I don't know. Probably better to ask over at https://github.com/gpuweb/gpuweb