diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2017-12-12 06:43:48 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2017-12-12 06:43:48 +0000 |
| commit | c4bf1a06ce887fe6eafad80c1a2fda4be52388e7 (patch) | |
| tree | 68e209415527f553c2b1f8dd1adf4c6afb57e700 /unityplugin/GhostCubeScene/src | |
| parent | Updated Visual Studio cmake config (diff) | |
| download | DiligentEngine-c4bf1a06ce887fe6eafad80c1a2fda4be52388e7.tar.gz DiligentEngine-c4bf1a06ce887fe6eafad80c1a2fda4be52388e7.zip | |
Added CMake files for Unity plugin & Emulator
Diffstat (limited to 'unityplugin/GhostCubeScene/src')
| -rw-r--r-- | unityplugin/GhostCubeScene/src/GhostCubeScene.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp index 2fb3a97..dd3483f 100644 --- a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp +++ b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp @@ -177,11 +177,11 @@ void GhostCubeScene::Render(UnityRenderingEvent RenderEventFunc, double CurrTime float aspectRatio = 1.0f; float4x4 ReflectionCameraProj = Projection(PI_F / 4.f, aspectRatio, NearPlane, FarPlane, IsDX); auto wvp = CubeWorldView * ReflectionCameraProj; - float ReverseZ = IsDX ? -1.f : +1.f; - SetMatrixFromUnity(wvp._m00, ReverseZ * wvp._m01, wvp._m02, wvp._m03, - wvp._m10, ReverseZ * wvp._m11, wvp._m12, wvp._m13, - wvp._m20, ReverseZ * wvp._m21, wvp._m22, wvp._m23, - wvp._m30, ReverseZ * wvp._m31, wvp._m32, wvp._m33); + float fReverseZ = IsDX ? -1.f : +1.f; + SetMatrixFromUnity(wvp._m00, fReverseZ * wvp._m01, wvp._m02, wvp._m03, + wvp._m10, fReverseZ * wvp._m11, wvp._m12, wvp._m13, + wvp._m20, fReverseZ * wvp._m21, wvp._m22, wvp._m23, + wvp._m30, fReverseZ * wvp._m31, wvp._m32, wvp._m33); SetTexturesFromUnity(m_pRenderTarget->GetNativeHandle(), m_pDepthBuffer->GetNativeHandle()); |
