[DiscordArchive] I only need two though ?
[DiscordArchive] I only need two though ?
Archived author: Titi • Posted: 2024-02-02T21:41:22.645000+00:00
Original source
I only need two though ?
Archived author: Deamon • Posted: 2024-02-02T21:41:51.018000+00:00
Original source
yeah, but `std140` rules. The compiler would add two bytes as padding either way
Archived author: Titi • Posted: 2024-02-02T21:42:11.131000+00:00
Original source
i haven't read on that
![[Image: image.png?ex=690c6d84&is=690b1c04&hm=6f5...7ada8a30d&]](https://cdn.discordapp.com/attachments/408013572430626817/1203093105117495367/image.png?ex=690c6d84&is=690b1c04&hm=6f537f9f611f414869b294bdbf453bf51da1a4ae05c014bc63e766a7ada8a30d&)
Archived author: Titi • Posted: 2024-02-02T21:42:28.692000+00:00
Original source
that makes sense then
![[Image: image.png?ex=690c6d84&is=690b1c04&hm=6f5...7ada8a30d&]](https://cdn.discordapp.com/attachments/408013572430626817/1203093105117495367/image.png?ex=690c6d84&is=690b1c04&hm=6f537f9f611f414869b294bdbf453bf51da1a4ae05c014bc63e766a7ada8a30d&)
Archived author: Deamon • Posted: 2024-02-02T21:42:38.073000+00:00
Original source
yup
Archived author: Titi • Posted: 2024-02-02T21:42:47.591000+00:00
Original source
thanks
Archived author: Titi • Posted: 2024-02-02T21:43:04.208000+00:00
Original source
I have more data to pass anyways, so perfect
Archived author: Titi • Posted: 2024-02-02T21:46:03.529000+00:00
Original source
is passing the whole ivec4 at once more performance than 4 ints individually ?
Archived author: Titi • Posted: 2024-02-02T21:46:09.986000+00:00
Original source
or just easier to manage the padding
Archived author: Deamon • Posted: 2024-02-02T21:48:21.356000+00:00
Original source
The padding thing. It's pain in the ass. So I use `vec4`, `ivec4` and `mat4`/`mat3` everywhere in UBO, and try to manually pack the data like in that screenshot with `Pad2` you posted.
This way I can stop worrying about compiler suddenly adding a padding, which is annoying to debug