![cosmonaut](/assets/img/avatar_default.png)
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>
35 lines
606 B
HLSL
35 lines
606 B
HLSL
#if D3D12
|
|
#define REG(reg, space) register(reg, space)
|
|
#else
|
|
#define REG(reg, space) register(reg)
|
|
#endif
|
|
|
|
cbuffer UBO : REG(b0, space1)
|
|
{
|
|
float4x4 ModelViewProj;
|
|
};
|
|
|
|
struct VSInput
|
|
{
|
|
float3 Position : TEXCOORD0;
|
|
float3 Color : TEXCOORD1;
|
|
};
|
|
|
|
struct VSOutput
|
|
{
|
|
float4 Color : TEXCOORD0;
|
|
float4 Position : SV_Position;
|
|
};
|
|
|
|
VSOutput VSMain(VSInput input)
|
|
{
|
|
VSOutput output;
|
|
output.Color = float4(input.Color, 1.0f);
|
|
output.Position = mul(ModelViewProj, float4(input.Position, 1.0f));
|
|
return output;
|
|
}
|
|
|
|
float4 PSMain(VSOutput input) : SV_Target0
|
|
{
|
|
return input.Color;
|
|
} |