mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-13 11:32:29 +00:00
chore(build): use SDL3
This commit is contained in:
parent
9d04a35d87
commit
b3c0734a9e
3286 changed files with 866354 additions and 554996 deletions
38
vendor/sdl-3.2.10/test/testgpu/cube.metal
vendored
Normal file
38
vendor/sdl-3.2.10/test/testgpu/cube.metal
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#include <metal_stdlib>
|
||||
using namespace metal;
|
||||
|
||||
struct VSOutput
|
||||
{
|
||||
float4 color [[user(locn0)]];
|
||||
float4 position [[position]];
|
||||
};
|
||||
|
||||
#ifdef VERTEX
|
||||
|
||||
struct UBO
|
||||
{
|
||||
float4x4 modelViewProj;
|
||||
};
|
||||
|
||||
struct VSInput
|
||||
{
|
||||
float3 position [[attribute(0)]];
|
||||
float3 color [[attribute(1)]];
|
||||
};
|
||||
|
||||
vertex VSOutput vs_main(VSInput input [[stage_in]], constant UBO& ubo [[buffer(0)]])
|
||||
{
|
||||
VSOutput output;
|
||||
output.color = float4(input.color, 1.0);
|
||||
output.position = ubo.modelViewProj * float4(input.position, 1.0);
|
||||
return output;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
fragment float4 fs_main(VSOutput input [[stage_in]])
|
||||
{
|
||||
return input.color;
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue