diff options
Diffstat (limited to 'contrib/SDL-3.2.8/test/testgpu/cube.glsl')
| -rw-r--r-- | contrib/SDL-3.2.8/test/testgpu/cube.glsl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/test/testgpu/cube.glsl b/contrib/SDL-3.2.8/test/testgpu/cube.glsl new file mode 100644 index 0000000..3f35e98 --- /dev/null +++ b/contrib/SDL-3.2.8/test/testgpu/cube.glsl | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #version 450 | ||
| 2 | |||
| 3 | #ifdef VERTEX | ||
| 4 | |||
| 5 | layout (location = 0) in vec3 in_position; | ||
| 6 | layout (location = 1) in vec3 in_color; | ||
| 7 | |||
| 8 | layout (location = 0) out vec4 out_color; | ||
| 9 | |||
| 10 | layout (set = 1, binding = 0) uniform UBO | ||
| 11 | { | ||
| 12 | mat4x4 modelViewProj; | ||
| 13 | }; | ||
| 14 | |||
| 15 | void main() | ||
| 16 | { | ||
| 17 | out_color = vec4(in_color, 1.0); | ||
| 18 | gl_Position = modelViewProj * vec4(in_position, 1.0); | ||
| 19 | } | ||
| 20 | |||
| 21 | #else | ||
| 22 | |||
| 23 | layout (location = 0) in vec4 in_color; | ||
| 24 | layout (location = 0) out vec4 out_color; | ||
| 25 | |||
| 26 | void main() | ||
| 27 | { | ||
| 28 | out_color = in_color; | ||
| 29 | } | ||
| 30 | |||
| 31 | #endif \ No newline at end of file | ||
