I know that in GLSL by default struct use std140 layout, and that means, let's say you have an array of int bound to a buffer, the std140 will pad out that int to 16 bytes, so each element is 16 bytes. And you can use std430 to relax that and get each int in an int array take 4 bytes. But in the following I'm having trouble accessing the element:
layout (std430, set = 0, binding = 4) readonly buffer GlobalBufferArray
{
uint skybox_tile_array[];
}global_buffer_arrays[];
Is each uint element in skybox_tile_array 4 bytes? If not how can I make it so?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744849888a4597064.html
评论列表(0条)