You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am investigating about lib that helps me to set my buffers using std140 easily, I am using right now crevice but I am having some troubles with shaders that require sized arrays or dynamic size types, like:
So my question is, opengl/std140 is supported by encase?
std140 and WGSL's uniform alignment rules are not that different. The only difference is how matrices of the form matCx2 (matrices with 2 rows and C columns) are laid out. As long as you make sure to not use those you should be fine.
As for officially supporting std140, I don't see a way to nicely fit it in the current architecture but we can leave this issue open and see how sought after support for this would be.
If so, is this kind of structs is supported?
Yeah, but the one with the Vec would only work if it's part of an std430 storage buffer.
If you'd like support for Vec-like data structures in uniform buffers, see #10.
Thanks for the clarification, notan is a lib so I cannot rely on the user to not use a matCx2 matrix because there could a case that they need it. But I am looking to use encase eventually for a (future) wgpu backend. Thanks!
Hey hi!
I am investigating about lib that helps me to set my buffers using std140 easily, I am using right now crevice but I am having some troubles with shaders that require sized arrays or dynamic size types, like:
So my question is, opengl/std140 is supported by encase? I see that the readme talks about WGPU only.
If so, is this kind of structs is supported? This is exactly the code that I am trying to make it work with crevice: https://github.com/Nazariglez/LearnOpenGL-Notan/blob/main/src/_2_lighting/_6_1_multiple_lights.rs#L264
Where #[uniform] it just adds AsStd140 and Uniform to control the input type when setting the buffer's data.
If
encase
support this it would be great.The text was updated successfully, but these errors were encountered: