Added: matrix buffer
Added: world, view & projection matrices Added: delta time calculation Added: quad mesh
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user