Added reflection and constant buffers to vertex shaders

This commit is contained in:
Simon Lübeß
2020-12-30 18:52:32 +01:00
parent d0c8685ce7
commit 56183c1896
6 changed files with 56 additions and 56 deletions
+10 -2
View File
@@ -1,4 +1,12 @@
cbuffer Constants
cbuffer Constants : register(b0)
{
float4x4 Transform = float4x4(1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1);
}
cbuffer Constants : register(b1)
{
float4 BaseColor;
}
@@ -18,7 +26,7 @@ struct PS_IN
PS_IN VS(VS_IN input)
{
PS_IN output;
output.Position = float4(input.Position, 1);
output.Position = mul(Transform, float4(input.Position, 1));
output.Color = input.Color;
return output;