shi-yan / webgpuunleashed

Code samples for 'WebGPU Unleashed: A Practical Tutorial'
https://shi-yan.github.io/WebGPUUnleashed/
261 stars 11 forks source link

Shaders in `Shadow Maps` example fails to compile: `unresolved value 'align'` #1

Closed ErichDonGubler closed 3 months ago

ErichDonGubler commented 3 months ago

From my current console log in Chrome Version 127.0.6533.89 (Official Build) (arm64):

about:srcdoc:1 Error while parsing WGSL: :105:17 error: unresolved value 'align'
            if (align > 0.9) {
                ^^^^^

 - While validating [ShaderModuleDescriptor]
 - While calling [Device].CreateShaderModule([ShaderModuleDescriptor]).
shi-yan commented 3 months ago

Thank you very much for reporting it. I had mistakenly removed a line. just added it back

Please check again! Thank you!

https://shi-yan.github.io/webgpuunleashed/code/code.html#5_01_shadow_maps