Vertex and index buffers

This commit is contained in:
2025-12-18 02:08:21 +00:00
parent f7d49d8085
commit b0d28c747e
6 changed files with 3248 additions and 16 deletions

View File

@@ -0,0 +1,22 @@
struct VSInput {
float2 inPosition;
float3 inColor;
};
struct VSOutput {
float4 pos : SV_Position;
float3 color;
};
[shader("vertex")]
VSOutput vertMain(VSInput input) {
VSOutput output;
output.color = input.inColor;
output.pos = float4(input.inPosition, 0.0, 1.0);
return output;
}
[shader("fragment")]
float4 fragMain(VSOutput vertIn) : SV_Target {
return float4(vertIn.color, 1.0);
}