mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-28 18:24:22 +00:00
Add the SDL_GPU API
Project Lead: Evan Hemsley <evan@moonside.games> Co-designer, Metal Port, Console Ports: Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com> Production, QA, Debug: Co-authored-by: Ethan Lee <flibitijibibo@gmail.com> SDL_Render Driver, Bugfixes: Co-authored-by: Andrei Alexeyev <akari@taisei-project.org> Additional D3D12 Programming, Bugfixes: Co-authored-by: Bart van der Werf <bluelive@gmail.com> Bugfixes and Feedback: Co-authored-by: Zakary Strange <zakarystrange@gmail.com> Co-authored-by: meyraud705 <meyraud705@gmail.com> Co-authored-by: Joshua T. Fisher <playmer@gmail.com> Co-authored-by: Topi Ritala <ritalat@fastmail.com> Co-authored-by: David Gow <david@ingeniumdigital.com> Original API Proposal: Co-authored-by: Ryan C. Gordon <icculus@icculus.org>
This commit is contained in:
31
test/testgpu/cube.glsl
Normal file
31
test/testgpu/cube.glsl
Normal file
@@ -0,0 +1,31 @@
|
||||
#version 450
|
||||
|
||||
#ifdef VERTEX
|
||||
|
||||
layout (location = 0) in vec3 in_position;
|
||||
layout (location = 1) in vec3 in_color;
|
||||
|
||||
layout (location = 0) out vec4 out_color;
|
||||
|
||||
layout (set = 1, binding = 0) uniform UBO
|
||||
{
|
||||
mat4x4 modelViewProj;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
out_color = vec4(in_color, 1.0);
|
||||
gl_Position = modelViewProj * vec4(in_position, 1.0);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
layout (location = 0) in vec4 in_color;
|
||||
layout (location = 0) out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
out_color = in_color;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user