summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3DBase
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-01-05 06:49:08 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-01-05 06:49:08 +0000
commit6fdc0c110afcc0e2bd6da19ec83ab2f18f746de2 (patch)
treeac889b8414ad0343029c6cb7c6d3faad406f07b0 /Graphics/GraphicsEngineD3DBase
parentUpdated link to documentation (diff)
downloadDiligentCore-6fdc0c110afcc0e2bd6da19ec83ab2f18f746de2.tar.gz
DiligentCore-6fdc0c110afcc0e2bd6da19ec83ab2f18f746de2.zip
Added MatrixFromRows() function to shader definitions
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
-rw-r--r--Graphics/GraphicsEngineD3DBase/include/HLSLDefinitions.fxh5
-rw-r--r--Graphics/GraphicsEngineD3DBase/include/HLSLDefinitions_inc.fxh5
2 files changed, 10 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineD3DBase/include/HLSLDefinitions.fxh b/Graphics/GraphicsEngineD3DBase/include/HLSLDefinitions.fxh
index fd19be08..e5be0b85 100644
--- a/Graphics/GraphicsEngineD3DBase/include/HLSLDefinitions.fxh
+++ b/Graphics/GraphicsEngineD3DBase/include/HLSLDefinitions.fxh
@@ -58,4 +58,9 @@ float BoolToFloat( bool b )
#define MATRIX_ELEMENT(mat, row, col) mat[row][col]
+float4x4 MatrixFromRows(float4 row0, float4 row1, float4 row2, float4 row3)
+{
+ return float4x4(row0, row1, row2, row3);
+}
+
#endif // _HLSL_DEFINITIONS_
diff --git a/Graphics/GraphicsEngineD3DBase/include/HLSLDefinitions_inc.fxh b/Graphics/GraphicsEngineD3DBase/include/HLSLDefinitions_inc.fxh
index 84012ff1..5a441403 100644
--- a/Graphics/GraphicsEngineD3DBase/include/HLSLDefinitions_inc.fxh
+++ b/Graphics/GraphicsEngineD3DBase/include/HLSLDefinitions_inc.fxh
@@ -58,4 +58,9 @@
"\n"
"#define MATRIX_ELEMENT(mat, row, col) mat[row][col]\n"
"\n"
+"float4x4 MatrixFromRows(float4 row0, float4 row1, float4 row2, float4 row3)\n"
+"{\n"
+" return float4x4(row0, row1, row2, row3);\n"
+"}\n"
+"\n"
"#endif // _HLSL_DEFINITIONS_\n"