WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Discussion options

You must be logged in to vote

Currently, Vec3 has a different representation between the CPU (12 bytes) and GPU (16 bytes). So for now, please just use Vec4 for any structs that are communicated between host and device.

@LegNeato maybe we should rebase this PR, which iirc makes Vec3 be 12 bytes on the GPU as well. (I've got a different workaround in my project, basically I convert all glam Vec's to [f32; 3] and then layout always matches)

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@Steveplays28
Comment options

@LegNeato
Comment options

@LegNeato
Comment options

@Firestar99
Comment options

Answer selected by Steveplays28
@LegNeato
Comment options

@Firestar99
Comment options

@Steveplays28
Comment options

@nazar-pc
Comment options

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