napframework / nap

NAP Framework source code
https://nap-framework.tech
Mozilla Public License 2.0
410 stars 23 forks source link

Flexible buffer bindings #67

Open lshoek opened 3 weeks ago

lshoek commented 3 weeks ago

Removes restriction that would assert that all buffers bound to bindings would have the same size as specified by the shader declaration. Buffer declarations are also permitted to have an element size of zero. This makes it possible to define buffer bindings without specifying the size in the shader:

layout(std430) restrict readonly buffer InPositions
{
    vec4 positions[];
};

We only check that the buffer stride equals the stride in the declaration.

Also: