Implemented loading shaders from file.

This commit is contained in:
2024-09-13 11:12:59 +02:00
parent ba49a1e47a
commit d6745226a1
6 changed files with 84 additions and 24 deletions

View File

@@ -0,0 +1,12 @@
struct PS_OUTPUT
{
float4 color : COLOR0;
};
PS_OUTPUT main() : SV_TARGET
{
PS_OUTPUT output;
output.color = float4(0.0, 1.0, 0.0, 1.0);
return output;
}

View File

@@ -0,0 +1,19 @@
struct VS_OUTPUT
{
float4 vPosition : POSITION;
};
static const float2 vertices[3] =
{
float2(-0.5, 0.5),
float2( 0.5, 0.5),
float2( 0.0, -0.5)
};
VS_OUTPUT main(uint vertexID : SV_VertexID)
{
VS_OUTPUT output;
output.vPosition = float4(vertices[vertexID], 0.0, 1.0);
return output;
}