How to map this wgsl code to rust-gpu code? #551
Replies: 1 comment
-
|
Essentially, with current restrictions of rust-gpu you'll not be able to convert between slices and arrays in either direction. This is supposed to change at some point, but not yet. Similarly, you'll have a hard time using iterator trait for anything moderately complex, so will need to do manual indexing like in C/C++ quite often. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am new to shaders and I have been following along Learn WGPU tutorial, and am currently at Buffers and Indices. The current wgsl code that I am trying to port over is:
I cannot seem to link the content in the vertex buffer to
vs_main, and as a result I have been unable to test iffs_mainis correct either. Below is one of my rust-gpu code attempts:which gives
error: invalid entry param type&[f32](expected[f32]or&mut [f32]). What is the correct way to solve this?I had previously done the example in the earlier chapter 'The Pipeline', and successfully converted the code over.
code
Beta Was this translation helpful? Give feedback.
All reactions