Added: matrix buffer

Added: world, view & projection matrices
Added: delta time calculation
Added: quad mesh
This commit is contained in:
2026-10-12 18:47:53 +02:00
parent daa04be788
commit d2a487a4f6
10 changed files with 139 additions and 12 deletions
@@ -1,6 +1,33 @@
// semantics: https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-semantics
float4 main( float4 pos : POSITION ) : SV_POSITION
cbuffer MatrixBuffer
{
return pos;
float4x4 WorldViewProjectionMatrix;
float4x4 WorldMatrix;
};
struct VertexInput
{
float4 position : POSITION;
float4 color : COLOR;
};
struct VertexOutput
{
float4 position : SV_Position;
float4 color : COLOR;
};
VertexOutput main(VertexInput INPUT)
{
// mul -> matrix multiplication
// * -> number/scalar calculation
//return mul(INPUT.position, WorldViewProjectionMatrix);
VertexOutput OUTPUT;
OUTPUT.position = mul(INPUT.position, WorldViewProjectionMatrix);
OUTPUT.color = INPUT.color;
return OUTPUT;
}