mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
The new api allows for reuse while keeping some allocations and to please the borrow checker in future work, it also splits the parser into logical modules to make it easier to work on.
17 lines
267 B
GLSL
17 lines
267 B
GLSL
#version 450
|
|
|
|
const int NUM_VECS = 42;
|
|
layout(std140, set = 1, binding = 0) uniform Data {
|
|
vec4 vecs[NUM_VECS];
|
|
};
|
|
|
|
vec4 function() {
|
|
vec4 sum = vec4(0);
|
|
for (int i = 0; i < NUM_VECS; i++) {
|
|
sum += vecs[i];
|
|
}
|
|
return sum;
|
|
}
|
|
|
|
void main() {}
|