mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 06:50:59 +01:00
* glsl-in: Remove unneeded mutability from reference * glsl-in: Fix composite constructors In the recent rework of the constructors it seems that the logic for composite types (arrays and structs) was accidentally removed by me.
26 lines
393 B
GLSL
26 lines
393 B
GLSL
#version 450
|
|
|
|
layout(location = 0) in VertexData {
|
|
vec2 position;
|
|
vec2 a;
|
|
} vert;
|
|
|
|
layout(location = 0) out FragmentData {
|
|
vec2 position;
|
|
vec2 a;
|
|
} frag;
|
|
|
|
struct TestStruct {
|
|
float a;
|
|
float b;
|
|
};
|
|
|
|
|
|
void main() {
|
|
const vec3 positions[2] = vec3[2](
|
|
vec3(-1.0, 1.0, 0.0),
|
|
vec3(-1.0, -1.0, 0.0)
|
|
);
|
|
const TestStruct strct = TestStruct( 1, 2 );
|
|
}
|