summaryrefslogtreecommitdiff
path: root/sample/d3d11/ocean_surface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sample/d3d11/ocean_surface.cpp')
-rw-r--r--sample/d3d11/ocean_surface.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/sample/d3d11/ocean_surface.cpp b/sample/d3d11/ocean_surface.cpp
index ed88415..4bd0dc6 100644
--- a/sample/d3d11/ocean_surface.cpp
+++ b/sample/d3d11/ocean_surface.cpp
@@ -298,7 +298,11 @@ void OceanSurface::renderShaded( ID3D11DeviceContext* pDC,
// Apply data tex SRV
XMMATRIX topDownMatrix;
pDistanceFieldModule->GetWorldToTopDownTextureMatrix( topDownMatrix );
- m_pOceanFX->GetVariableByName("g_WorldToTopDownTextureMatrix")->AsMatrix()->SetMatrix( &topDownMatrix._11 );
+
+ XMFLOAT4X4 tdmStore;
+ XMStoreFloat4x4(&tdmStore, topDownMatrix);
+
+ m_pOceanFX->GetVariableByName("g_WorldToTopDownTextureMatrix")->AsMatrix()->SetMatrix( (FLOAT*)&tdmStore );
m_pOceanFX->GetVariableByName("g_GerstnerSteepness")->AsScalar()->SetFloat( steepness );
m_pOceanFX->GetVariableByName("g_BaseGerstnerAmplitude")->AsScalar()->SetFloat( amplitude );