File tree Expand file tree Collapse file tree 7 files changed +26
-26
lines changed
src/Cpp/1-getting-started
1-3-2-LoadingMeshes-Refactored/Assets/Shaders
1-3-2-LoadingMeshes/Assets/Shaders
1-3-3-DearImGui/Assets/Shaders
1-3-4-DepthBuffer/Assets/Shaders Expand file tree Collapse file tree 7 files changed +26
-26
lines changed Original file line number Diff line number Diff line change @@ -14,25 +14,25 @@ struct VSOutput
1414
1515cbuffer PerApplication
1616{
17- matrix ProjectionMatrix;
17+ row_major matrix ProjectionMatrix;
1818}
1919
2020cbuffer PerFrame
2121{
22- matrix ViewMatrix;
22+ row_major matrix ViewMatrix;
2323}
2424
2525cbuffer PerObject
2626{
27- matrix WorldMatrix;
27+ row_major matrix WorldMatrix;
2828}
2929
3030VSOutput Main (VSInput input)
3131{
32- const matrix modelViewProjection = mul (ProjectionMatrix , mul (ViewMatrix, WorldMatrix ));
32+ const matrix modelViewProjection = mul (WorldMatrix , mul (ViewMatrix, ProjectionMatrix ));
3333
3434 VSOutput output = (VSOutput)0 ;
35- output.Position = mul (modelViewProjection, float4 (input.Position, 1.0f ));
35+ output.Position = mul (float4 (input.Position, 1.0f ), modelViewProjection );
3636 output.Color = input.Color;
3737 output.Uv = input.Uv;
3838 return output;
Original file line number Diff line number Diff line change @@ -14,25 +14,25 @@ struct VSOutput
1414
1515cbuffer PerApplication : register (b0)
1616{
17- matrix ProjectionMatrix;
17+ row_major matrix ProjectionMatrix;
1818}
1919
2020cbuffer PerFrame : register (b1)
2121{
22- matrix ViewMatrix;
22+ row_major matrix ViewMatrix;
2323}
2424
2525cbuffer PerObject : register (b2)
2626{
27- matrix WorldMatrix;
27+ row_major matrix WorldMatrix;
2828}
2929
3030VSOutput Main (VSInput input)
3131{
32- const matrix modelViewProjection = mul (ProjectionMatrix , mul (ViewMatrix, WorldMatrix ));
32+ const matrix modelViewProjection = mul (WorldMatrix , mul (ViewMatrix, ProjectionMatrix ));
3333
3434 VSOutput output = (VSOutput)0 ;
35- output.Position = mul (modelViewProjection, float4 (input.Position, 1.0f ));
35+ output.Position = mul (float4 (input.Position, 1.0f ), modelViewProjection );
3636 output.Color = input.Color;
3737 output.Uv = input.Uv;
3838 return output;
Original file line number Diff line number Diff line change @@ -14,25 +14,25 @@ struct VSOutput
1414
1515cbuffer PerApplication
1616{
17- matrix ProjectionMatrix;
17+ row_major matrix ProjectionMatrix;
1818}
1919
2020cbuffer PerFrame
2121{
22- matrix ViewMatrix;
22+ row_major matrix ViewMatrix;
2323}
2424
2525cbuffer PerObject
2626{
27- matrix WorldMatrix;
27+ row_major matrix WorldMatrix;
2828}
2929
3030VSOutput Main (VSInput input)
3131{
32- const matrix modelViewProjection = mul (ProjectionMatrix , mul (ViewMatrix, WorldMatrix ));
32+ const matrix modelViewProjection = mul (WorldMatrix , mul (ViewMatrix, ProjectionMatrix ));
3333
3434 VSOutput output = (VSOutput)0 ;
35- output.Position = mul (modelViewProjection, float4 (input.Position, 1.0f ));
35+ output.Position = mul (float4 (input.Position, 1.0f ), modelViewProjection );
3636 output.Color = input.Color;
3737 output.Uv = input.Uv;
3838 return output;
Original file line number Diff line number Diff line change @@ -14,25 +14,25 @@ struct VSOutput
1414
1515cbuffer PerApplication
1616{
17- matrix ProjectionMatrix;
17+ row_major matrix ProjectionMatrix;
1818}
1919
2020cbuffer PerFrame
2121{
22- matrix ViewMatrix;
22+ row_major matrix ViewMatrix;
2323}
2424
2525cbuffer PerObject
2626{
27- matrix WorldMatrix;
27+ row_major matrix WorldMatrix;
2828}
2929
3030VSOutput Main (VSInput input)
3131{
32- const matrix modelViewProjection = mul (ProjectionMatrix , mul (ViewMatrix, WorldMatrix ));
32+ const matrix modelViewProjection = mul (WorldMatrix , mul (ViewMatrix, ProjectionMatrix ));
3333
3434 VSOutput output = (VSOutput)0 ;
35- output.Position = mul (modelViewProjection, float4 (input.Position, 1.0f ));
35+ output.Position = mul (float4 (input.Position, 1.0f ), modelViewProjection );
3636 output.Color = input.Color;
3737 output.Uv = input.Uv;
3838 return output;
Original file line number Diff line number Diff line change @@ -14,25 +14,25 @@ struct VSOutput
1414
1515cbuffer PerApplication
1616{
17- column_major matrix ProjectionMatrix;
17+ row_major matrix ProjectionMatrix;
1818}
1919
2020cbuffer PerFrame
2121{
22- column_major matrix ViewMatrix;
22+ row_major matrix ViewMatrix;
2323}
2424
2525cbuffer PerObject
2626{
27- column_major matrix WorldMatrix;
27+ row_major matrix WorldMatrix;
2828}
2929
3030VSOutput Main (VSInput input)
3131{
3232 const matrix modelViewProjection = mul (WorldMatrix, mul (ViewMatrix, ProjectionMatrix));
3333
3434 VSOutput output = (VSOutput)0 ;
35- output.Position = mul (modelViewProjection, float4 (input.Position, 1.0f ));
35+ output.Position = mul (float4 (input.Position, 1.0f ), modelViewProjection );
3636 output.Color = input.Color;
3737 output.Uv = input.Uv;
3838 return output;
Original file line number Diff line number Diff line change 22
33int main ()
44{
5- RasterizerStateApplication app{ " LearnD3D11 - Depth Buffer " };
5+ RasterizerStateApplication app{ " LearnD3D11 - Rasterizer State " };
66 app.Run ();
77 return 0 ;
88}
Original file line number Diff line number Diff line change 22
33int main ()
44{
5- CameraApplication app{ " LearnD3D11 - Depth Buffer " };
5+ CameraApplication app{ " LearnD3D11 - Camera " };
66 app.Run ();
77 return 0 ;
88}
You can’t perform that action at this time.
0 commit comments