Add matrices

This commit is contained in:
abdelrahman committed 2026-10-25 18:58:16 +00:00
1 parent f7dfdd9666
commit 06059e197c
5 files changed
+167 -13

No files matched your search

+6 -2
View File
@@ -3,16 +3,20 @@ struct VSInput {
float3 Color;
};
struct ShaderData {
float4x4 mvp;
};
struct VertexOutput {
float3 Color;
float4 sv_position : SV_Position;
};
[shader("vertex")]
VertexOutput vertMain(VSInput input, uint vid : SV_VertexID) {
VertexOutput vertMain(VSInput input, uniform ShaderData *data, uint vid : SV_VertexID) {
VertexOutput output;
output.Color = input.Color;
output.sv_position = float4(input.Pos, 1.0);
output.sv_position = mul(data->mvp, float4(input.Pos, 1.0));
return output;
}