diff options
Diffstat (limited to 'LibOVR/Src/CAPI/D3D1X')
54 files changed, 5052 insertions, 937 deletions
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_DistortionRenderer.cpp b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_DistortionRenderer.cpp index fbdee63..6439b57 100644 --- a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_DistortionRenderer.cpp +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_DistortionRenderer.cpp @@ -5,16 +5,16 @@ Content : Distortion renderer instantiation for D3D10 Created : November 11, 2013
Authors : Volga Aksoy, Michael Antonov
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
-http://www.oculusvr.com/licenses/LICENSE-3.1
+http://www.oculusvr.com/licenses/LICENSE-3.2
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_DistortionRenderer.h b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_DistortionRenderer.h index dd697be..a6750f5 100644 --- a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_DistortionRenderer.h +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_DistortionRenderer.h @@ -5,16 +5,16 @@ Content : Distortion renderer header for D3D10 Created : November 11, 2013
Authors : Michael Antonov
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
-http://www.oculusvr.com/licenses/LICENSE-3.1
+http://www.oculusvr.com/licenses/LICENSE-3.2
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,4 +31,4 @@ limitations under the License. #include "CAPI_D3D1X_DistortionRenderer.h"
#undef OVR_D3D_VERSION
-#endif
\ No newline at end of file +#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_HSWDisplay.cpp b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_HSWDisplay.cpp new file mode 100644 index 0000000..33deffa --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_HSWDisplay.cpp @@ -0,0 +1,35 @@ +/************************************************************************************
+
+Filename : CAPI_D3D10_HSWDisplay.cpp
+Content : Implements Health and Safety Warning system.
+Created : July 7, 2014
+Authors : Paul Pedriana
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#define OVR_D3D_VERSION 10
+#include "CAPI_D3D1X_HSWDisplay.cpp"
+#undef OVR_D3D_VERSION
+
+
+
+
+
+
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_HSWDisplay.h b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_HSWDisplay.h new file mode 100644 index 0000000..c681c73 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D10_HSWDisplay.h @@ -0,0 +1,41 @@ +/************************************************************************************
+
+Filename : CAPI_D3D10_HSWDisplay.h
+Content : Implements Health and Safety Warning system.
+Created : July 7, 2014
+Authors : Paul Pedriana
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#ifndef OVR_CAPI_D3D10_HSWDisplay_h
+#define OVR_CAPI_D3D10_HSWDisplay_h
+
+#if !defined(OVR_D3D_VERSION) || ((OVR_D3D_VERSION != 10) && (OVR_D3D_VERSION != 11))
+ #error This header expects OVR_D3D_VERSION to be defined, to 10 or 11.
+#endif
+
+// Due to the similarities between DX10 and DX11, there is a shared implementation of the headers and source
+// which is differentiated only by the OVR_D3D_VERSION define. This define causes D3D_NS (D3D namespace) to
+// be defined to either D3D10 or D3D11, as well as other similar effects.
+#include "CAPI_D3D1X_HSWDisplay.h"
+
+
+#endif // OVR_CAPI_D3D10_HSWDisplay_h
+
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_DistortionRenderer.cpp b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_DistortionRenderer.cpp index 7a2a569..2ba9ccc 100644 --- a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_DistortionRenderer.cpp +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_DistortionRenderer.cpp @@ -5,16 +5,16 @@ Content : Distortion renderer instantiation for D3D11 Created : November 11, 2013
Authors : Volga Aksoy, Michael Antonov
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
-http://www.oculusvr.com/licenses/LICENSE-3.1
+http://www.oculusvr.com/licenses/LICENSE-3.2
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_DistortionRenderer.h b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_DistortionRenderer.h index 4362d50..0216232 100644 --- a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_DistortionRenderer.h +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_DistortionRenderer.h @@ -5,16 +5,16 @@ Content : Distortion renderer header for D3D11 Created : November 11, 2013
Authors : Michael Antonov
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
-http://www.oculusvr.com/licenses/LICENSE-3.1
+http://www.oculusvr.com/licenses/LICENSE-3.2
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,4 +31,4 @@ limitations under the License. #include "CAPI_D3D1X_DistortionRenderer.h"
#undef OVR_D3D_VERSION
-#endif
\ No newline at end of file +#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_HSWDisplay.cpp b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_HSWDisplay.cpp new file mode 100644 index 0000000..2177815 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_HSWDisplay.cpp @@ -0,0 +1,35 @@ +/************************************************************************************
+
+Filename : CAPI_D3D11_HSWDisplay.cpp
+Content : Implements Health and Safety Warning system.
+Created : July 7, 2014
+Authors : Paul Pedriana
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#define OVR_D3D_VERSION 11
+#include "CAPI_D3D1X_HSWDisplay.cpp"
+#undef OVR_D3D_VERSION
+
+
+
+
+
+
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_HSWDisplay.h b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_HSWDisplay.h new file mode 100644 index 0000000..ca896b0 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D11_HSWDisplay.h @@ -0,0 +1,41 @@ +/************************************************************************************
+
+Filename : CAPI_D3D11_HSWDisplay.h
+Content : Implements Health and Safety Warning system.
+Created : July 7, 2014
+Authors : Paul Pedriana
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+#ifndef OVR_CAPI_D3D11_HSWDisplay_h
+#define OVR_CAPI_D3D11_HSWDisplay_h
+
+#if !defined(OVR_D3D_VERSION) || ((OVR_D3D_VERSION != 10) && (OVR_D3D_VERSION != 11))
+ #error This header expects OVR_D3D_VERSION to be defined, to 10 or 11.
+#endif
+
+// Due to the similarities between DX10 and DX11, there is a shared implementation of the headers and source
+// which is differentiated only by the OVR_D3D_VERSION define. This define causes D3D_NS (D3D namespace) to
+// be defined to either D3D10 or D3D11, as well as other similar effects.
+#include "CAPI_D3D1X_HSWDisplay.h"
+
+
+#endif // OVR_CAPI_D3D11_HSWDisplay_h
+
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_DistortionRenderer.cpp b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_DistortionRenderer.cpp index 60e2c88..04cfd07 100644 --- a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_DistortionRenderer.cpp +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_DistortionRenderer.cpp @@ -3,18 +3,18 @@ Filename : CAPI_D3D1X_DistortionRenderer.cpp
Content : Experimental distortion renderer
Created : November 11, 2013
-Authors : Volga Aksoy, Michael Antonov
+Authors : Volga Aksoy, Michael Antonov, Shariq Hashme
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
-http://www.oculusvr.com/licenses/LICENSE-3.1
+http://www.oculusvr.com/licenses/LICENSE-3.2
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,26 +27,33 @@ limitations under the License. #include "CAPI_D3D1X_DistortionRenderer.h"
#include "../../OVR_CAPI_D3D.h"
+#include "../CAPI_HMDState.h"
+#include "../../Kernel/OVR_Color.h"
namespace OVR { namespace CAPI { namespace D3D_NS {
-#include "../Shaders/Distortion_vs.h"
-#include "../Shaders/Distortion_vs_refl.h"
-#include "../Shaders/Distortion_ps.h"
-#include "../Shaders/Distortion_ps_refl.h"
-#include "../Shaders/DistortionChroma_vs.h"
-#include "../Shaders/DistortionChroma_vs_refl.h"
-#include "../Shaders/DistortionChroma_ps.h"
-#include "../Shaders/DistortionChroma_ps_refl.h"
-#include "../Shaders/DistortionTimewarp_vs.h"
-#include "../Shaders/DistortionTimewarp_vs_refl.h"
-#include "../Shaders/DistortionTimewarpChroma_vs.h"
-#include "../Shaders/DistortionTimewarpChroma_vs_refl.h"
-
-#include "../Shaders/SimpleQuad_vs.h"
-#include "../Shaders/SimpleQuad_vs_refl.h"
-#include "../Shaders/SimpleQuad_ps.h"
-#include "../Shaders/SimpleQuad_ps_refl.h"
+#include "Shaders/Distortion_vs.h"
+#include "Shaders/Distortion_vs_refl.h"
+#include "Shaders/Distortion_ps.h"
+#include "Shaders/Distortion_ps_refl.h"
+#include "Shaders/DistortionChroma_vs.h"
+#include "Shaders/DistortionChroma_vs_refl.h"
+#include "Shaders/DistortionChroma_ps.h"
+#include "Shaders/DistortionChroma_ps_refl.h"
+#include "Shaders/DistortionTimewarp_vs.h"
+#include "Shaders/DistortionTimewarp_vs_refl.h"
+#include "Shaders/DistortionTimewarpChroma_vs.h"
+#include "Shaders/DistortionTimewarpChroma_vs_refl.h"
+#include "Shaders/DistortionCS2x2.h"
+#include "Shaders/DistortionCS2x2_refl.h"
+
+#include "Shaders/SimpleQuad_vs.h"
+#include "Shaders/SimpleQuad_vs_refl.h"
+#include "Shaders/SimpleQuad_ps.h"
+#include "Shaders/SimpleQuad_ps_refl.h"
+
+#include <initguid.h>
+DEFINE_GUID(IID_OVRDXGISwapchain, 0x868f9b4f, 0xe427, 0x46ed, 0xb0, 0x94, 0x66, 0xd1, 0x3b, 0xb, 0x48, 0xf7);
// Distortion pixel shader lookup.
// Bit 0: Chroma Correction
@@ -56,7 +63,7 @@ enum { DistortionVertexShaderBitMask = 3,
DistortionVertexShaderCount = DistortionVertexShaderBitMask + 1,
DistortionPixelShaderBitMask = 1,
- DistortionPixelShaderCount = DistortionPixelShaderBitMask + 1
+ DistortionPixelShaderCount = DistortionPixelShaderBitMask + 1,
};
struct PrecompiledShader
@@ -83,8 +90,21 @@ static PrecompiledShader DistortionVertexShaderLookup[DistortionVertexShaderCoun static PrecompiledShader DistortionPixelShaderLookup[DistortionPixelShaderCount] =
{
PCS_NOREFL(Distortion_ps),
- PCS_NOREFL(DistortionChroma_ps)
+ PCS_REFL__(DistortionChroma_ps)
+};
+
+enum
+{
+ DistortionComputeShader2x2 = 0,
+ DistortionComputeShader2x2Pentile,
+ DistortionComputeShaderCount
};
+static PrecompiledShader DistortionComputeShaderLookup[DistortionComputeShaderCount] =
+{
+ PCS_REFL__(DistortionCS2x2)
+};
+
+
void DistortionShaderBitIndexCheck()
{
@@ -94,15 +114,24 @@ void DistortionShaderBitIndexCheck() -struct DistortionVertex
+struct DistortionVertex // Must match the VB description DistortionMeshVertexDesc
{
- Vector2f Pos;
- Vector2f TexR;
- Vector2f TexG;
- Vector2f TexB;
+ Vector2f ScreenPosNDC;
+ Vector2f TanEyeAnglesR;
+ Vector2f TanEyeAnglesG;
+ Vector2f TanEyeAnglesB;
Color Col;
};
+struct DistortionComputePin // Must match the ones declared in DistortionCS*.csh
+{
+ Vector2f TanEyeAnglesR;
+ Vector2f TanEyeAnglesG;
+ Vector2f TanEyeAnglesB;
+ Color Col;
+ int padding[1]; // Aligns to power-of-two boundary, increases performance significantly.
+};
+
// Vertex type; same format is used for all shapes for simplicity.
// Shapes are built by adding vertices to Model.
@@ -135,6 +164,8 @@ DistortionRenderer::DistortionRenderer(ovrHmd hmd, FrameTimeManager& timeManager const HMDRenderState& renderState)
: CAPI::DistortionRenderer(ovrRenderAPI_D3D11, hmd, timeManager, renderState)
{
+ SrgbBackBuffer = false;
+
EyeTextureSize[0] = Sizei(0);
EyeRenderViewport[0] = Recti();
EyeTextureSize[1] = Sizei(0);
@@ -155,8 +186,7 @@ CAPI::DistortionRenderer* DistortionRenderer::Create(ovrHmd hmd, }
-bool DistortionRenderer::Initialize(const ovrRenderAPIConfig* apiConfig,
- unsigned distortionCaps)
+bool DistortionRenderer::Initialize(const ovrRenderAPIConfig* apiConfig)
{
const ovrD3D1X(Config)* config = (const ovrD3D1X(Config)*)apiConfig;
@@ -171,24 +201,48 @@ bool DistortionRenderer::Initialize(const ovrRenderAPIConfig* apiConfig, if (!config->D3D_NS.pDevice || !config->D3D_NS.pBackBufferRT)
return false;
-
+
+ if (System::DirectDisplayEnabled())
+ {
+ Ptr<IUnknown> ovrSwapChain;
+ if (config->D3D_NS.pSwapChain->QueryInterface(IID_OVRDXGISwapchain, (void**)&ovrSwapChain.GetRawRef()) == E_NOINTERFACE)
+ {
+ OVR_DEBUG_LOG_TEXT(("ovr_Initialize() or ovr_InitializeRenderingShim() wasn't called before DXGISwapChain was created."));
+ }
+ }
+
RParams.pDevice = config->D3D_NS.pDevice;
RParams.pContext = D3DSELECT_10_11(config->D3D_NS.pDevice, config->D3D_NS.pDeviceContext);
RParams.pBackBufferRT = config->D3D_NS.pBackBufferRT;
+#if (OVR_D3D_VERSION>=11)
+ RParams.pBackBufferUAV = config->D3D_NS.pBackBufferUAV;
+#else
+ RParams.pBackBufferUAV = NULL;
+#endif
RParams.pSwapChain = config->D3D_NS.pSwapChain;
- RParams.RTSize = config->D3D_NS.Header.RTSize;
+ RParams.BackBufferSize = config->D3D_NS.Header.BackBufferSize;
RParams.Multisample = config->D3D_NS.Header.Multisample;
GfxState = *new GraphicsState(RParams.pContext);
- DistortionCaps = distortionCaps;
+ D3D1X_(RENDER_TARGET_VIEW_DESC) backBufferDesc;
+ RParams.pBackBufferRT->GetDesc(&backBufferDesc);
+ SrgbBackBuffer = (backBufferDesc.Format == DXGI_FORMAT_R8G8B8A8_UNORM_SRGB) ||
+ (backBufferDesc.Format == DXGI_FORMAT_B8G8R8A8_UNORM_SRGB) ||
+ (backBufferDesc.Format == DXGI_FORMAT_B8G8R8X8_UNORM_SRGB);
- //DistortionWarper.SetVsync((hmdCaps & ovrHmdCap_NoVSync) ? false : true);
+
+#if 0 // enable related section in DistortionChroma.psh shader
+ // aniso requires proper sRGB sampling
+ SampleMode hqFilter = (RState.DistortionCaps & ovrDistortionCap_HqDistortion) ? Sample_Anisotropic : Sample_Linear;
+#else
+ SampleMode hqFilter = Sample_Linear;
+#endif
pEyeTextures[0] = *new Texture(&RParams, Texture_RGBA, Sizei(0),
- getSamplerState(Sample_Linear|Sample_ClampBorder));
+ getSamplerState(hqFilter|Sample_ClampBorder));
pEyeTextures[1] = *new Texture(&RParams, Texture_RGBA, Sizei(0),
- getSamplerState(Sample_Linear|Sample_ClampBorder));
+ getSamplerState(hqFilter|Sample_ClampBorder));
initBuffersAndShaders();
@@ -199,8 +253,11 @@ bool DistortionRenderer::Initialize(const ovrRenderAPIConfig* apiConfig, rs.CullMode = D3D1X_(CULL_BACK);
rs.DepthClipEnable = true;
rs.FillMode = D3D1X_(FILL_SOLID);
+ Rasterizer = NULL;
RParams.pDevice->CreateRasterizerState(&rs, &Rasterizer.GetRawRef());
+ initOverdrive();
+
// TBD: Blend state.. not used?
// We'll want to turn off blending
@@ -211,8 +268,53 @@ bool DistortionRenderer::Initialize(const ovrRenderAPIConfig* apiConfig, return true;
}
+void DistortionRenderer::initOverdrive()
+{
+ if(RState.DistortionCaps & ovrDistortionCap_Overdrive)
+ {
+ LastUsedOverdriveTextureIndex = 0;
+
+ D3D1X_(RENDER_TARGET_VIEW_DESC) backBufferDesc;
+ RParams.pBackBufferRT->GetDesc(&backBufferDesc);
+
+ for (int i = 0; i < NumOverdriveTextures; i++)
+ {
+ pOverdriveTextures[i] = *new Texture(&RParams, Texture_RGBA, RParams.BackBufferSize,
+ getSamplerState(Sample_Linear|Sample_ClampBorder));
+
+ D3D1X_(TEXTURE2D_DESC) dsDesc;
+ dsDesc.Width = RParams.BackBufferSize.w;
+ dsDesc.Height = RParams.BackBufferSize.h;
+ dsDesc.MipLevels = 1;
+ dsDesc.ArraySize = 1;
+ dsDesc.Format = backBufferDesc.Format;
+ dsDesc.SampleDesc.Count = 1;
+ dsDesc.SampleDesc.Quality = 0;
+ dsDesc.Usage = D3D1X_(USAGE_DEFAULT);
+ dsDesc.BindFlags = D3D1X_(BIND_SHADER_RESOURCE) | D3D1X_(BIND_RENDER_TARGET);
+ dsDesc.CPUAccessFlags = 0;
+ dsDesc.MiscFlags = 0;
+
+ HRESULT hr = RParams.pDevice->CreateTexture2D(&dsDesc, NULL, &pOverdriveTextures[i]->Tex.GetRawRef());
+ if (FAILED(hr))
+ {
+ OVR_DEBUG_LOG_TEXT(("Failed to create overdrive texture."));
+ // Remove overdrive flag since we failed to create the texture
+ LastUsedOverdriveTextureIndex = -1; // disables feature
+ break;
+ }
+
+ RParams.pDevice->CreateShaderResourceView(pOverdriveTextures[i]->Tex, NULL, &pOverdriveTextures[i]->TexSv.GetRawRef());
+ RParams.pDevice->CreateRenderTargetView(pOverdriveTextures[i]->Tex, NULL, &pOverdriveTextures[i]->TexRtv.GetRawRef());
+ }
+ }
+ else
+ {
+ LastUsedOverdriveTextureIndex = -1;
+ }
+}
-void DistortionRenderer::SubmitEye(int eyeId, ovrTexture* eyeTexture)
+void DistortionRenderer::SubmitEye(int eyeId, const ovrTexture* eyeTexture)
{
const ovrD3D1X(Texture)* tex = (const ovrD3D1X(Texture)*)eyeTexture;
@@ -229,44 +331,64 @@ void DistortionRenderer::SubmitEye(int eyeId, ovrTexture* eyeTexture) EyeTextureSize[eyeId], EyeRenderViewport[eyeId],
UVScaleOffset[eyeId]);
+ if (RState.DistortionCaps & ovrDistortionCap_FlipInput)
+ {
+ UVScaleOffset[eyeId][0].y = -UVScaleOffset[eyeId][0].y;
+ UVScaleOffset[eyeId][1].y = 1.0f - UVScaleOffset[eyeId][1].y;
+ }
+
pEyeTextures[eyeId]->UpdatePlaceholderTexture(tex->D3D_NS.pTexture, tex->D3D_NS.pSRView,
tex->D3D_NS.Header.TextureSize);
}
}
-void DistortionRenderer::EndFrame(bool swapBuffers, unsigned char* latencyTesterDrawColor,
- unsigned char* latencyTester2DrawColor)
+void DistortionRenderer::renderEndFrame()
{
- if (!TimeManager.NeedDistortionTimeMeasurement())
- {
- if (RState.DistortionCaps & ovrDistortionCap_TimeWarp)
- {
- // Wait for timewarp distortion if it is time and Gpu idle
- FlushGpuAndWaitTillTime(TimeManager.GetFrameTiming().TimewarpPointTime);
- }
+ renderDistortion(pEyeTextures[0], pEyeTextures[1]);
+
+ if(RegisteredPostDistortionCallback)
+ RegisteredPostDistortionCallback(RParams.pContext);
- renderDistortion(pEyeTextures[0], pEyeTextures[1]);
+ if(LatencyTest2Active)
+ {
+ renderLatencyPixel(LatencyTest2DrawColor);
}
- else
+}
+
+void DistortionRenderer::EndFrame(bool swapBuffers)
+{
+ // Don't spin if we are explicitly asked not to
+ if ((RState.DistortionCaps & ovrDistortionCap_TimeWarp) &&
+ !(RState.DistortionCaps & ovrDistortionCap_ProfileNoTimewarpSpinWaits))
{
- // If needed, measure distortion time so that TimeManager can better estimate
- // latency-reducing time-warp wait timing.
- WaitUntilGpuIdle();
- double distortionStartTime = ovr_GetTimeInSeconds();
+ if (!TimeManager.NeedDistortionTimeMeasurement())
+ {
+ // Wait for timewarp distortion if it is time and Gpu idle
+ FlushGpuAndWaitTillTime(TimeManager.GetFrameTiming().TimewarpPointTime);
+
+ renderEndFrame();
+ }
+ else
+ {
+ // If needed, measure distortion time so that TimeManager can better estimate
+ // latency-reducing time-warp wait timing.
+ WaitUntilGpuIdle();
+ double distortionStartTime = ovr_GetTimeInSeconds();
- renderDistortion(pEyeTextures[0], pEyeTextures[1]);
+ renderEndFrame();
- WaitUntilGpuIdle();
- TimeManager.AddDistortionTimeMeasurement(ovr_GetTimeInSeconds() - distortionStartTime);
+ WaitUntilGpuIdle();
+ TimeManager.AddDistortionTimeMeasurement(ovr_GetTimeInSeconds() - distortionStartTime);
+ }
}
-
- if(latencyTesterDrawColor)
+ else
{
- renderLatencyQuad(latencyTesterDrawColor);
+ renderEndFrame();
}
- else if(latencyTester2DrawColor)
+
+ if(LatencyTestActive)
{
- renderLatencyPixel(latencyTester2DrawColor);
+ renderLatencyQuad(LatencyTestDrawColor);
}
if (swapBuffers)
@@ -278,7 +400,12 @@ void DistortionRenderer::EndFrame(bool swapBuffers, unsigned char* latencyTester // Force GPU to flush the scene, resulting in the lowest possible latency.
// It's critical that this flush is *after* present.
- WaitUntilGpuIdle();
+ // With the display driver this flush is obsolete and theoretically should
+ // be a no-op.
+ // Doesn't need to be done if running through the Oculus driver.
+ if (RState.OurHMDInfo.InCompatibilityMode &&
+ !(RState.DistortionCaps & ovrDistortionCap_ProfileNoTimewarpSpinWaits))
+ WaitUntilGpuIdle();
}
else
{
@@ -312,99 +439,180 @@ void DistortionRenderer::WaitUntilGpuIdle() double DistortionRenderer::FlushGpuAndWaitTillTime(double absTime)
{
- double initialTime = ovr_GetTimeInSeconds();
- if (initialTime >= absTime)
- return 0.0;
-
- // Flush and Stall CPU while waiting for GPU to complete rendering all of the queued draw calls
- D3D1x_QUERY_DESC queryDesc = { D3D1X_(QUERY_EVENT), 0 };
- Ptr<ID3D1xQuery> query;
- BOOL done = FALSE;
- bool callGetData = false;
-
- if (RParams.pDevice->CreateQuery(&queryDesc, &query.GetRawRef()) == S_OK)
- {
- D3DSELECT_10_11(query->End(),
- RParams.pContext->End(query));
- callGetData = true;
- }
-
- double newTime = initialTime;
- volatile int i;
-
- while (newTime < absTime)
- {
- if (callGetData)
- {
- // GetData will returns S_OK for both done == TRUE or FALSE.
- // Stop calling GetData on failure.
- callGetData = !FAILED(D3DSELECT_10_11(query->GetData(&done, sizeof(BOOL), 0),
- RParams.pContext->GetData(query, &done, sizeof(BOOL), 0))) && !done;
- }
- else
- {
- for (int j = 0; j < 50; j++)
- i = 0;
- }
- newTime = ovr_GetTimeInSeconds();
- }
-
- // How long we waited
- return newTime - initialTime;
+ RParams.pContext->Flush();
+ return WaitTillTime(absTime);
}
void DistortionRenderer::initBuffersAndShaders()
{
- for ( int eyeNum = 0; eyeNum < 2; eyeNum++ )
+ if ( RState.DistortionCaps & ovrDistortionCap_ComputeShader )
{
- // Allocate & generate distortion mesh vertices.
- ovrDistortionMesh meshData;
-
-// double startT = ovr_GetTimeInSeconds();
-
- if (!ovrHmd_CreateDistortionMesh( HMD,
- RState.EyeRenderDesc[eyeNum].Eye,
- RState.EyeRenderDesc[eyeNum].Fov,
- RState.DistortionCaps,
- &meshData) )
- {
- OVR_ASSERT(false);
- continue;
+ // Compute shader distortion grid.
+ // TODO - only do this if the CS is actually enabled?
+ for ( int eyeNum = 0; eyeNum < 2; eyeNum++ )
+ {
+ // Compute shader setup of regular grid.
+ DistortionMeshVBs[eyeNum] = NULL;
+ DistortionMeshIBs[eyeNum] = NULL;
+
+ // These constants need to match those declared in the shader in DistortionCS*.csh
+ const int gridSizeInPixels = 16;
+ const int pinsPerEdge = 128;
+
+
+ // TODO: clean up this mess!
+ HMDState* hmds = (HMDState*)HMD->Handle;
+ ovrEyeType eyeType = RState.EyeRenderDesc[eyeNum].Eye;
+ ovrFovPort fov = RState.EyeRenderDesc[eyeNum].Fov;
+
+ const HmdRenderInfo& hmdri = hmds->RenderState.RenderInfo;
+ DistortionRenderDesc& distortion = hmds->RenderState.Distortion[eyeType];
+
+
+ // Find the mapping from TanAngle space to target NDC space.
+ ScaleAndOffset2D eyeToSourceNDC = CreateNDCScaleAndOffsetFromFov(fov);
+
+ //const StereoEyeParams &stereoParams = ( eyeNum == 0 ) ? stereoParamsLeft : stereoParamsRight;
+ OVR_ASSERT ( gridSizeInPixels * (pinsPerEdge-1) > hmdri.ResolutionInPixels.w/2 );
+ OVR_ASSERT ( gridSizeInPixels * (pinsPerEdge-1) > hmdri.ResolutionInPixels.h );
+ DistortionComputePin Verts[pinsPerEdge*pinsPerEdge];
+ // Vertices are laid out in a vertical scanline pattern,
+ // scanning right to left, then within each scan going top to bottom, like DK2.
+ // If we move to a different panel orientation, we may need to flip this around.
+ int vertexNum = 0;
+ for ( int x = 0; x < pinsPerEdge; x++ )
+ {
+ for ( int y = 0; y < pinsPerEdge; y++ )
+ {
+ int pixX = x * gridSizeInPixels;
+ int pixY = y * gridSizeInPixels;
+ #if 0
+ // Simple version, ignoring pentile offsets
+ Vector2f screenPosNdc;
+ screenPosNdc.x = 2.0f * ( 0.5f - ( (float)pixX / (hmdri.ResolutionInPixels.w/2) ) ); // Note signs!
+ screenPosNdc.y = 2.0f * ( -0.5f + ( (float)pixY / hmdri.ResolutionInPixels.h ) ); // Note signs!
+
+ DistortionMeshVertexData vertex = DistortionMeshMakeVertex ( screenPosNdc,
+ ( eyeNum == 1 ),
+ hmdri,
+ distortion,
+ eyeToSourceNDC );
+ DistortionComputePin *pCurVert = &(Verts[vertexNum]);
+ pCurVert->TanEyeAnglesR = vertex.TanEyeAnglesR;
+ pCurVert->TanEyeAnglesG = vertex.TanEyeAnglesG;
+ pCurVert->TanEyeAnglesB = vertex.TanEyeAnglesB;
+ #else
+ // Pentile offsets are messy.
+ Vector2f screenPos[3]; // R=0, G=1, B=2
+ DistortionMeshVertexData vertexRGB[3];
+ screenPos[1] = Vector2f ( (float)pixX, (float)pixY );
+ screenPos[0] = screenPos[1];
+ screenPos[2] = screenPos[1];
+
+ if ( ( hmds->RenderState.EnabledHmdCaps & ovrHmdCap_DirectPentile ) != 0 )
+ {
+ // Doing direct display, so enable the pentile offsets.
+ screenPos[0] = screenPos[1] + hmdri.PelOffsetR;
+ screenPos[2] = screenPos[1] + hmdri.PelOffsetB;
+ }
+
+ for ( int i = 0; i < 3; i++ )
+ {
+ Vector2f screenPosNdc;
+ screenPosNdc.x = 2.0f * ( 0.5f - ( screenPos[i].x / (hmdri.ResolutionInPixels.w/2) ) ); // Note signs!
+ screenPosNdc.y = 2.0f * ( -0.5f + ( screenPos[i].y / hmdri.ResolutionInPixels.h ) ); // Note signs!
+ vertexRGB[i] = DistortionMeshMakeVertex ( screenPosNdc,
+ ( eyeNum == 1 ),
+ hmdri,
+ distortion,
+ eyeToSourceNDC );
+ }
+ // Most data (fade, TW interpolate, etc) comes from the green channel.
+ DistortionMeshVertexData vertex = vertexRGB[1];
+ DistortionComputePin *pCurVert = &(Verts[vertexNum]);
+ pCurVert->TanEyeAnglesR = vertexRGB[0].TanEyeAnglesR;
+ pCurVert->TanEyeAnglesG = vertexRGB[1].TanEyeAnglesG;
+ pCurVert->TanEyeAnglesB = vertexRGB[2].TanEyeAnglesB;
+ #endif
+
+ // vertex.Shade will go negative beyond the edges to produce correct intercept with the 0.0 plane.
+ // We want to preserve this, so bias and offset to fit [-1,+1] in a byte.
+ // The reverse wll be done in the shader.
+ float shade = Alg::Clamp ( vertex.Shade * 0.5f + 0.5f, 0.0f, 1.0f );
+ pCurVert->Col.R = (OVR::UByte)( floorf ( shade * 255.999f ) );
+ pCurVert->Col.G = pCurVert->Col.R;
+ pCurVert->Col.B = pCurVert->Col.R;
+ pCurVert->Col.A = (OVR::UByte)( floorf ( vertex.TimewarpLerp * 255.999f ) );
+
+ vertexNum++;
+ }
+ }
+ DistortionPinBuffer[eyeNum] = *new Buffer(&RParams);
+ DistortionPinBuffer[eyeNum]->Data ( Buffer_Compute, Verts, vertexNum * sizeof(Verts[0]), sizeof(Verts[0]) );
}
-// double deltaT = ovr_GetTimeInSeconds() - startT;
-// LogText("GenerateDistortion time = %f\n", deltaT);
-
- // Now parse the vertex data and create a render ready vertex buffer from it
- DistortionVertex * pVBVerts = (DistortionVertex*)OVR_ALLOC ( sizeof(DistortionVertex) * meshData.VertexCount );
- DistortionVertex * pCurVBVert = pVBVerts;
- ovrDistortionVertex* pCurOvrVert = meshData.pVertexData;
-
- for ( unsigned vertNum = 0; vertNum < meshData.VertexCount; vertNum++ )
+ }
+ else
+ {
+ for ( int eyeNum = 0; eyeNum < 2; eyeNum++ )
{
- pCurVBVert->Pos.x = pCurOvrVert->Pos.x;
- pCurVBVert->Pos.y = pCurOvrVert->Pos.y;
- pCurVBVert->TexR = (*(Vector2f*)&pCurOvrVert->TexR);
- pCurVBVert->TexG = (*(Vector2f*)&pCurOvrVert->TexG);
- pCurVBVert->TexB = (*(Vector2f*)&pCurOvrVert->TexB);
- // Convert [0.0f,1.0f] to [0,255]
- pCurVBVert->Col.R = (OVR::UByte)( pCurOvrVert->VignetteFactor * 255.99f );
- pCurVBVert->Col.G = pCurVBVert->Col.R;
- pCurVBVert->Col.B = pCurVBVert->Col.R;
- pCurVBVert->Col.A = (OVR::UByte)( pCurOvrVert->TimeWarpFactor * 255.99f );;
- pCurOvrVert++;
- pCurVBVert++;
+ // Allocate & generate distortion mesh vertices.
+ DistortionPinBuffer[eyeNum] = NULL;
+
+ ovrDistortionMesh meshData;
+
+ // double startT = ovr_GetTimeInSeconds();
+
+ if (!ovrHmd_CreateDistortionMesh( HMD,
+ RState.EyeRenderDesc[eyeNum].Eye,
+ RState.EyeRenderDesc[eyeNum].Fov,
+ RState.DistortionCaps,
+ &meshData) )
+ {
+ OVR_ASSERT(false);
+ continue;
+ }
+
+ // double deltaT = ovr_GetTimeInSeconds() - startT;
+ // LogText("GenerateDistortion time = %f\n", deltaT);
+
+ // Now parse the vertex data and create a render ready vertex buffer from it
+ DistortionVertex * pVBVerts = (DistortionVertex*)OVR_ALLOC ( sizeof(DistortionVertex) * meshData.VertexCount );
+ DistortionVertex * pCurVBVert = pVBVerts;
+ ovrDistortionVertex* pCurOvrVert = meshData.pVertexData;
+
+ for ( unsigned vertNum = 0; vertNum < meshData.VertexCount; vertNum++ )
+ {
+ pCurVBVert->ScreenPosNDC.x = pCurOvrVert->ScreenPosNDC.x;
+ pCurVBVert->ScreenPosNDC.y = pCurOvrVert->ScreenPosNDC.y;
+ pCurVBVert->TanEyeAnglesR = (*(Vector2f*)&pCurOvrVert->TanEyeAnglesR);
+ pCurVBVert->TanEyeAnglesG = (*(Vector2f*)&pCurOvrVert->TanEyeAnglesG);
+ pCurVBVert->TanEyeAnglesB = (*(Vector2f*)&pCurOvrVert->TanEyeAnglesB);
+
+ // Convert [0.0f,1.0f] to [0,255]
+ if (RState.DistortionCaps & ovrDistortionCap_Vignette)
+ pCurVBVert->Col.R = (uint8_t)( Alg::Max ( pCurOvrVert->VignetteFactor, 0.0f ) * 255.99f );
+ else
+ pCurVBVert->Col.R = 255;
+
+ pCurVBVert->Col.G = pCurVBVert->Col.R;
+ pCurVBVert->Col.B = pCurVBVert->Col.R;
+ pCurVBVert->Col.A = (uint8_t)( pCurOvrVert->TimeWarpFactor * 255.99f );
+ pCurOvrVert++;
+ pCurVBVert++;
+ }
+
+ DistortionMeshVBs[eyeNum] = *new Buffer(&RParams);
+ DistortionMeshVBs[eyeNum]->Data(Buffer_Vertex | Buffer_ReadOnly, pVBVerts, sizeof(DistortionVertex)* meshData.VertexCount);
+ DistortionMeshIBs[eyeNum] = *new Buffer(&RParams);
+ DistortionMeshIBs[eyeNum]->Data(Buffer_Index | Buffer_ReadOnly, meshData.pIndexData, (sizeof(INT16)* meshData.IndexCount));
+
+ OVR_FREE ( pVBVerts );
+ ovrHmd_DestroyDistortionMesh( &meshData );
}
-
- DistortionMeshVBs[eyeNum] = *new Buffer(&RParams);
- DistortionMeshVBs[eyeNum]->Data(Buffer_Vertex | Buffer_ReadOnly, pVBVerts, sizeof(DistortionVertex)* meshData.VertexCount);
- DistortionMeshIBs[eyeNum] = *new Buffer(&RParams);
- DistortionMeshIBs[eyeNum]->Data(Buffer_Index | Buffer_ReadOnly, meshData.pIndexData, (sizeof(INT16)* meshData.IndexCount));
-
- OVR_FREE ( pVBVerts );
- ovrHmd_DestroyDistortionMesh( &meshData );
}
+
// Uniform buffers
for(int i = 0; i < Shader_Count; i++)
{
@@ -417,43 +625,166 @@ void DistortionRenderer::initBuffersAndShaders() void DistortionRenderer::renderDistortion(Texture* leftEyeTexture, Texture* rightEyeTexture)
{
+
+#if (OVR_D3D_VERSION == 10)
+ RParams.pContext->GSSetShader(NULL);
+#else // d3d 11
+ RParams.pContext->HSSetShader(NULL, NULL, 0);
+ RParams.pContext->DSSetShader(NULL, NULL, 0);
+ RParams.pContext->GSSetShader(NULL, NULL, 0);
+#endif
+
RParams.pContext->RSSetState(Rasterizer);
- RParams.pContext->OMSetRenderTargets(1, &RParams.pBackBufferRT, 0);
-
- setViewport(Recti(0,0, RParams.RTSize.w, RParams.RTSize.h));
-
+ bool overdriveActive = IsOverdriveActive();
+ int currOverdriveTextureIndex = -1;
+
+ if(overdriveActive)
+ {
+ currOverdriveTextureIndex = (LastUsedOverdriveTextureIndex + 1) % NumOverdriveTextures;
+ ID3D1xRenderTargetView* distortionRtv = pOverdriveTextures[currOverdriveTextureIndex]->TexRtv.GetRawRef();
+ ID3D1xRenderTargetView* mrtRtv[2] = {distortionRtv, RParams.pBackBufferRT};
+ RParams.pContext->OMSetRenderTargets(2, mrtRtv, 0);
+
+ RParams.pContext->ClearRenderTargetView(distortionRtv, RState.ClearColor);
+ }
+ else
+ {
+ RParams.pContext->OMSetRenderTargets(1, &RParams.pBackBufferRT, 0);
+ }
+
// Not affected by viewport.
RParams.pContext->ClearRenderTargetView(RParams.pBackBufferRT, RState.ClearColor);
+ setViewport(Recti(0,0, RParams.BackBufferSize.w, RParams.BackBufferSize.h));
+
+
for(int eyeNum = 0; eyeNum < 2; eyeNum++)
- {
+ {
ShaderFill distortionShaderFill(DistortionShader);
- distortionShaderFill.SetTexture(0, eyeNum == 0 ? leftEyeTexture : rightEyeTexture);
+ distortionShaderFill.SetTexture(0, eyeNum == 0 ? leftEyeTexture : rightEyeTexture, Shader_Pixel);
+
+ if(RState.DistortionCaps & ovrDistortionCap_HqDistortion)
+ {
+ static float aaDerivMult = 1.0f;
+ DistortionShader->SetUniform1f("AaDerivativeMult", aaDerivMult);
+ }
+ else
+ {
+ // 0.0 disables high quality anti-aliasing
+ DistortionShader->SetUniform1f("AaDerivativeMult", -1.0f);
+ }
+
+ if(overdriveActive)
+ {
+ distortionShaderFill.SetTexture(1, pOverdriveTextures[LastUsedOverdriveTextureIndex], Shader_Pixel);
+
+ float overdriveScaleRegularRise;
+ float overdriveScaleRegularFall;
+ GetOverdriveScales(overdriveScaleRegularRise, overdriveScaleRegularFall);
+ DistortionShader->SetUniform2f("OverdriveScales", overdriveScaleRegularRise, overdriveScaleRegularFall);
+ }
+ else
+ {
+ // -1.0f disables PLO
+ DistortionShader->SetUniform2f("OverdriveScales", -1.0f, -1.0f);
+ }
+
distortionShaderFill.SetInputLayout(DistortionVertexIL);
DistortionShader->SetUniform2f("EyeToSourceUVScale", UVScaleOffset[eyeNum][0].x, UVScaleOffset[eyeNum][0].y);
DistortionShader->SetUniform2f("EyeToSourceUVOffset", UVScaleOffset[eyeNum][1].x, UVScaleOffset[eyeNum][1].y);
- if (DistortionCaps & ovrDistortionCap_TimeWarp)
+
+ if (RState.DistortionCaps & ovrDistortionCap_TimeWarp)
{
- ovrMatrix4f timeWarpMatrices[2];
+ ovrMatrix4f timeWarpMatrices[2];
ovrHmd_GetEyeTimewarpMatrices(HMD, (ovrEyeType)eyeNum,
RState.EyeRenderPoses[eyeNum], timeWarpMatrices);
- // Feed identity like matrices in until we get proper timewarp calculation going on
- DistortionShader->SetUniform4x4f("EyeRotationStart", Matrix4f(timeWarpMatrices[0]));
- DistortionShader->SetUniform4x4f("EyeRotationEnd", Matrix4f(timeWarpMatrices[1]));
-
- renderPrimitives(&distortionShaderFill, DistortionMeshVBs[eyeNum], DistortionMeshIBs[eyeNum],
- NULL, 0, (int)DistortionMeshVBs[eyeNum]->GetSize(), Prim_Triangles);
+ if (RState.DistortionCaps & ovrDistortionCap_ComputeShader)
+ {
+ DistortionShader->SetUniform3x3f("EyeRotationStart", Matrix4f(timeWarpMatrices[0]));
+ DistortionShader->SetUniform3x3f("EyeRotationEnd", Matrix4f(timeWarpMatrices[1]));
+ }
+ else
+ {
+ // Can feed identity like matrices incase of concern over timewarp calculations
+ DistortionShader->SetUniform4x4f("EyeRotationStart", Matrix4f(timeWarpMatrices[0]));
+ DistortionShader->SetUniform4x4f("EyeRotationEnd", Matrix4f(timeWarpMatrices[1]));
+ }
}
+
+
+ if (RState.DistortionCaps & ovrDistortionCap_ComputeShader)
+ {
+#if (OVR_D3D_VERSION >= 11)
+ //RParams.pContext->CSCSSetShaderResources
+ //RParams.pContext->CSSetUnorderedAccessViews
+ //RParams.pContext->CSSetShader
+ //RParams.pContext->CSSetSamplers
+ //RParams.pContext->CSSetConstantBuffers
+
+
+ // These need to match the values used in the compiled shader
+ //const int gridSizeInPixels = 16; // GRID_SIZE_IN_PIXELS
+ //const int pinsPerEdge = 128; // PINS_PER_EDGE
+ const int nxnBlockSizeInPixels = 2; // NXN_BLOCK_SIZE_PIXELS
+ const int simdSquareSize = 16; // SIMD_SQUARE_SIZE
+
+ const int invocationSizeInPixels = nxnBlockSizeInPixels * simdSquareSize;
+
+ distortionShaderFill.SetTexture(0, eyeNum == 0 ? leftEyeTexture : rightEyeTexture, Shader_Compute);
+
+ DistortionShader->SetUniform1f("RightEye", (float)eyeNum);
+ DistortionShader->SetUniform1f("UseOverlay", 0.0f); // No overlay supported here.
+ DistortionShader->SetUniform1f("FbSizePixelsX", (float)RParams.BackBufferSize.w);
+
+ ShaderSet* shaders = distortionShaderFill.GetShaders();
+ ShaderBase* cshader = ((ShaderBase*)shaders->GetShader(Shader_Compute));
+
+ ID3D1xUnorderedAccessView *uavRendertarget = RParams.pBackBufferUAV;
+ int SizeX = RParams.BackBufferSize.w/2;
+ int SizeY = RParams.BackBufferSize.h;
+
+ int TileNumX = ( SizeX + (invocationSizeInPixels-1) ) / invocationSizeInPixels;
+ int TileNumY = ( SizeY + (invocationSizeInPixels-1) ) / invocationSizeInPixels;
+
+ RParams.pContext->CSSetUnorderedAccessViews ( 0, 1, &uavRendertarget, NULL );
+
+
+ // Incoming eye-buffer textures start at t0 onwards, so set this in slot #4
+ // Subtlety - can't put this in slot 0 because fill->Set stops at the first NULL texture.
+ ID3D1xShaderResourceView *d3dSrv = DistortionPinBuffer[eyeNum]->GetSrv();
+ RParams.pContext->CSSetShaderResources ( 4, 1, &d3dSrv );
+
+ // TODO: uniform/constant buffers
+ cshader->UpdateBuffer(UniformBuffers[Shader_Compute]);
+ cshader->SetUniformBuffer(UniformBuffers[Shader_Compute]);
+
+ // Primitive type is ignored for CS.
+ // This call actually sets the textures and does pContext->CSSetShader(). Primitive type is ignored.
+ distortionShaderFill.Set ( Prim_Unknown );
+
+ RParams.pContext->Dispatch ( TileNumX, TileNumY, 1 );
+#else
+ OVR_ASSERT ( !"No compute shaders on DX10" );
+#endif
+ }
else
{
renderPrimitives(&distortionShaderFill, DistortionMeshVBs[eyeNum], DistortionMeshIBs[eyeNum],
- NULL, 0, (int)DistortionMeshVBs[eyeNum]->GetSize(), Prim_Triangles);
+ NULL, 0, (int)DistortionMeshIBs[eyeNum]->GetSize()/2, Prim_Triangles);
}
}
+
+ LastUsedOverdriveTextureIndex = currOverdriveTextureIndex;
+
+ // Re-activate to only draw on back buffer
+ if(overdriveActive)
+ {
+ RParams.pContext->OMSetRenderTargets(1, &RParams.pBackBufferRT, 0);
+ }
}
void DistortionRenderer::createDrawQuad()
@@ -498,17 +829,20 @@ void DistortionRenderer::renderLatencyQuad(unsigned char* latencyTesterDrawColor ShaderFill quadFill(SimpleQuadShader);
quadFill.SetInputLayout(SimpleQuadVertexIL);
- setViewport(Recti(0,0, RParams.RTSize.w, RParams.RTSize.h));
+ setViewport(Recti(0,0, RParams.BackBufferSize.w, RParams.BackBufferSize.h));
+
+ float testerLuminance = (float)latencyTesterDrawColor[0] / 255.99f;
+ if(SrgbBackBuffer)
+ {
+ testerLuminance = pow(testerLuminance, 2.2f);
+ }
- SimpleQuadShader->SetUniform2f("Scale", 0.2f, 0.2f);
- SimpleQuadShader->SetUniform4f("Color", (float)latencyTesterDrawColor[0] / 255.99f,
- (float)latencyTesterDrawColor[0] / 255.99f,
- (float)latencyTesterDrawColor[0] / 255.99f,
- 1.0f);
+ SimpleQuadShader->SetUniform2f("Scale", 0.3f, 0.3f);
+ SimpleQuadShader->SetUniform4f("Color", testerLuminance, testerLuminance, testerLuminance, 1.0f);
for(int eyeNum = 0; eyeNum < 2; eyeNum++)
{
- SimpleQuadShader->SetUniform2f("PositionOffset", eyeNum == 0 ? -0.4f : 0.4f, 0.0f);
+ SimpleQuadShader->SetUniform2f("PositionOffset", eyeNum == 0 ? -0.5f : 0.5f, 0.0f);
renderPrimitives(&quadFill, LatencyTesterQuadVB, NULL, NULL, 0, numQuadVerts, Prim_TriangleStrip);
}
}
@@ -521,20 +855,35 @@ void DistortionRenderer::renderLatencyPixel(unsigned char* latencyTesterPixelCol {
createDrawQuad();
}
-
+
ShaderFill quadFill(SimpleQuadShader);
quadFill.SetInputLayout(SimpleQuadVertexIL);
- setViewport(Recti(0,0, RParams.RTSize.w, RParams.RTSize.h));
+ setViewport(Recti(0,0, RParams.BackBufferSize.w, RParams.BackBufferSize.h));
+
+ Vector3f testerColor = Vector3f((float)latencyTesterPixelColor[0] / 255.99f,
+ (float)latencyTesterPixelColor[1] / 255.99f,
+ (float)latencyTesterPixelColor[2] / 255.99f);
+ if(SrgbBackBuffer)
+ {
+ // 2.2 gamma is close enough for our purposes of matching sRGB
+ testerColor.x = pow(testerColor.x, 2.2f);
+ testerColor.y = pow(testerColor.y, 2.2f);
+ testerColor.z = pow(testerColor.z, 2.2f);
+ }
- SimpleQuadShader->SetUniform4f("Color", (float)latencyTesterPixelColor[0] / 255.99f,
- (float)latencyTesterPixelColor[0] / 255.99f,
- (float)latencyTesterPixelColor[0] / 255.99f,
- 1.0f);
+#ifdef OVR_BUILD_DEBUG
+ SimpleQuadShader->SetUniform4f("Color", testerColor.x, testerColor.y, testerColor.z, 1.0f);
- Vector2f scale(2.0f / RParams.RTSize.w, 2.0f / RParams.RTSize.h);
+ Vector2f scale(20.0f / RParams.BackBufferSize.w, 20.0f / RParams.BackBufferSize.h);
+#else
+ // sending in as gray scale
+ SimpleQuadShader->SetUniform4f("Color", testerColor.x, testerColor.x, testerColor.x, 1.0f);
+
+ Vector2f scale(1.0f / RParams.BackBufferSize.w, 1.0f / RParams.BackBufferSize.h);
+#endif
SimpleQuadShader->SetUniform2f("Scale", scale.x, scale.y);
- SimpleQuadShader->SetUniform2f("PositionOffset", 1.0f, 1.0f);
+ SimpleQuadShader->SetUniform2f("PositionOffset", 1.0f-scale.x, 1.0f-scale.y);
renderPrimitives(&quadFill, LatencyTesterQuadVB, NULL, NULL, 0, numQuadVerts, Prim_TriangleStrip);
}
@@ -628,7 +977,7 @@ void DistortionRenderer::setViewport(const Recti& vp) -
+// Must match struct DistortionVertex
static D3D1X_(INPUT_ELEMENT_DESC) DistortionMeshVertexDesc[] =
{
{"Position", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D1X_(INPUT_PER_VERTEX_DATA), 0},
@@ -643,17 +992,43 @@ static D3D1X_(INPUT_ELEMENT_DESC) SimpleQuadMeshVertexDesc[] = {"Position", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D1X_(INPUT_PER_VERTEX_DATA), 0},
};
+
+
// TODO: this is D3D specific
void DistortionRenderer::initShaders()
-{
+{
+#if OVR_D3D_VERSION>=11
+ if ( ( RState.DistortionCaps & ovrDistortionCap_ComputeShader ) != 0 )
{
- PrecompiledShader vsShaderByteCode = DistortionVertexShaderLookup[DistortionVertexShaderBitMask & DistortionCaps];
+ // Compute shader
+ DistortionShader = *new ShaderSet;
+
+ int shaderNum = DistortionComputeShader2x2;
+ if ( ( RState.EnabledHmdCaps & ovrHmdCap_DirectPentile ) != 0 )
+ {
+ shaderNum = DistortionComputeShader2x2Pentile;
+ }
+
+ PrecompiledShader psShaderByteCode = DistortionComputeShaderLookup[shaderNum];
+ Ptr<D3D_NS::ComputeShader> cs = *new D3D_NS::ComputeShader(
+ &RParams,
+ (void*)psShaderByteCode.ShaderData, psShaderByteCode.ShaderSize,
+ psShaderByteCode.ReflectionData, psShaderByteCode.ReflectionSize);
+
+ DistortionShader->SetShader(cs);
+ }
+ else
+#endif
+ {
+ // Vertex + pixel distortion shader.
+ PrecompiledShader vsShaderByteCode = DistortionVertexShaderLookup[DistortionVertexShaderBitMask & RState.DistortionCaps];
Ptr<D3D_NS::VertexShader> vtxShader = *new D3D_NS::VertexShader(
&RParams,
(void*)vsShaderByteCode.ShaderData, vsShaderByteCode.ShaderSize,
vsShaderByteCode.ReflectionData, vsShaderByteCode.ReflectionSize);
- ID3D1xInputLayout** objRef = &DistortionVertexIL.GetRawRef();
+ DistortionVertexIL = NULL;
+ ID3D1xInputLayout** objRef = &DistortionVertexIL.GetRawRef();
HRESULT validate = RParams.pDevice->CreateInputLayout(
DistortionMeshVertexDesc, sizeof(DistortionMeshVertexDesc) / sizeof(DistortionMeshVertexDesc[0]),
@@ -663,7 +1038,7 @@ void DistortionRenderer::initShaders() DistortionShader = *new ShaderSet;
DistortionShader->SetShader(vtxShader);
- PrecompiledShader psShaderByteCode = DistortionPixelShaderLookup[DistortionPixelShaderBitMask & DistortionCaps];
+ PrecompiledShader psShaderByteCode = DistortionPixelShaderLookup[DistortionPixelShaderBitMask & RState.DistortionCaps];
Ptr<D3D_NS::PixelShader> ps = *new D3D_NS::PixelShader(
&RParams,
@@ -680,6 +1055,7 @@ void DistortionRenderer::initShaders() SimpleQuad_vs_refl, sizeof(SimpleQuad_vs_refl) / sizeof(SimpleQuad_vs_refl[0]));
//NULL, 0);
+ SimpleQuadVertexIL = NULL;
ID3D1xInputLayout** objRef = &SimpleQuadVertexIL.GetRawRef();
HRESULT validate = RParams.pDevice->CreateInputLayout(
@@ -722,7 +1098,7 @@ ID3D1xSamplerState* DistortionRenderer::getSamplerState(int sm) else if (sm & Sample_Anisotropic)
{
ss.Filter = D3D1X_(FILTER_ANISOTROPIC);
- ss.MaxAnisotropy = 8;
+ ss.MaxAnisotropy = 4;
}
else
{
@@ -740,6 +1116,7 @@ void DistortionRenderer::destroy() {
DistortionMeshVBs[eyeNum].Clear();
DistortionMeshIBs[eyeNum].Clear();
+ DistortionPinBuffer[eyeNum].Clear();
}
DistortionVertexIL.Clear();
@@ -748,6 +1125,7 @@ void DistortionRenderer::destroy() {
DistortionShader->UnsetShader(Shader_Vertex);
DistortionShader->UnsetShader(Shader_Pixel);
+ DistortionShader->UnsetShader(Shader_Compute);
DistortionShader.Clear();
}
@@ -757,48 +1135,280 @@ void DistortionRenderer::destroy() DistortionRenderer::GraphicsState::GraphicsState(ID3D1xDeviceContext* c)
: context(c)
+, memoryCleared(TRUE)
, rasterizerState(NULL)
+//samplerStates[]
+, inputLayoutState(NULL)
+//psShaderResourceState[]
+//vsShaderResourceState[]
+//psConstantBuffersState[]
+//vsConstantBuffersState[]
+//renderTargetViewState[]
+, depthStencilViewState(NULL)
+, omBlendState(NULL)
+//omBlendFactorState[]
+, omSampleMaskState(0xffffffff)
+, primitiveTopologyState(D3D_PRIMITIVE_TOPOLOGY_UNDEFINED)
+, iaIndexBufferPointerState(NULL)
+, iaIndexBufferFormatState(DXGI_FORMAT_UNKNOWN)
+, iaIndexBufferOffsetState(0)
+//iaVertexBufferPointersState[]
+//iaVertexBufferStridesState[]
+//iaVertexBufferOffsetsState[]
+, currentPixelShader(NULL)
+, currentVertexShader(NULL)
+, currentGeometryShader(NULL)
+#if (OVR_D3D_VERSION == 11)
+, currentHullShader(NULL)
+, currentDomainShader(NULL)
+, currentComputeShader(NULL)
+#endif
{
- for (int i = 0; i < 8; ++i)
- samplerStates[i] = NULL;
+ for (int i = 0; i < D3D1x_COMMONSHADER_SAMPLER_SLOT_COUNT; ++i)
+ {
+ psSamplerStates[i] = NULL;
+ vsSamplerStates[i] = NULL;
+#if (OVR_D3D_VERSION == 11)
+ csSamplerStates[i] = NULL;
+#endif
+ }
+
+ for (int i = 0; i < D3D1x_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT; i++)
+ {
+ psShaderResourceState[i] = NULL;
+ vsShaderResourceState[i] = NULL;
+#if (OVR_D3D_VERSION == 11)
+ csShaderResourceState[i] = NULL;
+#endif
+ }
+
+ for (int i = 0; i < D3D1x_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT; i++)
+ {
+ psConstantBuffersState[i] = NULL;
+ vsConstantBuffersState[i] = NULL;
+#if (OVR_D3D_VERSION == 11)
+ csConstantBuffersState[i] = NULL;
+#endif
+ }
+
+ for (int i = 0; i < D3D1x_SIMULTANEOUS_RENDER_TARGET_COUNT; i++)
+ {
+ renderTargetViewState[i] = NULL;
+#if (OVR_D3D_VERSION == 11)
+ csUnorderedAccessViewState[i] = NULL;
+#endif
+ }
+
+ for (int i = 0; i < 4; i++)
+ omBlendFactorState[i] = NULL;
+
+ for (int i = 0; i < D3D1x_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT; i++)
+ {
+ iaVertexBufferPointersState[i] = NULL;
+ iaVertexBufferStridesState[i] = NULL;
+ iaVertexBufferOffsetsState[i] = NULL;
+ }
}
+#define SAFE_RELEASE(x) if ( (x) != NULL ) { (x)->Release(); (x)=NULL; }
-void DistortionRenderer::GraphicsState::Save()
+void DistortionRenderer::GraphicsState::clearMemory()
{
- if (rasterizerState != NULL)
- rasterizerState->Release();
+ SAFE_RELEASE ( rasterizerState );
- context->RSGetState(&rasterizerState);
+ for (int i = 0; i < D3D1x_COMMONSHADER_SAMPLER_SLOT_COUNT; ++i)
+ {
+ SAFE_RELEASE ( psSamplerStates[i] );
+ SAFE_RELEASE ( vsSamplerStates[i] );
+#if (OVR_D3D_VERSION == 11)
+ SAFE_RELEASE ( csSamplerStates[i] );
+#endif
+ }
+
+ SAFE_RELEASE ( inputLayoutState );
+
+ for (int i = 0; i < D3D1x_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT; i++)
+ {
+ SAFE_RELEASE ( psShaderResourceState[i] );
+ SAFE_RELEASE ( vsShaderResourceState[i] );
+#if (OVR_D3D_VERSION == 11)
+ SAFE_RELEASE ( csShaderResourceState[i] );
+#endif
+ }
+
+ for (int i = 0; i < D3D1x_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT; i++)
+ {
+ SAFE_RELEASE ( psConstantBuffersState[i] );
+ SAFE_RELEASE ( vsConstantBuffersState[i] );
+#if (OVR_D3D_VERSION == 11)
+ SAFE_RELEASE ( csConstantBuffersState[i] );
+#endif
+ }
- for (int i = 0; i < 8; ++i)
+ for (int i = 0; i < D3D1x_SIMULTANEOUS_RENDER_TARGET_COUNT; i++)
{
- if (samplerStates[i] != NULL)
- samplerStates[i]->Release();
+ SAFE_RELEASE ( renderTargetViewState[i] );
+#if (OVR_D3D_VERSION == 11)
+ SAFE_RELEASE ( csUnorderedAccessViewState[i] );
+#endif
+ }
+
+ SAFE_RELEASE ( depthStencilViewState );
+ SAFE_RELEASE ( omBlendState );
+ SAFE_RELEASE ( iaIndexBufferPointerState );
+
+ for (int i = 0; i < D3D1x_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT; i++)
+ {
+ SAFE_RELEASE ( iaVertexBufferPointersState[i] );
}
- context->PSGetSamplers(0, 8, samplerStates);
+ SAFE_RELEASE ( currentPixelShader );
+ SAFE_RELEASE ( currentVertexShader );
+ SAFE_RELEASE ( currentGeometryShader );
+
+#if (OVR_D3D_VERSION == 11)
+ SAFE_RELEASE ( currentHullShader );
+ SAFE_RELEASE ( currentDomainShader );
+ SAFE_RELEASE ( currentComputeShader );
+#endif
+
+ memoryCleared = TRUE;
+}
+
+#undef SAFE_RELEASE
+
+DistortionRenderer::GraphicsState::~GraphicsState()
+{
+ clearMemory();
+}
+
+
+void DistortionRenderer::GraphicsState::Save()
+{
+ if (!memoryCleared)
+ clearMemory();
+
+ memoryCleared = FALSE;
+
+ context->RSGetState(&rasterizerState);
+ context->IAGetInputLayout(&inputLayoutState);
+
+ context->PSGetShaderResources(0, D3D1x_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT, psShaderResourceState);
+ context->PSGetSamplers(0, D3D1x_COMMONSHADER_SAMPLER_SLOT_COUNT, psSamplerStates);
+ context->PSGetConstantBuffers(0, D3D1x_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, psConstantBuffersState);
+
+ context->VSGetShaderResources(0, D3D1x_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT, vsShaderResourceState);
+ context->VSGetSamplers(0, D3D1x_COMMONSHADER_SAMPLER_SLOT_COUNT, vsSamplerStates);
+ context->VSGetConstantBuffers(0, D3D1x_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, vsConstantBuffersState);
+
+#if (OVR_D3D_VERSION == 11)
+ context->CSGetShaderResources(0, D3D1x_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT, csShaderResourceState);
+ context->CSGetSamplers(0, D3D1x_COMMONSHADER_SAMPLER_SLOT_COUNT, csSamplerStates);
+ context->CSGetConstantBuffers(0, D3D1x_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, csConstantBuffersState);
+ context->CSGetUnorderedAccessViews(0, D3D1x_SIMULTANEOUS_RENDER_TARGET_COUNT, csUnorderedAccessViewState);
+#endif
+
+ context->OMGetRenderTargets(D3D1x_SIMULTANEOUS_RENDER_TARGET_COUNT, renderTargetViewState, &depthStencilViewState);
+
+ context->OMGetBlendState(&omBlendState, omBlendFactorState, &omSampleMaskState);
+
+ context->IAGetPrimitiveTopology(&primitiveTopologyState);
+
+ context->IAGetIndexBuffer(&iaIndexBufferPointerState, &iaIndexBufferFormatState, &iaIndexBufferOffsetState);
+
+ context->IAGetVertexBuffers(0, D3D1x_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT, iaVertexBufferPointersState, iaVertexBufferStridesState, iaVertexBufferOffsetsState);
+
+#if (OVR_D3D_VERSION == 10)
+ context->PSGetShader(¤tPixelShader);
+ context->VSGetShader(¤tVertexShader);
+ context->GSGetShader(¤tGeometryShader);
+#else // Volga says class instance interfaces are very new and almost no one uses them
+ context->PSGetShader(¤tPixelShader, NULL, NULL);
+ context->VSGetShader(¤tVertexShader, NULL, NULL);
+ context->GSGetShader(¤tGeometryShader, NULL, NULL);
+ context->HSGetShader(¤tHullShader, NULL, NULL);
+ context->DSGetShader(¤tDomainShader, NULL, NULL);
+ context->CSGetShader(¤tComputeShader, NULL, NULL);
+ /* maybe above doesn't work; then do something with this (must test on dx11)
+ ID3D11ClassInstance* blank_array[0];
+ UINT blank_uint = 0;
+ context->PSGetShader(¤tPixelShader, blank_array, blank_uint);
+ context->VSGetShader(¤tVertexShader, blank_array, blank_uint);
+ context->GSGetShader(¤tGeometryShader, blank_array, blank_uint);
+ context->HSGetShader(¤tHullShader, blank_array, blank_uint);
+ context->DSGetShader(¤tDomainShader, blank_array, blank_uint);
+ context->CSGetShader(¤tComputeShader, blank_array, blank_uint);
+ */
+#endif
}
void DistortionRenderer::GraphicsState::Restore()
{
if (rasterizerState != NULL)
- {
context->RSSetState(rasterizerState);
- rasterizerState->Release();
- rasterizerState = NULL;
- }
- for (int i = 0; i < 8; ++i)
- {
- if (samplerStates[i] == NULL)
- continue;
+ if (inputLayoutState != NULL)
+ context->IASetInputLayout(inputLayoutState);
- context->PSSetSamplers(0, 1, &samplerStates[i]);
- samplerStates[i]->Release();
- samplerStates[i] = NULL;
- }
+ context->PSSetSamplers(0, D3D1x_COMMONSHADER_SAMPLER_SLOT_COUNT, psSamplerStates);
+ if (psShaderResourceState != NULL)
+ context->PSSetShaderResources(0, D3D1x_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT, psShaderResourceState);
+ if (psConstantBuffersState != NULL)
+ context->PSSetConstantBuffers(0, D3D1x_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, psConstantBuffersState);
+
+ context->VSSetSamplers(0, D3D1x_COMMONSHADER_SAMPLER_SLOT_COUNT, vsSamplerStates);
+ if (vsShaderResourceState != NULL)
+ context->VSSetShaderResources(0, D3D1x_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT, vsShaderResourceState);
+ if (vsConstantBuffersState != NULL)
+ context->VSSetConstantBuffers(0, D3D1x_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, vsConstantBuffersState);
+
+#if (OVR_D3D_VERSION == 11)
+ context->CSSetSamplers(0, D3D1x_COMMONSHADER_SAMPLER_SLOT_COUNT, csSamplerStates);
+ if (csShaderResourceState != NULL)
+ context->CSSetShaderResources(0, D3D1x_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT, csShaderResourceState);
+ if (csConstantBuffersState != NULL)
+ context->CSSetConstantBuffers(0, D3D1x_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, csConstantBuffersState);
+ if (csUnorderedAccessViewState != NULL)
+ context->CSSetUnorderedAccessViews(0, D3D1x_SIMULTANEOUS_RENDER_TARGET_COUNT, csUnorderedAccessViewState, NULL);
+#endif
+
+ if (depthStencilViewState != NULL || renderTargetViewState != NULL)
+ context->OMSetRenderTargets(D3D1x_SIMULTANEOUS_RENDER_TARGET_COUNT, renderTargetViewState, depthStencilViewState);
+
+ if (omBlendState != NULL)
+ context->OMSetBlendState(omBlendState, omBlendFactorState, omSampleMaskState);
+
+ context->IASetPrimitiveTopology(primitiveTopologyState);
+
+ if (iaIndexBufferPointerState != NULL)
+ context->IASetIndexBuffer(iaIndexBufferPointerState, iaIndexBufferFormatState, iaIndexBufferOffsetState);
+
+ if (iaVertexBufferPointersState != NULL)
+ context->IASetVertexBuffers(0, D3D1x_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT, iaVertexBufferPointersState, iaVertexBufferStridesState, iaVertexBufferOffsetsState);
+
+#if (OVR_D3D_VERSION == 10)
+ if (currentPixelShader != NULL)
+ context->PSSetShader(currentPixelShader);
+ if (currentVertexShader != NULL)
+ context->VSSetShader(currentVertexShader);
+ if (currentGeometryShader != NULL)
+ context->GSSetShader(currentGeometryShader);
+#else
+ if (currentPixelShader != NULL)
+ context->PSSetShader(currentPixelShader, NULL, 0);
+ if (currentVertexShader != NULL)
+ context->VSSetShader(currentVertexShader, NULL, 0);
+ if (currentGeometryShader != NULL)
+ context->GSSetShader(currentGeometryShader, NULL, 0);
+ if (currentHullShader != NULL)
+ context->HSSetShader(currentHullShader, NULL, 0);
+ if (currentDomainShader != NULL)
+ context->DSSetShader(currentDomainShader, NULL, 0);
+ if (currentComputeShader != NULL)
+ context->CSSetShader(currentComputeShader, NULL, 0);
+#endif
+ clearMemory();
}
}}} // OVR::CAPI::D3D1X
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_DistortionRenderer.h b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_DistortionRenderer.h index 433d6ec..0bbf049 100644 --- a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_DistortionRenderer.h +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_DistortionRenderer.h @@ -5,16 +5,16 @@ Content : Experimental distortion renderer Created : November 11, 2013
Authors : Volga Aksoy
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
-http://www.oculusvr.com/licenses/LICENSE-3.1
+http://www.oculusvr.com/licenses/LICENSE-3.2
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
@@ -56,12 +56,11 @@ public: // ***** Public DistortionRenderer interface
- virtual bool Initialize(const ovrRenderAPIConfig* apiConfig,
- unsigned distortionCaps);
+ virtual bool Initialize(const ovrRenderAPIConfig* apiConfig) OVR_OVERRIDE;
- virtual void SubmitEye(int eyeId, ovrTexture* eyeTexture);
+ virtual void SubmitEye(int eyeId, const ovrTexture* eyeTexture);
- virtual void EndFrame(bool swapBuffers, unsigned char* latencyTesterDrawColor, unsigned char* latencyTester2DrawColor);
+ virtual void EndFrame(bool swapBuffers);
// TBD: Make public?
void WaitUntilGpuIdle();
@@ -76,13 +75,59 @@ protected: {
public:
GraphicsState(ID3D1xDeviceContext* context);
+ virtual ~GraphicsState();
+ virtual void clearMemory();
virtual void Save();
virtual void Restore();
protected:
- ID3D1xRasterizerState* rasterizerState;
- ID3D1xSamplerState* samplerStates[8];
ID3D1xDeviceContext* context;
+ BOOL memoryCleared;
+
+ ID3D1xRasterizerState* rasterizerState;
+ ID3D1xInputLayout* inputLayoutState;
+
+ ID3D1xShaderResourceView* psShaderResourceState[D3D1x_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT];
+ ID3D1xSamplerState* psSamplerStates[D3D1x_COMMONSHADER_SAMPLER_SLOT_COUNT];
+ ID3D1xBuffer* psConstantBuffersState[D3D1x_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
+
+ ID3D1xShaderResourceView* vsShaderResourceState[D3D1x_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT];
+ ID3D1xSamplerState* vsSamplerStates[D3D1x_COMMONSHADER_SAMPLER_SLOT_COUNT];
+ ID3D1xBuffer* vsConstantBuffersState[D3D1x_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
+
+#if (OVR_D3D_VERSION == 11)
+ ID3D1xShaderResourceView* csShaderResourceState[D3D1x_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT];
+ ID3D1xSamplerState* csSamplerStates[D3D1x_COMMONSHADER_SAMPLER_SLOT_COUNT];
+ ID3D1xBuffer* csConstantBuffersState[D3D1x_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
+ ID3D1xUnorderedAccessView* csUnorderedAccessViewState[D3D1x_SIMULTANEOUS_RENDER_TARGET_COUNT];
+#endif
+
+ ID3D1xRenderTargetView* renderTargetViewState[D3D1x_SIMULTANEOUS_RENDER_TARGET_COUNT];
+ ID3D1xDepthStencilView* depthStencilViewState;
+
+ ID3D1xBlendState* omBlendState;
+ FLOAT omBlendFactorState[4];
+ UINT omSampleMaskState;
+
+ D3D1x_PRIMITIVE_TOPOLOGY primitiveTopologyState;
+
+ ID3D1xBuffer* iaIndexBufferPointerState;
+ DXGI_FORMAT iaIndexBufferFormatState;
+ UINT iaIndexBufferOffsetState;
+
+ ID3D1xBuffer* iaVertexBufferPointersState[D3D1x_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT];
+ UINT iaVertexBufferStridesState[D3D1x_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT];
+ UINT iaVertexBufferOffsetsState[D3D1x_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT];
+
+ ID3D1xPixelShader* currentPixelShader;
+ ID3D1xVertexShader* currentVertexShader;
+ ID3D1xGeometryShader* currentGeometryShader;
+#if (OVR_D3D_VERSION == 11)
+ ID3D11HullShader* currentHullShader;
+ ID3D11DomainShader* currentDomainShader;
+ ID3D11ComputeShader* currentComputeShader;
+#endif
+
};
private:
@@ -90,6 +135,7 @@ private: void initBuffersAndShaders();
void initShaders();
void initFullscreenQuad();
+ void initOverdrive();
void destroy();
void setViewport(const Recti& vp);
@@ -100,6 +146,8 @@ private: Matrix4f* viewMatrix, int offset, int count,
PrimitiveType rprim);
+ void renderEndFrame();
+
void createDrawQuad();
void renderLatencyQuad(unsigned char* latencyTesterDrawColor);
void renderLatencyPixel(unsigned char* latencyTesterPixelColor);
@@ -108,22 +156,28 @@ private: ID3D1xSamplerState* getSamplerState(int sm);
- // TBD: Should we be using oe from RState instead?
- unsigned DistortionCaps;
+ //// TBD: Should we be using oe from RState instead?
+ //unsigned DistortionCaps;
+
+ // Back buffer is properly set as an SRGB format?
+ bool SrgbBackBuffer;
// D3DX device and utility variables.
RenderParams RParams;
Ptr<Texture> pEyeTextures[2];
-
+
// U,V scale and offset needed for timewarp.
ovrVector2f UVScaleOffset[2][2];
ovrSizei EyeTextureSize[2];
ovrRecti EyeRenderViewport[2];
+ Ptr<Texture> pOverdriveTextures[NumOverdriveTextures];
+
//Ptr<Buffer> mpFullScreenVertexBuffer;
Ptr<Buffer> DistortionMeshVBs[2]; // one per-eye
Ptr<Buffer> DistortionMeshIBs[2]; // one per-eye
+ Ptr<Buffer> DistortionPinBuffer[2]; // one per-eye
Ptr<ShaderSet> DistortionShader;
Ptr<ID3D1xInputLayout> DistortionVertexIL;
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp new file mode 100644 index 0000000..61f915f --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp @@ -0,0 +1,595 @@ +/************************************************************************************
+
+Filename : CAPI_D3D1X_HSWDisplay.cpp
+Content : Implements Health and Safety Warning system.
+Created : July 7, 2014
+Authors : Paul Pedriana
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+// This file is intended to be #included by CAPI_D3D10_HSWDisplay.cpp or CAPI_D3D11_HSWDisplay.cpp,
+// which define OVR_D3D_VERSION to 10 or 11 respectively.
+#if defined(OVR_D3D_VERSION) && ((OVR_D3D_VERSION == 10) || (OVR_D3D_VERSION == 11))
+
+#define _WINSOCKAPI_ // Prevents <Windows.h> from #including <Winsock.h>, as we need the app to use <Winsock2.h> instead.
+#include "../../Kernel/OVR_Types.h"
+#include "../../OVR_CAPI_D3D.h" // OVR_D3D_VERSION will have been defined by who included us.
+#include "CAPI_D3D1X_HSWDisplay.h"
+#include "../../Kernel/OVR_File.h"
+#include "../../Kernel/OVR_SysFile.h"
+#include "../../Kernel/OVR_Math.h"
+#include "../../Kernel/OVR_Allocator.h"
+#include "../../Kernel/OVR_Color.h"
+
+// We currently borrow the SimpleQuad shaders
+#include "Shaders/SimpleTexturedQuad_vs.h"
+#include "Shaders/SimpleTexturedQuad_vs_refl.h"
+#include "Shaders/SimpleTexturedQuad_ps.h"
+#include "Shaders/SimpleTexturedQuad_ps_refl.h"
+
+
+/*
+#include <d3dcompiler.h>
+
+ID3D10Blob* CompileShader(const char* profile, const char* src, const char* mainName = "main")
+{
+ ID3D10Blob* shader = NULL;
+ ID3D10Blob* errors = NULL;
+ HRESULT hr = D3DCompile(src, strlen(src), NULL, NULL, NULL, mainName, profile, 0, 0, &shader, &errors);
+
+ OVR_ASSERT(SUCCEEDED(hr));
+ if (FAILED(hr))
+ {
+ shader = NULL;
+ OVR_DEBUG_LOG(("Compiling D3D shader for %s failed\n%s\n\n%s", profile, src, errors->GetBufferPointer()));
+ }
+
+ if (errors)
+ errors->Release();
+
+ return shader;
+}
+*/
+
+
+
+// For a given DXGI format: if the format is a typeless one then this function returns a
+// suitable typed one. If the format is a typed one then this function returns it as-is.
+static DXGI_FORMAT GetFullyTypedDXGIFormat(DXGI_FORMAT textureFormat)
+{
+ // http://msdn.microsoft.com/en-us/library/windows/desktop/bb173059%28v=vs.85%29.aspx
+
+ DXGI_FORMAT fullyTypedFormat = textureFormat;
+
+ switch(textureFormat)
+ {
+ case DXGI_FORMAT_R32G32B32A32_TYPELESS:
+ return DXGI_FORMAT_R32G32B32A32_FLOAT; // or DXGI_FORMAT_R32G32B32A32_UINT, DXGI_FORMAT_R32G32B32A32_SINT
+
+ case DXGI_FORMAT_R32G32B32_TYPELESS:
+ return DXGI_FORMAT_R32G32B32_FLOAT; // or DXGI_FORMAT_R32G32B32_UINT, DXGI_FORMAT_R32G32B32_SINT
+
+ case DXGI_FORMAT_R16G16B16A16_TYPELESS:
+ return DXGI_FORMAT_R16G16B16A16_UNORM; // or DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_UINT, DXGI_FORMAT_R16G16B16A16_SNORM, DXGI_FORMAT_R16G16B16A16_SINT
+
+ case DXGI_FORMAT_R8G8B8A8_TYPELESS:
+ return DXGI_FORMAT_R8G8B8A8_UNORM; // or DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UINT, DXGI_FORMAT_R8G8B8A8_SNORM, DXGI_FORMAT_R8G8B8A8_SINT
+
+ case DXGI_FORMAT_B8G8R8A8_TYPELESS:
+ return DXGI_FORMAT_B8G8R8A8_UNORM_SRGB;
+
+ case DXGI_FORMAT_B8G8R8X8_TYPELESS:
+ return DXGI_FORMAT_B8G8R8X8_UNORM_SRGB;
+
+ // Others which we don't currently support:
+ //case DXGI_FORMAT_R32G32_TYPELESS:
+ //case DXGI_FORMAT_R32G8X24_TYPELESS:
+ //case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:
+ //case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT:
+ //case DXGI_FORMAT_R10G10B10A2_TYPELESS:
+ //case DXGI_FORMAT_R16G16_TYPELESS:
+ //case DXGI_FORMAT_R32_TYPELESS:
+ //case DXGI_FORMAT_R24G8_TYPELESS:
+ //case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:
+ //case DXGI_FORMAT_X24_TYPELESS_G8_UINT:
+ //case DXGI_FORMAT_R8G8_TYPELESS:
+ //case DXGI_FORMAT_R16_TYPELESS:
+ //case DXGI_FORMAT_R8_TYPELESS:
+ //case DXGI_FORMAT_BC1_TYPELESS:
+ //case DXGI_FORMAT_BC2_TYPELESS:
+ //case DXGI_FORMAT_BC3_TYPELESS:
+ //case DXGI_FORMAT_BC4_TYPELESS:
+ //case DXGI_FORMAT_BC5_TYPELESS:
+ //case DXGI_FORMAT_BC6H_TYPELESS:
+ //case DXGI_FORMAT_BC7_TYPELESS:
+ }
+
+ return fullyTypedFormat;
+}
+
+
+
+namespace OVR { namespace CAPI {
+
+// To do Need to move LoadTextureTgaData to a shared location.
+uint8_t* LoadTextureTgaData(OVR::File* f, uint8_t alpha, int& width, int& height);
+
+
+namespace D3D_NS {
+
+// This is a temporary function implementation, and it functionality needs to be implemented in a more generic way.
+Texture* LoadTextureTga(RenderParams& rParams, ID3D1xSamplerState* pSamplerState, OVR::File* f, uint8_t alpha)
+{
+ OVR::CAPI::D3D_NS::Texture* pTexture = NULL;
+
+ int width, height;
+ const uint8_t* pRGBA = LoadTextureTgaData(f, alpha, width, height);
+
+ if (pRGBA)
+ {
+ pTexture = new OVR::CAPI::D3D_NS::Texture(&rParams, OVR::CAPI::D3D_NS::Texture_RGBA, OVR::Sizei(0,0), pSamplerState, 1);
+
+ // Create the D3D texture
+ D3D1X_(TEXTURE2D_DESC) dsDesc;
+ dsDesc.Width = width;
+ dsDesc.Height = height;
+ dsDesc.MipLevels = 1;
+ dsDesc.ArraySize = 1;
+ dsDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ dsDesc.SampleDesc.Count = 1;
+ dsDesc.SampleDesc.Quality = 0;
+ dsDesc.Usage = D3D1X_(USAGE_DEFAULT);
+ dsDesc.BindFlags = D3D1X_(BIND_SHADER_RESOURCE);
+ dsDesc.CPUAccessFlags = 0;
+ dsDesc.MiscFlags = 0;
+
+ HRESULT hr = rParams.pDevice->CreateTexture2D(&dsDesc, NULL, &pTexture->Tex.GetRawRef());
+
+ if (SUCCEEDED(hr))
+ {
+ if (dsDesc.BindFlags & D3D1X_(BIND_SHADER_RESOURCE))
+ rParams.pDevice->CreateShaderResourceView(pTexture->Tex, NULL, &pTexture->TexSv.GetRawRef());
+
+ rParams.pContext->UpdateSubresource(pTexture->Tex, 0, NULL, pRGBA, width * 4, width * height * 4);
+ }
+ else
+ {
+ OVR_DEBUG_LOG_TEXT(("[LoadTextureTga] CreateTexture2D failed"));
+ pTexture->Release();
+ }
+
+ OVR_FREE(const_cast<uint8_t*>(pRGBA));
+ }
+
+ return pTexture;
+}
+
+
+// Loads a texture from a memory image of a TGA file.
+Texture* LoadTextureTga(RenderParams& rParams, ID3D1xSamplerState* pSamplerState, const uint8_t* pData, int dataSize, uint8_t alpha)
+{
+ MemoryFile memoryFile("", pData, dataSize);
+
+ return LoadTextureTga(rParams, pSamplerState, &memoryFile, alpha);
+}
+
+
+// Loads a texture from a disk TGA file.
+Texture* LoadTextureTga(RenderParams& rParams, ID3D1xSamplerState* pSamplerState, const char* pFilePath, uint8_t alpha)
+{
+ SysFile sysFile;
+
+ if(sysFile.Open(pFilePath, FileConstants::Open_Read | FileConstants::Open_Buffered))
+ return LoadTextureTga(rParams, pSamplerState, &sysFile, alpha);
+
+ return NULL;
+}
+
+
+
+// To do: This needs to be promoted to a central version, possibly in CAPI_HSWDisplay.h
+struct HASWVertex
+{
+ Vector3f Pos;
+ Color C;
+ float U, V;
+
+ HASWVertex(const Vector3f& p, const Color& c = Color(64,0,0,255), float u = 0, float v = 0)
+ : Pos(p), C(c), U(u), V(v)
+ {}
+
+ HASWVertex(float x, float y, float z, const Color& c = Color(64,0,0,255), float u = 0, float v = 0)
+ : Pos(x,y,z), C(c), U(u), V(v)
+ {}
+
+ bool operator==(const HASWVertex& b) const
+ {
+ return (Pos == b.Pos) && (C == b.C) && (U == b.U) && (V == b.V);
+ }
+};
+
+
+
+// The texture below may conceivably be shared between HSWDisplay instances. However,
+// beware that sharing may not be possible if two HMDs are using different locales
+// simultaneously. As of this writing it's not clear if that can occur in practice.
+
+HSWDisplay::HSWDisplay(ovrRenderAPIType api, ovrHmd hmd, const HMDRenderState& renderState)
+ : OVR::CAPI::HSWDisplay(api, hmd, renderState),
+ RenderParams()
+{
+}
+
+bool HSWDisplay::Initialize(const ovrRenderAPIConfig* apiConfig)
+{
+ #if (OVR_D3D_VERSION == 10)
+ const ovrD3D10Config* config = reinterpret_cast<const ovrD3D10Config*>(apiConfig);
+ #else
+ const ovrD3D11Config* config = reinterpret_cast<const ovrD3D11Config*>(apiConfig);
+ #endif
+
+ if(config)
+ {
+ RenderParams.pDevice = config->D3D_NS.pDevice;
+#if (OVR_D3D_VERSION == 10)
+ RenderParams.pContext = config->D3D10.pDevice;
+ RenderParams.pBackBufferUAV = NULL;
+#else
+ RenderParams.pContext = config->D3D11.pDeviceContext;
+ RenderParams.pBackBufferUAV = config->D3D_NS.pBackBufferUAV;
+#endif
+ RenderParams.pBackBufferRT = config->D3D_NS.pBackBufferRT;
+ RenderParams.pSwapChain = config->D3D_NS.pSwapChain;
+ RenderParams.BackBufferSize = config->D3D_NS.Header.BackBufferSize;
+ RenderParams.Multisample = config->D3D_NS.Header.Multisample;
+
+ // We may want to create RasterizerState, or alternatively let the DistortionRenderer handle it.
+ }
+ // else do any necessary cleanup
+
+ return true;
+}
+
+void HSWDisplay::Shutdown()
+{
+ UnloadGraphics();
+}
+
+
+void HSWDisplay::DisplayInternal()
+{
+ HSWDISPLAY_LOG(("[HSWDisplay D3D1x] DisplayInternal()"));
+ // We may want to call LoadGraphics here instead of within Render.
+}
+
+
+void HSWDisplay::DismissInternal()
+{
+ HSWDISPLAY_LOG(("[HSWDisplay D3D1x] DismissInternal()"));
+ UnloadGraphics();
+}
+
+
+void HSWDisplay::UnloadGraphics()
+{
+ //RenderParams: nothing to do.
+ pSamplerState.Clear();
+ pTexture.Clear();
+ pVB.Clear();
+ for(size_t i = 0; i < OVR_ARRAY_COUNT(UniformBufferArray); i++)
+ UniformBufferArray[i].Clear();
+ pShaderSet.Clear();
+ pVertexInputLayout.Clear();
+ pBlendState.Clear();
+ pRasterizerState.Clear();
+ // OrthoProjection: No need to clear.
+}
+
+void HSWDisplay::LoadGraphics()
+{
+ // Load the graphics if not loaded already.
+ if(!pSamplerState)
+ {
+ D3D1X_(SAMPLER_DESC) sDesc;
+
+ memset(&sDesc, 0, sizeof(sDesc));
+ sDesc.Filter = D3D1X_(FILTER_MIN_MAG_MIP_LINEAR);
+ sDesc.AddressU = D3D1X_(TEXTURE_ADDRESS_CLAMP);
+ sDesc.AddressV = D3D1X_(TEXTURE_ADDRESS_CLAMP);
+ sDesc.AddressW = D3D1X_(TEXTURE_ADDRESS_CLAMP);
+
+ RenderParams.pDevice->CreateSamplerState(&sDesc, &pSamplerState.GetRawRef());
+ }
+
+ #if defined(OVR_BUILD_DEBUG)
+ if(!pTexture)
+ pTexture = *LoadTextureTga(RenderParams, pSamplerState, "C:\\TestPath\\TestFile.tga", 255);
+ #endif
+
+ if(!pTexture) // To do: Add support for .dds files, which would be significantly smaller than the size of the tga.
+ {
+ size_t textureSize;
+ const uint8_t* TextureData = GetDefaultTexture(textureSize);
+ pTexture = *LoadTextureTga(RenderParams, pSamplerState, TextureData, (int)textureSize, 255);
+ }
+
+ if(!UniformBufferArray[0])
+ {
+ for(size_t i = 0; i < OVR_ARRAY_COUNT(UniformBufferArray); i++)
+ UniformBufferArray[i] = *new Buffer(&RenderParams);
+ }
+
+ if(!pShaderSet)
+ {
+ pShaderSet = *new ShaderSet;
+
+ // Setup the vertex shader
+ const D3D1X_(INPUT_ELEMENT_DESC) VertexDescription[] = {
+ { "Position", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, offsetof(HASWVertex, Pos), D3D1X_(INPUT_PER_VERTEX_DATA), 0 },
+ { "Color", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, offsetof(HASWVertex, C), D3D1X_(INPUT_PER_VERTEX_DATA), 0 },
+ { "TexCoord", 0, DXGI_FORMAT_R32G32_FLOAT, 0, offsetof(HASWVertex, U), D3D1X_(INPUT_PER_VERTEX_DATA), 0 }
+ };
+
+ Ptr<D3D_NS::VertexShader> vs = *new D3D_NS::VertexShader(&RenderParams, (void*)SimpleTexturedQuad_vs, sizeof(SimpleTexturedQuad_vs), SimpleTexturedQuad_vs_refl, OVR_ARRAY_COUNT(SimpleTexturedQuad_vs_refl));
+ pVertexInputLayout = NULL; // Make sure it's cleared in case it wasn't.
+ ID3D1xInputLayout** ppD3DInputLayout = &pVertexInputLayout.GetRawRef();
+ HRESULT hResult = RenderParams.pDevice->CreateInputLayout(VertexDescription, OVR_ARRAY_COUNT(VertexDescription), SimpleTexturedQuad_vs, sizeof(SimpleTexturedQuad_vs), ppD3DInputLayout);
+ OVR_ASSERT(SUCCEEDED(hResult));
+ if(SUCCEEDED(hResult))
+ pShaderSet->SetShader(vs);
+
+ // Setup the pixel shader
+ Ptr<D3D_NS::PixelShader> ps = *new D3D_NS::PixelShader(&RenderParams, (void*)SimpleTexturedQuad_ps, sizeof(SimpleTexturedQuad_ps), SimpleTexturedQuad_ps_refl, OVR_ARRAY_COUNT(SimpleTexturedQuad_ps_refl));
+ pShaderSet->SetShader(ps);
+
+ if(!pBlendState)
+ {
+ D3D1X_(BLEND_DESC) bm;
+ memset(&bm, 0, sizeof(bm));
+ #if (OVR_D3D_VERSION == 10)
+ bm.BlendEnable[0] = TRUE;
+ bm.BlendOp = bm.BlendOpAlpha = D3D1X_(BLEND_OP_ADD);
+ bm.SrcBlend = bm.SrcBlendAlpha = D3D1X_(BLEND_SRC_ALPHA);
+ bm.DestBlend = bm.DestBlendAlpha = D3D1X_(BLEND_INV_SRC_ALPHA);
+ bm.RenderTargetWriteMask[0] = D3D1X_(COLOR_WRITE_ENABLE_ALL);
+ #else
+ bm.RenderTarget[0].BlendEnable = TRUE;
+ bm.RenderTarget[0].BlendOp = bm.RenderTarget[0].BlendOpAlpha = D3D1X_(BLEND_OP_ADD);
+ bm.RenderTarget[0].SrcBlend = bm.RenderTarget[0].SrcBlendAlpha = D3D1X_(BLEND_SRC_ALPHA);
+ bm.RenderTarget[0].DestBlend = bm.RenderTarget[0].DestBlendAlpha = D3D1X_(BLEND_INV_SRC_ALPHA);
+ bm.RenderTarget[0].RenderTargetWriteMask = D3D1X_(COLOR_WRITE_ENABLE_ALL);
+ #endif
+
+ RenderParams.pDevice->CreateBlendState(&bm, &pBlendState.GetRawRef());
+ }
+
+ if(!pRasterizerState)
+ {
+ D3D1X_(RASTERIZER_DESC) rs;
+ memset(&rs, 0, sizeof(rs));
+ rs.AntialiasedLineEnable = true;
+ rs.CullMode = D3D1X_(CULL_BACK);
+ rs.DepthClipEnable = true;
+ rs.FillMode = D3D1X_(FILL_SOLID);
+
+ RenderParams.pDevice->CreateRasterizerState(&rs, &pRasterizerState.GetRawRef());
+ }
+ }
+
+ if(!pVB)
+ {
+ pVB = *new Buffer(&RenderParams);
+
+ if(pVB)
+ {
+ const size_t vertexCount = 4;
+
+ pVB->Data(Buffer_Vertex, NULL, vertexCount * sizeof(HASWVertex));
+ HASWVertex* pVertices = (HASWVertex*)pVB->Map(0, vertexCount * sizeof(HASWVertex), Map_Discard);
+ OVR_ASSERT(pVertices);
+
+ if(pVertices)
+ {
+ const bool flip = ((RenderState.DistortionCaps & ovrDistortionCap_FlipInput) != 0);
+ const float left = -1.0f; // We currently draw this in normalized device coordinates with an stereo translation
+ const float top = -1.1f; // applied as a vertex shader uniform. In the future when we have a more formal graphics
+ const float right = 1.0f; // API abstraction we may move this draw to an overlay layer or to a more formal
+ const float bottom = 0.9f; // model/mesh scheme with a perspective projection.
+
+ pVertices[0] = HASWVertex(left, top, 0.f, Color(255, 255, 255, 255), 0.f, flip ? 1.f : 0.f);
+ pVertices[1] = HASWVertex(left, bottom, 0.f, Color(255, 255, 255, 255), 0.f, flip ? 0.f : 1.f);
+ pVertices[2] = HASWVertex(right, top, 0.f, Color(255, 255, 255, 255), 1.f, flip ? 1.f : 0.f);
+ pVertices[3] = HASWVertex(right, bottom, 0.f, Color(255, 255, 255, 255), 1.f, flip ? 0.f : 1.f);
+
+ pVB->Unmap(pVertices);
+ }
+ }
+ }
+}
+
+
+// Note: If we are drawing this warning onto the eye texture before distortion, the "time warp" functionality
+// will cause the warning to shake on the screen when the user moves their head. One solution is to disable
+// time warping while the warning or any screen-static GUI elements are present.
+
+void HSWDisplay::RenderInternal(ovrEyeType eye, const ovrTexture* eyeTexture)
+{
+ if(RenderEnabled && eyeTexture)
+ {
+ // We need to render to the eyeTexture with the texture viewport.
+ // Setup rendering to the texture.
+ ovrD3D1X(Texture)* eyeTextureD3D = const_cast<ovrD3D1X(Texture)*>(reinterpret_cast<const ovrD3D1X(Texture)*>(eyeTexture));
+ OVR_ASSERT(eyeTextureD3D->Texture.Header.API == ((OVR_D3D_VERSION == 10) ? ovrRenderAPI_D3D10 : ovrRenderAPI_D3D11));
+
+ // D3D10 is currently disabled while we track down a bug that results in a black screen.
+ //if(eyeTextureD3D->Texture.Header.API == ovrRenderAPI_D3D10)
+ // return;
+
+ // Load the graphics if not loaded already.
+ if(!pVB)
+ LoadGraphics();
+
+ // Calculate ortho projection.
+ GetOrthoProjection(RenderState, OrthoProjection);
+
+ // Save settings
+ // To do: Merge this saved state with that done by DistortionRenderer::GraphicsState::Save(), and put them in a shared location.
+ Ptr<ID3D1xBlendState> pBlendStateSaved;
+ FLOAT blendFactorSaved[4];
+ UINT blendSampleMaskSaved;
+ RenderParams.pContext->OMGetBlendState(&pBlendStateSaved.GetRawRef(), blendFactorSaved, &blendSampleMaskSaved);
+
+ Ptr<ID3D1xRasterizerState> pRasterizerStateSaved;
+ RenderParams.pContext->RSGetState(&pRasterizerStateSaved.GetRawRef());
+
+ Ptr<ID3D1xRenderTargetView> pTextureRenderTargetViewSaved;
+ Ptr<ID3D1xDepthStencilView> pDepthStencilViewSaved;
+ RenderParams.pContext->OMGetRenderTargets(1, &pTextureRenderTargetViewSaved.GetRawRef(), &pDepthStencilViewSaved.GetRawRef());
+
+ #ifndef D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE // D3D10 doesn't define this, so we pretend that it does.
+ #define D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE 4
+ #endif
+ D3D1x_VIEWPORT d3dViewportSaved[D3D1X_(VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE)];
+ UINT viewportCountSaved = OVR_ARRAY_COUNT(d3dViewportSaved);
+ RenderParams.pContext->RSGetViewports(&viewportCountSaved, d3dViewportSaved);
+
+ UINT stencilRefSaved;
+ Ptr<ID3D1xDepthStencilState> pDepthStencilStateSaved;
+ RenderParams.pContext->OMGetDepthStencilState(&pDepthStencilStateSaved.GetRawRef(), &stencilRefSaved);
+
+ Ptr<ID3D1xInputLayout> pInputLayoutSaved;
+ RenderParams.pContext->IAGetInputLayout(&pInputLayoutSaved.GetRawRef());
+
+ Ptr<ID3D1xBuffer> pVertexBufferSaved;
+ UINT vertexStrideSaved[1];
+ UINT vertexOffsetSaved[1];
+ RenderParams.pContext->IAGetVertexBuffers(0, 1, &pVertexBufferSaved.GetRawRef(), vertexStrideSaved, vertexOffsetSaved);
+
+ D3D1X_(PRIMITIVE_TOPOLOGY) topologySaved;
+ RenderParams.pContext->IAGetPrimitiveTopology(&topologySaved);
+
+
+ // Set our settings
+ RenderParams.pContext->OMSetBlendState(pBlendState, NULL, 0xffffffff);
+ RenderParams.pContext->RSSetState(pRasterizerState);
+
+ // We can't necessarily use a NULL D3D11_RENDER_TARGET_VIEW_DESC argument to CreateRenderTargetView, because we are rendering to
+ // a texture that somebody else created and which may have been created in a typeless format (e.g. DXGI_FORMAT_R8G8B8A8_TYPELESS).
+ // So what we do is check to see if the texture format is a typeless format and if see we pass a suitable D3D11_RENDER_TARGET_VIEW_DESC
+ // to CreateRenderTargetView instead of NULL.
+ D3D1X_(TEXTURE2D_DESC) texture2DDesc;
+ eyeTextureD3D->D3D_NS.pTexture->GetDesc(&texture2DDesc);
+
+ D3D1X_(RENDER_TARGET_VIEW_DESC) renderTargetViewDesc;
+ memset(&renderTargetViewDesc, 0, sizeof(renderTargetViewDesc));
+ renderTargetViewDesc.Format = GetFullyTypedDXGIFormat(texture2DDesc.Format); // DXGI_FORMAT. If this is a typeless format then GetFullyTypedFormat converts it to a fully typed format.
+ renderTargetViewDesc.ViewDimension = (texture2DDesc.SampleDesc.Count > 1) ? D3D1X_(RTV_DIMENSION_TEXTURE2DMS) : D3D1X_(RTV_DIMENSION_TEXTURE2D);
+ renderTargetViewDesc.Texture2D.MipSlice = 0;
+ Ptr<ID3D1xRenderTargetView> pTextureRenderTargetView;
+ HRESULT hResult = RenderParams.pDevice->CreateRenderTargetView(eyeTextureD3D->D3D_NS.pTexture, (renderTargetViewDesc.Format == texture2DDesc.Format) ? NULL : &renderTargetViewDesc, &pTextureRenderTargetView.GetRawRef());
+
+ if(SUCCEEDED(hResult))
+ {
+ RenderParams.pContext->OMSetRenderTargets(1, &pTextureRenderTargetView.GetRawRef(), NULL); // We currently don't bind a depth buffer.
+
+ D3D1x_VIEWPORT D3DViewport;
+
+ OVR_DISABLE_MSVC_WARNING(4244) // conversion from int to float
+ D3DViewport.TopLeftX = eyeTextureD3D->Texture.Header.RenderViewport.Pos.x;
+ D3DViewport.TopLeftY = eyeTextureD3D->Texture.Header.RenderViewport.Pos.y;
+ D3DViewport.Width = eyeTextureD3D->Texture.Header.RenderViewport.Size.w;
+ D3DViewport.Height = eyeTextureD3D->Texture.Header.RenderViewport.Size.h;
+ D3DViewport.MinDepth = 0;
+ D3DViewport.MaxDepth = 1;
+ RenderParams.pContext->RSSetViewports(1, &D3DViewport);
+ OVR_RESTORE_MSVC_WARNING()
+
+ // We don't set up a world/view/projection matrix because we are using
+ // normalized device coordinates below.
+
+ // We don't set the depth state because we aren't using it.
+ // RenderParams.pContext->OMSetDepthStencilState(<depth state>, 0);
+
+ ShaderFill fill(pShaderSet);
+ fill.SetInputLayout(pVertexInputLayout);
+ if(pTexture)
+ fill.SetTexture(0, pTexture, Shader_Pixel);
+
+ const float scale = HSWDISPLAY_SCALE * ((RenderState.OurHMDInfo.HmdType == HmdType_DK1) ? 0.70f : 1.f);
+ pShaderSet->SetUniform2f("Scale", scale, scale / 2.f); // X and Y scale. Y is a fixed proportion to X in order to give a certain aspect ratio.
+ pShaderSet->SetUniform4f("Color", 1.f, 1.f, 1.f, 1.f);
+ pShaderSet->SetUniform2f("PositionOffset", OrthoProjection[eye].GetTranslation().x, 0.0f);
+
+ RenderParams.pContext->IASetInputLayout((ID3D1xInputLayout*)fill.GetInputLayout());
+
+ ID3D1xBuffer* vertexBuffer = pVB->GetBuffer();
+ UINT vertexStride = sizeof(HASWVertex);
+ UINT vertexOffset = 0;
+ RenderParams.pContext->IASetVertexBuffers(0, 1, &vertexBuffer, &vertexStride, &vertexOffset);
+
+ ShaderBase* vShaderBase = (ShaderBase*)pShaderSet->GetShader(OVR::CAPI::D3D_NS::Shader_Vertex);
+ unsigned char* vertexData = vShaderBase->UniformData;
+
+ if (vertexData)
+ {
+ UniformBufferArray[OVR::CAPI::D3D_NS::Shader_Vertex]->Data(OVR::CAPI::D3D_NS::Buffer_Uniform, vertexData, vShaderBase->UniformsSize);
+ vShaderBase->SetUniformBuffer(UniformBufferArray[OVR::CAPI::D3D_NS::Shader_Vertex]);
+ }
+
+ for (int i = (OVR::CAPI::D3D_NS::Shader_Vertex + 1); i < OVR::CAPI::D3D_NS::Shader_Count; i++)
+ {
+ if (pShaderSet->GetShader(i))
+ {
+ ((ShaderBase*)pShaderSet->GetShader(i))->UpdateBuffer(UniformBufferArray[i]);
+ ((ShaderBase*)pShaderSet->GetShader(i))->SetUniformBuffer(UniformBufferArray[i]);
+ }
+ }
+
+ RenderParams.pContext->IASetPrimitiveTopology(D3D1X_(PRIMITIVE_TOPOLOGY_TRIANGLESTRIP));
+ fill.Set(Prim_TriangleStrip);
+
+ RenderParams.pContext->Draw(4, 0);
+ }
+ else
+ {
+ HSWDISPLAY_LOG(("[HSWDisplay D3D1x] CreateRenderTargetView() failed"));
+ }
+
+
+ // Restore settings
+ RenderParams.pContext->IASetPrimitiveTopology(topologySaved);
+ RenderParams.pContext->IASetVertexBuffers(0, 1, &pVertexBufferSaved.GetRawRef(), &vertexStrideSaved[0], &vertexOffsetSaved[0]);
+ RenderParams.pContext->IASetInputLayout(pInputLayoutSaved);
+ RenderParams.pContext->OMSetDepthStencilState(pDepthStencilStateSaved, stencilRefSaved);
+ RenderParams.pContext->RSSetViewports(viewportCountSaved, d3dViewportSaved);
+ RenderParams.pContext->OMSetRenderTargets(1, &pTextureRenderTargetViewSaved.GetRawRef(), pDepthStencilViewSaved);
+ RenderParams.pContext->RSSetState(pRasterizerStateSaved);
+ RenderParams.pContext->OMSetBlendState(pBlendStateSaved, blendFactorSaved, blendSampleMaskSaved);
+ }
+}
+
+}}} // namespace OVR::CAPI::D3D_NS
+
+
+#endif // OVR_D3D_VERSION
+
+
+
+
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.h b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.h new file mode 100644 index 0000000..2c5762d --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.h @@ -0,0 +1,84 @@ +/************************************************************************************
+
+Filename : CAPI_D3D1X_HSWDisplay.h
+Content : Implements Health and Safety Warning system.
+Created : July 7, 2014
+Authors : Paul Pedriana
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+// Do not use include guards, as this file is #included separately by both
+// CAPI_D3D10_HSWDisplay.h and CAPI_D3D11_HSWDisplay.h with OVR_D3D_VERSION defined
+// to either 10 or 11. Only those two headers should #include this one.
+//#ifndef OVR_CAPI_D3D1X_HSWDisplay_h
+//#define OVR_CAPI_D3D1X_HSWDisplay_h
+
+//#if !defined(OVR_CAPI_D3D10_HSWDisplay_h) && !defined(OVR_CAPI_D3D11_HSWDisplay_h)
+// #error This header is expected to be compiled only by these two headers.
+//#endif
+#if !defined(OVR_D3D_VERSION) || ((OVR_D3D_VERSION != 10) && (OVR_D3D_VERSION != 11))
+ #error This header expects OVR_D3D_VERSION to be defined, to 10 or 11.
+#endif
+
+#include "../CAPI_HSWDisplay.h"
+#include "CAPI_D3D1X_Util.h"
+
+
+namespace OVR { namespace CAPI { namespace D3D_NS {
+
+ class HSWDisplay : public CAPI::HSWDisplay
+ {
+ public:
+ HSWDisplay(ovrRenderAPIType api, ovrHmd hmd, const HMDRenderState& renderState);
+
+ // Must be called before use. apiConfig is such that:
+ // const ovrD3D11Config* config = (const ovrD3D11Config*)apiConfig; or
+ bool Initialize(const ovrRenderAPIConfig* apiConfig);
+ void Shutdown();
+ void DisplayInternal();
+ void DismissInternal();
+
+ // Draws the warning to the eye texture(s). This must be done at the end of a
+ // frame but prior to executing the distortion rendering of the eye textures.
+ void RenderInternal(ovrEyeType eye, const ovrTexture* eyeTexture);
+
+ protected:
+ void LoadGraphics();
+ void UnloadGraphics();
+
+ OVR::CAPI::D3D_NS::RenderParams RenderParams;
+ Ptr<ID3D1xSamplerState> pSamplerState;
+ Ptr<OVR::CAPI::D3D_NS::Texture> pTexture;
+ Ptr<Buffer> pVB;
+ Ptr<Buffer> UniformBufferArray[OVR::CAPI::D3D_NS::Shader_Count];
+ Ptr<ShaderSet> pShaderSet;
+ Ptr<ID3D1xInputLayout> pVertexInputLayout;
+ Ptr<ID3D1xBlendState> pBlendState;
+ Ptr<ID3D1xRasterizerState> pRasterizerState;
+ Matrix4f OrthoProjection[ovrEye_Count];
+
+ private:
+ OVR_NON_COPYABLE(HSWDisplay)
+ };
+
+}}} // namespace OVR::CAPI::D3D_NS
+
+
+
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_Util.cpp b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_Util.cpp index 90b4347..f95fb3c 100644 --- a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_Util.cpp +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_Util.cpp @@ -5,16 +5,16 @@ Content : D3DX10 utility classes for rendering Created : September 10, 2012
Authors : Andrew Reisse
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
-http://www.oculusvr.com/licenses/LICENSE-3.1
+http://www.oculusvr.com/licenses/LICENSE-3.2
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
@@ -37,11 +37,28 @@ namespace OVR { namespace CAPI { namespace D3D_NS { void ShaderFill::Set(PrimitiveType prim) const
{
Shaders->Set(prim);
- for(int i = 0; i < 8; i++)
+
+ for(int i = 0; i < 8; ++i)
+ {
+ if ( VsTextures[i] != NULL )
+ {
+ VsTextures[i]->Set(i, Shader_Vertex);
+ }
+ }
+
+ for(int i = 0; i < 8; ++i)
+ {
+ if ( CsTextures[i] != NULL )
+ {
+ CsTextures[i]->Set(i, Shader_Compute);
+ }
+ }
+
+ for(int i = 0; i < 8; ++i)
{
- if(Textures[i])
+ if ( PsTextures[i] != NULL )
{
- Textures[i]->Set(i);
+ PsTextures[i]->Set(i, Shader_Fragment);
}
}
}
@@ -54,7 +71,7 @@ Buffer::~Buffer() {
}
-bool Buffer::Data(int use, const void *buffer, size_t size)
+bool Buffer::Data(int use, const void *buffer, size_t size, int computeBufferStride /*=-1*/)
{
if (D3DBuffer && Size >= size)
{
@@ -73,6 +90,7 @@ bool Buffer::Data(int use, const void *buffer, size_t size) }
else
{
+ OVR_ASSERT (!(use & Buffer_ReadOnly));
pParams->pContext->UpdateSubresource(D3DBuffer, 0, NULL, buffer, 0, 0);
return true;
}
@@ -82,8 +100,12 @@ bool Buffer::Data(int use, const void *buffer, size_t size) D3DBuffer = NULL;
Size = 0;
Use = 0;
- Dynamic = 0;
+ Dynamic = false;
}
+ D3DSrv = NULL;
+#if (OVR_D3D_VERSION >= 11)
+ D3DUav = NULL;
+#endif
D3D1X_(BUFFER_DESC) desc;
memset(&desc, 0, sizeof(desc));
@@ -96,7 +118,7 @@ bool Buffer::Data(int use, const void *buffer, size_t size) {
desc.Usage = D3D1X_(USAGE_DYNAMIC);
desc.CPUAccessFlags = D3D1X_(CPU_ACCESS_WRITE);
- Dynamic = 1;
+ Dynamic = true;
}
switch(use & Buffer_TypeMask)
@@ -105,7 +127,32 @@ bool Buffer::Data(int use, const void *buffer, size_t size) case Buffer_Index: desc.BindFlags = D3D1X_(BIND_INDEX_BUFFER); break;
case Buffer_Uniform:
desc.BindFlags = D3D1X_(BIND_CONSTANT_BUFFER);
- size += ((size + 15) & ~15) - size;
+ size = ((size + 15) & ~15);
+ break;
+ case Buffer_Compute:
+#if (OVR_D3D_VERSION >= 11)
+ // There's actually a bunch of options for buffers bound to a CS.
+ // Right now this is the most appropriate general-purpose one. Add more as needed.
+
+ // NOTE - if you want D3D1X_(CPU_ACCESS_WRITE), it MUST be either D3D1X_(USAGE_DYNAMIC) or D3D1X_(USAGE_STAGING).
+ // TODO: we want a resource that is rarely written to, in which case we'd need two surfaces - one a STAGING
+ // that the CPU writes to, and one a DEFAULT, and we CopyResource from one to the other. Hassle!
+ // Setting it as D3D1X_(USAGE_DYNAMIC) will get the job done for now.
+ // Also for fun - you can't have a D3D1X_(USAGE_DYNAMIC) buffer that is also a D3D1X_(BIND_UNORDERED_ACCESS).
+ OVR_ASSERT ( !(use & Buffer_ReadOnly) );
+ desc.BindFlags = D3D1X_(BIND_SHADER_RESOURCE);
+ desc.Usage = D3D1X_(USAGE_DYNAMIC);
+ desc.MiscFlags = D3D1X_(RESOURCE_MISC_BUFFER_STRUCTURED);
+ desc.CPUAccessFlags = D3D1X_(CPU_ACCESS_WRITE);
+ OVR_ASSERT ( computeBufferStride > 0 );
+ desc.StructureByteStride = computeBufferStride; // sizeof(DistortionComputePin);
+
+ Dynamic = true;
+ size = ((size + 15) & ~15);
+#else
+ OVR_UNUSED ( computeBufferStride );
+ OVR_ASSERT ( false ); // No compute shaders in DX10
+#endif
break;
}
@@ -116,14 +163,46 @@ bool Buffer::Data(int use, const void *buffer, size_t size) sr.SysMemPitch = 0;
sr.SysMemSlicePitch = 0;
+ D3DBuffer = NULL;
HRESULT hr = pParams->pDevice->CreateBuffer(&desc, buffer ? &sr : NULL, &D3DBuffer.GetRawRef());
if (SUCCEEDED(hr))
{
Use = use;
Size = desc.ByteWidth;
- return 1;
}
- return 0;
+ else
+ {
+ OVR_ASSERT ( false );
+ return false;
+ }
+
+ if ( ( use & Buffer_TypeMask ) == Buffer_Compute )
+ {
+ HRESULT hres = pParams->pDevice->CreateShaderResourceView ( D3DBuffer, NULL, &D3DSrv.GetRawRef() );
+ if ( SUCCEEDED(hres) )
+ {
+#if (OVR_D3D_VERSION >= 11)
+#if 0 // Right now we do NOT ask for UAV access (see flags above).
+ hres = Ren->Device->CreateUnorderedAccessView ( D3DBuffer, NULL, &D3DUav.GetRawRef() );
+ if ( SUCCEEDED(hres) )
+ {
+ // All went well.
+ }
+#endif
+#endif
+ }
+
+ if ( !SUCCEEDED(hres) )
+ {
+ OVR_ASSERT ( false );
+ Use = 0;
+ Size = 0;
+ return false;
+ }
+ }
+
+ return true;
+
}
void* Buffer::Map(size_t start, size_t size, int flags)
@@ -170,6 +249,12 @@ template<> bool ShaderImpl<Shader_Pixel, ID3D1xPixelShader>::Load(void* shader, {
return SUCCEEDED(pParams->pDevice->CreatePixelShader(shader, size D3D11_COMMA_0, &D3DShader));
}
+#if (OVR_D3D_VERSION>=11)
+template<> bool ShaderImpl<Shader_Compute, ID3D1xComputeShader>::Load(void* shader, size_t size)
+{
+ return SUCCEEDED(pParams->pDevice->CreateComputeShader(shader, size D3D11_COMMA_0, &D3DShader));
+}
+#endif
template<> void ShaderImpl<Shader_Vertex, ID3D1xVertexShader>::Set(PrimitiveType) const
{
@@ -179,6 +264,12 @@ template<> void ShaderImpl<Shader_Pixel, ID3D1xPixelShader>::Set(PrimitiveType) {
pParams->pContext->PSSetShader(D3DShader D3D11_COMMA_0 D3D11_COMMA_0 ) ;
}
+#if (OVR_D3D_VERSION>=11)
+template<> void ShaderImpl<Shader_Compute, ID3D1xComputeShader>::Set(PrimitiveType) const
+{
+ pParams->pContext->CSSetShader(D3DShader D3D11_COMMA_0 D3D11_COMMA_0 ) ;
+}
+#endif
template<> void ShaderImpl<Shader_Vertex, ID3D1xVertexShader>::SetUniformBuffer(Buffer* buffer, int i)
{
@@ -188,19 +279,36 @@ template<> void ShaderImpl<Shader_Pixel, ID3D1xPixelShader>::SetUniformBuffer(Bu {
pParams->pContext->PSSetConstantBuffers(i, 1, &((Buffer*)buffer)->D3DBuffer.GetRawRef());
}
-
+#if (OVR_D3D_VERSION>=11)
+template<> void ShaderImpl<Shader_Compute, ID3D1xComputeShader>::SetUniformBuffer(Buffer* buffer, int i)
+{
+ pParams->pContext->CSSetConstantBuffers(i, 1, &((Buffer*)buffer)->D3DBuffer.GetRawRef());
+}
+#endif
//-------------------------------------------------------------------------------------
// ***** Shader Base
-ShaderBase::ShaderBase(RenderParams* rp, ShaderStage stage)
- : Shader(stage), pParams(rp), UniformData(0)
+ShaderBase::ShaderBase(RenderParams* rp, ShaderStage stage) :
+ Shader(stage),
+ pParams(rp),
+ UniformData(NULL),
+ UniformsSize(0),
+ UniformRefl(NULL),
+ UniformReflSize(0)
{
}
+
ShaderBase::~ShaderBase()
{
- if (UniformData)
- OVR_FREE(UniformData);
+ if (UniformData)
+ {
+ OVR_FREE(UniformData);
+ UniformData = NULL;
+ }
+
+ // UniformRefl does not need to be freed
+ UniformRefl = NULL;
}
bool ShaderBase::SetUniform(const char* name, int n, const float* v)
@@ -292,7 +400,16 @@ void Texture::Set(int slot, ShaderStage stage) const case Shader_Vertex:
pParams->pContext->VSSetShaderResources(slot, 1, &texSv);
+ pParams->pContext->VSSetSamplers(slot, 1, &Sampler.GetRawRef());
break;
+
+#if (OVR_D3D_VERSION >= 11)
+ case Shader_Compute:
+ pParams->pContext->CSSetShaderResources(slot, 1, &texSv);
+ pParams->pContext->CSSetSamplers(slot, 1, &Sampler.GetRawRef());
+ break;
+#endif
+ default: OVR_ASSERT ( false ); break;
}
}
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_Util.h b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_Util.h index 5213565..dc5dc8d 100644 --- a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_Util.h +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_Util.h @@ -5,16 +5,16 @@ Content : D3DX 10/11 utility classes for rendering Created : September 10, 2012
Authors : Andrew Reisse
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
-http://www.oculusvr.com/licenses/LICENSE-3.1
+http://www.oculusvr.com/licenses/LICENSE-3.2
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
@@ -42,6 +42,7 @@ limitations under the License. #include "../../Kernel/OVR_Math.h"
#if defined(OVR_OS_WIN32)
+#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <comdef.h> // for _COM_SMARTPTR_TYPEDEF()
@@ -96,6 +97,13 @@ typedef ID3D1X(Buffer) ID3D1xBuffer; typedef ID3D1X(VertexShader) ID3D1xVertexShader;
typedef ID3D1X(PixelShader) ID3D1xPixelShader;
typedef ID3D1X(GeometryShader) ID3D1xGeometryShader;
+#if (OVR_D3D_VERSION>=11)
+typedef ID3D1X(UnorderedAccessView) ID3D1xUnorderedAccessView;
+typedef ID3D1X(ComputeShader) ID3D1xComputeShader;
+#else
+// Typedeffing as int saves a lot of checking against DX version numbers when just copying around pointers.
+typedef int ID3D1xUnorderedAccessView;
+#endif
typedef ID3D1X(BlendState) ID3D1xBlendState;
typedef ID3D1X(RasterizerState) ID3D1xRasterizerState;
typedef ID3D1X(SamplerState) ID3D1xSamplerState;
@@ -107,6 +115,13 @@ typedef D3D1X_(VIEWPORT) D3D1x_VIEWPORT; typedef D3D1X_(QUERY_DESC) D3D1x_QUERY_DESC;
typedef D3D1X_(SHADER_BUFFER_DESC) D3D1x_SHADER_BUFFER_DESC;
typedef D3D1X_(SHADER_VARIABLE_DESC) D3D1x_SHADER_VARIABLE_DESC;
+typedef D3D1X_(PRIMITIVE_TOPOLOGY) D3D1x_PRIMITIVE_TOPOLOGY;
+static const int D3D1x_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT = D3D1X_(COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT);
+static const int D3D1x_COMMONSHADER_SAMPLER_SLOT_COUNT = D3D1X_(COMMONSHADER_SAMPLER_SLOT_COUNT);
+static const int D3D1x_SIMULTANEOUS_RENDER_TARGET_COUNT = D3D1X_(SIMULTANEOUS_RENDER_TARGET_COUNT);
+static const int D3D1x_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = D3D1X_(IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT);
+static const int D3D1x_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT = D3D1X_(COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT);
+
// Blob is the same
typedef ID3D10Blob ID3D1xBlob;
@@ -129,12 +144,13 @@ class Buffer; // Rendering parameters/pointers describing D3DX rendering setup.
struct RenderParams
{
- ID3D1xDevice* pDevice;
- ID3D1xDeviceContext* pContext;
- ID3D1xRenderTargetView* pBackBufferRT;
- IDXGISwapChain* pSwapChain;
- Sizei RTSize;
- int Multisample;
+ ID3D1xDevice* pDevice;
+ ID3D1xDeviceContext* pContext;
+ ID3D1xRenderTargetView* pBackBufferRT;
+ ID3D1xUnorderedAccessView* pBackBufferUAV;
+ IDXGISwapChain* pSwapChain;
+ Sizei BackBufferSize;
+ int Multisample;
};
@@ -154,7 +170,8 @@ enum ShaderStage Shader_Vertex = 0,
Shader_Fragment = 2,
Shader_Pixel = 2,
- Shader_Count = 3,
+ Shader_Compute = 3, // DX11+ only
+ Shader_Count = 4,
};
enum MapFlags
@@ -172,6 +189,7 @@ enum BufferUsage Buffer_Vertex = 1,
Buffer_Index = 2,
Buffer_Uniform = 4,
+ Buffer_Compute = 8,
Buffer_TypeMask = 0xff,
Buffer_ReadOnly = 0x100, // Buffer must be created with Data().
};
@@ -298,6 +316,13 @@ public: Matrix4f mt = m.Transposed();
return SetUniform(name, 16, &mt.M[0][0]);
}
+ virtual bool SetUniform3x3f(const char* name, const Matrix4f& m)
+ {
+ // float3x3 is actually stored the same way as float4x3, with the last items ignored by the code.
+ Matrix4f mt = m.Transposed();
+ return SetUniform(name, 12, &mt.M[0][0]);
+ }
+
};
@@ -306,7 +331,9 @@ public: class ShaderFill : public RefCountBase<ShaderFill>
{
Ptr<ShaderSet> Shaders;
- Ptr<class Texture> Textures[8];
+ Ptr<class Texture> PsTextures[8];
+ Ptr<class Texture> VsTextures[8];
+ Ptr<class Texture> CsTextures[8];
void* InputLayout; // HACK this should be abstracted
public:
@@ -317,7 +344,17 @@ public: void* GetInputLayout() const { return InputLayout; }
virtual void Set(PrimitiveType prim = Prim_Unknown) const;
- virtual void SetTexture(int i, class Texture* tex) { if (i < 8) Textures[i] = tex; }
+
+ virtual void SetTexture(int i, class Texture* tex, ShaderStage stage)
+ {
+ if (i < 8)
+ {
+ if(stage == Shader_Pixel) PsTextures[i] = tex;
+ else if(stage == Shader_Vertex) VsTextures[i] = tex;
+ else if(stage == Shader_Compute) CsTextures[i] = tex;
+ else OVR_ASSERT(false);
+ }
+ }
void SetInputLayout(void* newIL) { InputLayout = (void*)newIL; }
};
@@ -339,11 +376,12 @@ public: struct Uniform
{
const char* Name;
- VarType Type;
- int Offset, Size;
+ VarType Type;
+ int Offset;
+ int Size;
};
- const Uniform* UniformRefl;
- size_t UniformReflSize;
+ const Uniform* UniformRefl;
+ size_t UniformReflSize;
ShaderBase(RenderParams* rp, ShaderStage stage);
~ShaderBase();
@@ -383,27 +421,53 @@ public: typedef ShaderImpl<Shader_Vertex, ID3D1xVertexShader> VertexShader;
typedef ShaderImpl<Shader_Fragment, ID3D1xPixelShader> PixelShader;
+#if (OVR_D3D_VERSION>=11)
+typedef ShaderImpl<Shader_Compute, ID3D1xComputeShader> ComputeShader;
+#endif
class Buffer : public RefCountBase<Buffer>
{
public:
- RenderParams* pParams;
- Ptr<ID3D1xBuffer> D3DBuffer;
+ RenderParams* pParams;
+ Ptr<ID3D1xBuffer> D3DBuffer;
+ Ptr<ID3D1xShaderResourceView> D3DSrv;
+#if (OVR_D3D_VERSION >= 11)
+ Ptr<ID3D1xUnorderedAccessView> D3DUav;
+#endif
size_t Size;
int Use;
bool Dynamic;
public:
- Buffer(RenderParams* rp) : pParams(rp), Size(0), Use(0) {}
+ Buffer(RenderParams* rp) : pParams(rp), D3DBuffer(), D3DSrv(),
+#if (OVR_D3D_VERSION >= 11)
+ D3DUav(),
+#endif
+ Size(0), Use(0), Dynamic(false) {}
~Buffer();
- ID3D1xBuffer* GetBuffer() const { return D3DBuffer; }
+ ID3D1xBuffer* GetBuffer() const
+ {
+ return D3DBuffer;
+ }
+
+ ID3D1xShaderResourceView* GetSrv() const
+ {
+ return D3DSrv;
+ }
+
+#if (OVR_D3D_VERSION >= 11)
+ ID3D1xUnorderedAccessView* GetUav() const
+ {
+ return D3DUav;
+ }
+#endif
virtual size_t GetSize() { return Size; }
virtual void* Map(size_t start, size_t size, int flags = 0);
virtual bool Unmap(void *m);
- virtual bool Data(int use, const void* buffer, size_t size);
+ virtual bool Data(int use, const void* buffer, size_t size, int computeBufferStride = -1);
};
@@ -415,6 +479,7 @@ public: Ptr<ID3D1xShaderResourceView> TexSv;
Ptr<ID3D1xRenderTargetView> TexRtv;
Ptr<ID3D1xDepthStencilView> TexDsv;
+ // TODO: add UAV...
mutable Ptr<ID3D1xSamplerState> Sampler;
Sizei TextureSize;
int Samples;
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D9_DistortionRenderer.cpp b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D9_DistortionRenderer.cpp deleted file mode 100644 index b777ab5..0000000 --- a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D9_DistortionRenderer.cpp +++ /dev/null @@ -1,279 +0,0 @@ -/************************************************************************************
-
-Filename : CAPI_D3D1X_DistortionRenderer.cpp
-Content : Experimental distortion renderer
-Created : March 7th, 2014
-Authors : Tom Heath
-
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
-
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
-you may not use the Oculus VR Rift SDK except in compliance with the License,
-which is provided at the time of installation or download, or which
-otherwise accompanies this software in either electronic or hard copy form.
-
-You may obtain a copy of the License at
-
-http://www.oculusvr.com/licenses/LICENSE-3.1
-
-Unless required by applicable law or agreed to in writing, the Oculus VR SDK
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-************************************************************************************/
-
-#include "CAPI_D3D9_DistortionRenderer.h"
-#define OVR_D3D_VERSION 9
-#include "../../OVR_CAPI_D3D.h"
-
-namespace OVR { namespace CAPI { namespace D3D9 {
-
-
-///QUESTION : Why not just a normal constructor?
-CAPI::DistortionRenderer* DistortionRenderer::Create(ovrHmd hmd,
- FrameTimeManager& timeManager,
- const HMDRenderState& renderState)
-{
- return new DistortionRenderer(hmd, timeManager, renderState);
-}
-
-DistortionRenderer::DistortionRenderer(ovrHmd hmd, FrameTimeManager& timeManager,
- const HMDRenderState& renderState)
- : CAPI::DistortionRenderer(ovrRenderAPI_D3D9, hmd, timeManager, renderState)
-{
-}
-/**********************************************/
-DistortionRenderer::~DistortionRenderer()
-{
- //Release any memory
- eachEye[0].dxIndices->Release();
- eachEye[0].dxVerts->Release();
- eachEye[1].dxIndices->Release();
- eachEye[1].dxVerts->Release();
-}
-
-
-/******************************************************************************/
-bool DistortionRenderer::Initialize(const ovrRenderAPIConfig* apiConfig,
- unsigned arg_distortionCaps)
-{
- ///QUESTION - what is returned bool for??? Are we happy with this true, if not config.
- const ovrD3D9Config * config = (const ovrD3D9Config*)apiConfig;
- if (!config) return true;
- if (!config->D3D9.pDevice) return false;
-
- //Glean all the required variables from the input structures
- device = config->D3D9.pDevice;
- swapChain = config->D3D9.pSwapChain;
- screenSize = config->D3D9.Header.RTSize;
- distortionCaps = arg_distortionCaps;
-
- GfxState = *new GraphicsState(device);
-
- CreateVertexDeclaration();
- CreateDistortionShaders();
- Create_Distortion_Models();
-
- return true;
-}
-
-
-/**************************************************************/
-void DistortionRenderer::SubmitEye(int eyeId, ovrTexture* eyeTexture)
-{
- //Doesn't do a lot in here??
- const ovrD3D9Texture* tex = (const ovrD3D9Texture*)eyeTexture;
-
- //Write in values
- eachEye[eyeId].texture = tex->D3D9.pTexture;
-
- // Its only at this point we discover what the viewport of the texture is.
- // because presumably we allow users to realtime adjust the resolution.
- eachEye[eyeId].TextureSize = tex->D3D9.Header.TextureSize;
- eachEye[eyeId].RenderViewport = tex->D3D9.Header.RenderViewport;
-
- const ovrEyeRenderDesc& erd = RState.EyeRenderDesc[eyeId];
-
- ovrHmd_GetRenderScaleAndOffset( erd.Fov,
- eachEye[eyeId].TextureSize, eachEye[eyeId].RenderViewport,
- eachEye[eyeId].UVScaleOffset );
-}
-
-
-/******************************************************************/
-void DistortionRenderer::EndFrame(bool swapBuffers,
- unsigned char* latencyTesterDrawColor, unsigned char* latencyTester2DrawColor)
-{
- OVR_UNUSED(swapBuffers);
- OVR_UNUSED(latencyTesterDrawColor);
-
- ///QUESTION : Should I be clearing the screen?
- ///QUESTION : Should I be ensuring the screen is the render target
-
- if (!TimeManager.NeedDistortionTimeMeasurement())
- {
- if (RState.DistortionCaps & ovrDistortionCap_TimeWarp)
- {
- // Wait for timewarp distortion if it is time and Gpu idle
- WaitTillTimeAndFlushGpu(TimeManager.GetFrameTiming().TimewarpPointTime);
- }
-
- RenderBothDistortionMeshes();
- }
- else
- {
- // If needed, measure distortion time so that TimeManager can better estimate
- // latency-reducing time-warp wait timing.
- WaitUntilGpuIdle();
- double distortionStartTime = ovr_GetTimeInSeconds();
-
- RenderBothDistortionMeshes();
- WaitUntilGpuIdle();
-
- TimeManager.AddDistortionTimeMeasurement(ovr_GetTimeInSeconds() - distortionStartTime);
- }
-
- if(latencyTesterDrawColor)
- {
- ///QUESTION : Is this still to be supported?
- ///renderLatencyQuad(latencyTesterDrawColor);
- }
-
- if(latencyTester2DrawColor)
- {
- // TODO:
- }
-
- if (swapBuffers)
- {
- if (swapChain)
- {
- swapChain->Present(NULL, NULL, NULL, NULL, 0);
- }
- else
- {
- device->Present( NULL, NULL, NULL, NULL );
- }
-
- // Force GPU to flush the scene, resulting in the lowest possible latency.
- // It's critical that this flush is *after* present.
- WaitUntilGpuIdle();
- }
-}
-
-
-void DistortionRenderer::WaitUntilGpuIdle()
-{
- if(device)
- {
- IDirect3DQuery9* pEventQuery=NULL ;
- device->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQuery) ;
-
- if(pEventQuery!=NULL)
- {
- pEventQuery->Issue(D3DISSUE_END) ;
- while(S_FALSE == pEventQuery->GetData(NULL, 0, D3DGETDATA_FLUSH)) ;
- }
- }
-}
-
-double DistortionRenderer::WaitTillTimeAndFlushGpu(double absTime)
-{
- double initialTime = ovr_GetTimeInSeconds();
- if (initialTime >= absTime)
- return 0.0;
-
- WaitUntilGpuIdle();
-
- double newTime = initialTime;
- volatile int i;
-
- while (newTime < absTime)
- {
- for (int j = 0; j < 50; j++)
- i = 0;
- newTime = ovr_GetTimeInSeconds();
- }
-
- // How long we waited
- return newTime - initialTime;
-}
-
-
-
-DistortionRenderer::GraphicsState::GraphicsState(IDirect3DDevice9* d)
-: device(d)
-, numSavedStates(0)
-{
-}
-
-void DistortionRenderer::GraphicsState::RecordAndSetState(int which, int type, DWORD newValue)
-{
- SavedStateType * sst = &savedState[numSavedStates++];
- sst->which = which;
- sst->type = type;
- if (which == 0)
- {
- device->GetSamplerState(0, (D3DSAMPLERSTATETYPE)type, &sst->valueToRevertTo);
- device->SetSamplerState(0, (D3DSAMPLERSTATETYPE)type, newValue);
- }
- else
- {
- device->GetRenderState((D3DRENDERSTATETYPE)type, &sst->valueToRevertTo);
- device->SetRenderState((D3DRENDERSTATETYPE)type, newValue);
- }
-}
-
-void DistortionRenderer::GraphicsState::Save()
-{
- //Record and set rasterizer and sampler states.
-
- numSavedStates=0;
-
- RecordAndSetState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
- RecordAndSetState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
- RecordAndSetState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR );
- RecordAndSetState(0, D3DSAMP_BORDERCOLOR, 0x000000 );
- RecordAndSetState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_BORDER );
- RecordAndSetState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_BORDER );
-
- RecordAndSetState(1, D3DRS_MULTISAMPLEANTIALIAS, FALSE );
- RecordAndSetState(1, D3DRS_DITHERENABLE, FALSE );
- RecordAndSetState(1, D3DRS_ZENABLE, FALSE );
- RecordAndSetState(1, D3DRS_ZWRITEENABLE, TRUE );
- RecordAndSetState(1, D3DRS_ZFUNC, D3DCMP_LESSEQUAL );
- RecordAndSetState(1, D3DRS_CULLMODE , D3DCULL_CCW );
- RecordAndSetState(1, D3DRS_ALPHABLENDENABLE , FALSE );
- RecordAndSetState(1, D3DRS_DEPTHBIAS , 0 );
- RecordAndSetState(1, D3DRS_SRCBLEND , D3DBLEND_SRCALPHA );
- RecordAndSetState(1, D3DRS_DESTBLEND , D3DBLEND_INVSRCALPHA );
- RecordAndSetState(1, D3DRS_FILLMODE, D3DFILL_SOLID );
- RecordAndSetState(1, D3DRS_ALPHATESTENABLE, FALSE);
- RecordAndSetState(1, D3DRS_DEPTHBIAS , 0 );
- RecordAndSetState(1, D3DRS_LIGHTING, FALSE );
- RecordAndSetState(1, D3DRS_FOGENABLE, FALSE );
-}
-
-
-void DistortionRenderer::GraphicsState::Restore()
-{
- for (int i = 0; i<numSavedStates; i++)
- {
- SavedStateType * sst = &savedState[i];
- if (sst->which == 0)
- {
- device->SetSamplerState(0, (D3DSAMPLERSTATETYPE)sst->type, sst->valueToRevertTo);
- }
- else
- {
- device->SetRenderState((D3DRENDERSTATETYPE)sst->type, sst->valueToRevertTo);
- }
- }
-}
-
-
-}}} // OVR::CAPI::D3D1X
-
-
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D9_DistortionRenderer.h b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D9_DistortionRenderer.h deleted file mode 100644 index 0ac7ae9..0000000 --- a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D9_DistortionRenderer.h +++ /dev/null @@ -1,139 +0,0 @@ -/************************************************************************************
-
-Filename : CAPI_D3D1X_DistortionRenderer.h
-Content : Experimental distortion renderer
-Created : March 7, 2014
-Authors : Tom Heath
-
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
-
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
-you may not use the Oculus VR Rift SDK except in compliance with the License,
-which is provided at the time of installation or download, or which
-otherwise accompanies this software in either electronic or hard copy form.
-
-You may obtain a copy of the License at
-
-http://www.oculusvr.com/licenses/LICENSE-3.1
-
-Unless required by applicable law or agreed to in writing, the Oculus VR SDK
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-************************************************************************************/
-
-#include "../../Kernel/OVR_Types.h"
-
-#undef new
-
-#if defined (OVR_OS_WIN32)
-#if _MSC_VER < 1700
-#include <d3dx9.h>
-#else
-#include <d3d9.h>
-#endif
-#endif
-
-#if defined(OVR_DEFINE_NEW)
-#define new OVR_DEFINE_NEW
-#endif
-
-#include "../CAPI_DistortionRenderer.h"
-
-
-namespace OVR { namespace CAPI { namespace D3D9 {
-
-
-//Implementation of DistortionRenderer for D3D9.
-/***************************************************/
-class DistortionRenderer : public CAPI::DistortionRenderer
-{
-public:
- DistortionRenderer(ovrHmd hmd, FrameTimeManager& timeManager, const HMDRenderState& renderState);
- ~DistortionRenderer();
-
- // Creation function for the device.
- static CAPI::DistortionRenderer* Create(ovrHmd hmd,
- FrameTimeManager& timeManager,
- const HMDRenderState& renderState);
-
- // ***** Public DistortionRenderer interface
- virtual bool Initialize(const ovrRenderAPIConfig* apiConfig,
- unsigned distortionCaps);
-
- virtual void SubmitEye(int eyeId, ovrTexture* eyeTexture);
-
- virtual void EndFrame(bool swapBuffers, unsigned char* latencyTesterDrawColor, unsigned char* latencyTester2DrawColor);
-
- // TBD: Make public?
- void WaitUntilGpuIdle();
-
- // Similar to ovr_WaitTillTime but it also flushes GPU.
- // Note, it exits when time expires, even if GPU is not in idle state yet.
- double WaitTillTimeAndFlushGpu(double absTime);
-
-protected:
-
- class GraphicsState : public CAPI::DistortionRenderer::GraphicsState
- {
- public:
- GraphicsState(IDirect3DDevice9* d);
- virtual void Save();
- virtual void Restore();
-
- protected:
- void RecordAndSetState(int which, int type, DWORD newValue);
-
- //Structure to store our state changes
- static const int MAX_SAVED_STATES=100;
- struct SavedStateType
- {
- int which; //0 for samplerstate, 1 for renderstate
- int type;
- DWORD valueToRevertTo;
- } savedState[MAX_SAVED_STATES];
-
- //Keep track of how many we've done, for reverting
- int numSavedStates;
- IDirect3DDevice9* device;
- };
-
-private:
-
- //Functions
- void CreateDistortionShaders(void);
- void Create_Distortion_Models(void);
- void CreateVertexDeclaration(void);
- void RenderBothDistortionMeshes();
- void RecordAndSetState(int which, int type, DWORD newValue);
- void RevertAllStates(void);
-
-
- //Data, structures and pointers
- IDirect3DDevice9 * device;
- IDirect3DSwapChain9 * swapChain;
- IDirect3DVertexDeclaration9 * vertexDecl;
- IDirect3DPixelShader9 * pixelShader;
- IDirect3DVertexShader9 * vertexShader;
- IDirect3DVertexShader9 * vertexShaderTimewarp;
- ovrSizei screenSize;
- unsigned distortionCaps;
-
- struct FOR_EACH_EYE
- {
- FOR_EACH_EYE() : TextureSize(0), RenderViewport(Sizei(0)) { }
-
- IDirect3DVertexBuffer9 * dxVerts;
- IDirect3DIndexBuffer9 * dxIndices;
- int numVerts;
- int numIndices;
- IDirect3DTexture9 * texture;
- ovrVector2f UVScaleOffset[2];
- Sizei TextureSize;
- Recti RenderViewport;
- } eachEye[2];
-};
-
-}}} // OVR::CAPI::D3D9
diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D9_Util.cpp b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D9_Util.cpp deleted file mode 100644 index 793de74..0000000 --- a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D9_Util.cpp +++ /dev/null @@ -1,254 +0,0 @@ -/************************************************************************************
-
-Filename : CAPI_D3D1X_Util.cpp
-Content : D3D9 utility functions for rendering
-Created : March 7 , 2014
-Authors : Tom Heath
-
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
-
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
-you may not use the Oculus VR Rift SDK except in compliance with the License,
-which is provided at the time of installation or download, or which
-otherwise accompanies this software in either electronic or hard copy form.
-
-You may obtain a copy of the License at
-
-http://www.oculusvr.com/licenses/LICENSE-3.1
-
-Unless required by applicable law or agreed to in writing, the Oculus VR SDK
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-************************************************************************************/
-
-#include "CAPI_D3D9_DistortionRenderer.h"
-#define OVR_D3D_VERSION 9
-#include "../../OVR_CAPI_D3D.h"
-
-
-namespace OVR { namespace CAPI { namespace D3D9 {
-
-
-#define PRECOMPILE_FLAG 0
-#if !PRECOMPILE_FLAG
-//To make these, you need to run it with PRECOMPILE_FLAG, which also uses them, so good for debugging.
-//Then cut and paste these from the output window.
-//Then turn off the flag.
-DWORD precompiledVertexShaderSrc[95] = {4294836736,3014654,1111577667,28,127,4294836736,2,28,33024,120,68,131074,655361,88,0,104,2,131073,88,0,1415936325,1668436847,1716475477,1952805734,2880154368,196609,131073,1,0,1415936325,1668436847,1666405973,6646881,845116278,1291858015,1869767529,1952870259,693250080,1397508128,1750278220,1919247457,1836008224,1701603696,775495794,959330610,858665525,3223857,83886161,2685337601,1065353216,0,1056964608,0,33554463,2147483648,2416902144,33554463,2147614720,2416902145,33554463,2147483653,2416902146,33554463,2147549189,2416902147,33554463,2147614725,2416902148,33554433,2147680256,2699296768,67108868,3758292992,2162425856,2430861314,2699296770,67108868,3758292993,2162425856,2430861315,2699296770,67108868,3758292994,2162425856,2430861316,2699296770,67108868,3222208512,2416181248,2689597441,2686779393,33554433,3758161923,2415919105,65535,};
-DWORD precompiledVertexShaderTimewarpSrc[293] = {4294836736,4456446,1111577667,28,215,4294836736,4,28,33024,208,108,1310722,5373956,124,0,140,262146,1179652,124,0,157,131074,655361,176,0,192,2,131073,176,0,1382381893,1952543855,1164865385,2868929646,196611,262148,1,0,1382381893,1952543855,1399746409,1953653108,1702446336,1918070612,1331058019,1702061670,2880110708,196609,131073,1,0,1415936325,1668436847,1666405973,6646881,845116278,1291858015,1869767529,1952870259,693250080,1397508128,1750278220,1919247457,1836008224,1701603696,775495794,959330610,858665525,3223857,83886161,2685337601,1065353216,0,1056964608,0,33554463,2147483648,2416902144,33554463,2147549184,2416902145,33554463,2147614720,2416902146,33554463,2147483653,2416902147,33554463,2147549189,2416902148,33554463,2147614725,2416902149,33554433,2147549184,2695495684,50331650,2147549185,2164260864,2695495700,33554433,2147614720,2695495685,50331650,2147614721,2169831424,2695495701,33554433,2147745792,2695495686,50331650,2147745793,2175401984,2695495702,33554433,2148007936,2695495687,50331650,2148007937,2180972544,2695495703,67108868,2148466688,2415919105,2162425857,2162425856,67108868,2148466689,2416181251,2689597441,2684682241,50331657,2147549186,2162425856,2162425857,33554438,2147549186,2147483650,33554433,2147680259,2699296772,50331650,2147876866,2177892355,2697986068,67108868,2147549187,2415919105,2158624770,2689925124,67108868,2147549188,2415919105,2153054210,2684354564,33554433,2147680261,2699296773,50331650,2147876866,2177105925,2697199637,67108868,2147614723,2415919105,2153054210,2689925125,67108868,2147614724,2415919105,2158624770,2684354565,33554433,2147680261,2699296774,50331650,2147811333,2177171461,2697265174,67108868,2147745795,2415919105,2147483653,2689925126,67108868,2147745796,2415919105,2158624773,2684354566,33554433,2147680261,2699296775,50331650,2148073477,2166685701,2686779415,67108868,2148007939,2415919105,2147483653,2689925127,67108868,2148007940,2415919105,2164195333,2684354567,50331657,2147549189,2162425860,2162425857,50331657,2147614725,2162425859,2162425857,50331653,2147680257,2147483650,2162425861,33554433,2147680258,2699296768,67108868,3758292992,2162425858,2162425857,2699296770,67108868,2148466689,2416181252,2689597441,2684682241,50331657,2147549189,2162425860,2162425857,50331657,2147614725,2162425859,2162425857,50331657,2147549185,2162425856,2162425857,33554438,2147549185,2147483649,50331653,2147680257,2147483649,2162425861,67108868,3758292993,2162425858,2162425857,2699296770,67108868,2148466689,2416181253,2689597441,2684682241,50331657,2147549188,2162425860,2162425857,50331657,2147614724,2162425859,2162425857,50331657,2147549184,2162425856,2162425857,33554438,2147549184,2147483648,50331653,2147680256,2147483648,2162425860,67108868,3758292994,2162425858,2162425856,2699296770,67108868,3222208512,2416181248,2689597441,2686779393,33554433,3758161923,2415919106,65535,};
-DWORD precompiledPixelShaderSrc[84] = {4294902528,2228222,1111577667,28,79,4294902528,1,28,33024,72,48,3,131073,56,0,1954047316,6648437,786436,65537,1,0,861893488,1291858015,1869767529,1952870259,693250080,1397508128,1750278220,1919247457,1836008224,1701603696,775495794,959330610,858665525,3223857,83886161,2685337600,1065353216,0,0,0,33554463,2147483653,2416115712,33554463,2147549189,2416115713,33554463,2147614725,2416115714,33554463,2147680261,2415984643,33554463,2415919104,2685339648,50331714,2148466688,2430861312,2699298816,67108868,2148073472,2147483648,2690908160,2686779392,50331714,2148466689,2430861313,2699298816,33554433,2147614720,2153054209,50331714,2148466689,2430861314,2699298816,33554433,2147745792,2158624769,50331653,2148468736,2162425856,2415919107,65535,};
-
-#else
-#include "d3dcompiler.h"
-/***************************************************************************/
-const char* VertexShaderSrc =
-
- "float2 EyeToSourceUVScale : register(c0); \n"
- "float2 EyeToSourceUVOffset : register(c2); \n"
-
- "void main(in float2 Position : POSITION, in float TimeWarp : POSITION1, \n"
- " in float Vignette : POSITION2, in float2 TexCoord0 : TEXCOORD0, \n"
- " in float2 TexCoord1 : TEXCOORD1, in float2 TexCoord2 : TEXCOORD2, \n"
- " out float4 oPosition : SV_Position, out float2 oTexCoord0 : TEXCOORD0, \n"
- " out float2 oTexCoord1 : TEXCOORD1, out float2 oTexCoord2 : TEXCOORD2, \n"
- " out float oVignette : TEXCOORD3) \n"
- "{ \n"
- " oTexCoord0 = EyeToSourceUVScale * TexCoord0 + EyeToSourceUVOffset; \n"
- " oTexCoord1 = EyeToSourceUVScale * TexCoord1 + EyeToSourceUVOffset; \n"
- " oTexCoord2 = EyeToSourceUVScale * TexCoord2 + EyeToSourceUVOffset; \n"
- " oVignette = Vignette; \n"
- " oPosition = float4(Position.xy, 0.5, 1.0); \n"
- "}";
-
-/***************************************************************************/
-const char* VertexShaderTimewarpSrc =
-
- "float2 EyeToSourceUVScale : register(c0); \n"
- "float2 EyeToSourceUVOffset : register(c2); \n"
- "float4x4 EyeRotationStart : register(c4); \n"
- "float4x4 EyeRotationEnd : register(c20); \n"
-
- "float2 TimewarpTexCoord(float2 TexCoord, float4x4 rotMat) \n"
- "{ \n"
- " float3 transformed = float3( mul ( rotMat, float4(TexCoord.xy, 1, 1) ).xyz); \n"
- " float2 flattened = (transformed.xy / transformed.z); \n"
- " return(EyeToSourceUVScale * flattened + EyeToSourceUVOffset); \n"
- "} \n"
- "void main(in float2 Position : POSITION, in float TimeWarp : POSITION1, \n"
- " in float Vignette : POSITION2, in float2 TexCoord0 : TEXCOORD0, \n"
- " in float2 TexCoord1 : TEXCOORD1, in float2 TexCoord2 : TEXCOORD2, \n"
- " out float4 oPosition : SV_Position, out float2 oTexCoord0 : TEXCOORD0, \n"
- " out float2 oTexCoord1 : TEXCOORD1, out float2 oTexCoord2 : TEXCOORD2, \n"
- " out float oVignette : TEXCOORD3) \n"
- "{ \n"
- " float4x4 lerpedEyeRot = lerp(EyeRotationStart, EyeRotationEnd, TimeWarp); \n"
- " oTexCoord0 = TimewarpTexCoord(TexCoord0,lerpedEyeRot); \n"
- " oTexCoord1 = TimewarpTexCoord(TexCoord1,lerpedEyeRot); \n"
- " oTexCoord2 = TimewarpTexCoord(TexCoord2,lerpedEyeRot); \n"
- " oVignette = Vignette; \n"
- " oPosition = float4(Position.xy, 0.5, 1.0); \n"
- "}";
-
-/***************************************************************************/
-const char* PixelShaderSrc =
-
- " sampler2D Texture : register(s0); \n"
-
- "float4 main(in float4 oPosition : SV_Position, in float2 oTexCoord0 : TEXCOORD0, \n"
- " in float2 oTexCoord1 : TEXCOORD1, in float2 oTexCoord2 : TEXCOORD2, \n"
- " in float oVignette : TEXCOORD3) \n"
- " : SV_Target \n"
- "{ \n"
- " float R = tex2D(Texture,oTexCoord0).r; \n"
- " float G = tex2D(Texture,oTexCoord1).g; \n"
- " float B = tex2D(Texture,oTexCoord2).b; \n"
- " return (oVignette*float4(R,G,B,1)); \n"
- "}";
-
-/*************************************************************/
-ID3DBlob* ShaderCompile(char * shaderName, const char * shaderSrcString, const char * profile)
-{
- ID3DBlob* pShaderCode = NULL;
- ID3DBlob* pErrorMsg = NULL;
-
- if (FAILED(D3DCompile(shaderSrcString, strlen(shaderSrcString),NULL,NULL,NULL,
- "main",profile,D3DCOMPILE_OPTIMIZATION_LEVEL3,0,
- &pShaderCode,&pErrorMsg)))
- MessageBoxA(NULL,(char *) pErrorMsg->GetBufferPointer(),"", MB_OK);
- if (pErrorMsg) pErrorMsg->Release();
-
- //Now write out blob
- char tempString[1000];
- int numDWORDs = ((int)pShaderCode->GetBufferSize())/4;
- DWORD * ptr = (DWORD *)pShaderCode->GetBufferPointer();
- sprintf_s(tempString,"DWORD %s[%d] = {",shaderName,numDWORDs);
- OutputDebugStringA(tempString);
- for (int i = 0;i < numDWORDs; i++)
- {
- sprintf_s(tempString,"%lu,",ptr[i]);
- OutputDebugStringA(tempString);
- }
- OutputDebugStringA("};\n");
-
- return(pShaderCode);
-}
-#endif
-
-/***********************************************************/
-void DistortionRenderer::CreateDistortionShaders(void)
-{
-#if PRECOMPILE_FLAG
- ID3DBlob * pShaderCode;
- pShaderCode = ShaderCompile("precompiledVertexShaderSrc",VertexShaderSrc,"vs_2_0");
- device->CreateVertexShader( ( DWORD* )pShaderCode->GetBufferPointer(), &vertexShader );
- pShaderCode->Release();
-
- pShaderCode = ShaderCompile("precompiledVertexShaderTimewarpSrc",VertexShaderTimewarpSrc,"vs_2_0");
- device->CreateVertexShader( ( DWORD* )pShaderCode->GetBufferPointer(), &vertexShaderTimewarp );
- pShaderCode->Release();
-
- pShaderCode = ShaderCompile("precompiledPixelShaderSrc",PixelShaderSrc,"ps_3_0");
- device->CreatePixelShader( ( DWORD* )pShaderCode->GetBufferPointer(), &pixelShader );
- pShaderCode->Release();
-#else
- device->CreateVertexShader( precompiledVertexShaderSrc, &vertexShader );
- device->CreateVertexShader( precompiledVertexShaderTimewarpSrc, &vertexShaderTimewarp );
- device->CreatePixelShader( precompiledPixelShaderSrc, &pixelShader );
-#endif
-}
-
-
-/***************************************************/
-void DistortionRenderer::CreateVertexDeclaration(void)
-{
- static const D3DVERTEXELEMENT9 VertexElements[7] = {
- { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 },
- { 0, 8, D3DDECLTYPE_FLOAT1, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 1 },
- { 0, 12, D3DDECLTYPE_FLOAT1, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 2 },
- { 0, 16, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 },
- { 0, 24, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1 },
- { 0, 32, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 2 },
- D3DDECL_END() };
- device->CreateVertexDeclaration( VertexElements, &vertexDecl );
-}
-
-
-/******************************************************/
-void DistortionRenderer::Create_Distortion_Models(void)
-{
- //Make the distortion models
- for (int eye=0;eye<2;eye++)
- {
- FOR_EACH_EYE * e = &eachEye[eye];
- ovrDistortionMesh meshData;
- ovrHmd_CreateDistortionMesh(HMD,
- RState.EyeRenderDesc[eye].Eye,
- RState.EyeRenderDesc[eye].Fov,
- distortionCaps,
- &meshData);
-
- e->numVerts = meshData.VertexCount;
- e->numIndices = meshData.IndexCount;
-
- device->CreateVertexBuffer( (e->numVerts)*sizeof(ovrDistortionVertex),0, 0,
- D3DPOOL_MANAGED, &e->dxVerts, NULL );
- ovrDistortionVertex * dxv; e->dxVerts->Lock( 0, 0, (void**)&dxv, 0 );
- for (int v=0;v<e->numVerts;v++) dxv[v] = meshData.pVertexData[v];
-
- device->CreateIndexBuffer( (e->numIndices)*sizeof(u_short),0, D3DFMT_INDEX16,
- D3DPOOL_MANAGED, &e->dxIndices, NULL );
- unsigned short* dxi; e->dxIndices->Lock( 0, 0, (void**)&dxi, 0 );
- for (int i=0;i<e->numIndices;i++) dxi[i] = meshData.pIndexData[i];
-
- ovrHmd_DestroyDistortionMesh( &meshData );
- }
-}
-
-/**********************************************************/
-void DistortionRenderer::RenderBothDistortionMeshes(void)
-{
- for (int eye=0; eye<2; eye++)
- {
- FOR_EACH_EYE * e = &eachEye[eye];
- D3DVIEWPORT9 vp; vp.X=0; vp.Y=0; vp.Width=screenSize.w; vp.Height=screenSize.h; vp.MinZ=0; vp.MaxZ = 1;
- device->SetViewport(&vp);
- device->SetStreamSource( 0, e->dxVerts,0, sizeof(ovrDistortionVertex) );
- device->SetVertexDeclaration( vertexDecl );
- device->SetIndices( e->dxIndices );
- device->SetPixelShader( pixelShader );
- device->SetTexture( 0, e->texture);
-
- //Choose which vertex shader, with associated additional inputs
- if (distortionCaps & ovrDistortionCap_TimeWarp)
- {
- device->SetVertexShader( vertexShaderTimewarp );
-
- ovrMatrix4f timeWarpMatrices[2];
- ovrHmd_GetEyeTimewarpMatrices(HMD, (ovrEyeType)eye,
- RState.EyeRenderPoses[eye], timeWarpMatrices);
-
- //Need to transpose the matrices
- timeWarpMatrices[0] = Matrix4f(timeWarpMatrices[0]).Transposed();
- timeWarpMatrices[1] = Matrix4f(timeWarpMatrices[1]).Transposed();
-
- // Feed identity like matrices in until we get proper timewarp calculation going on
- device->SetVertexShaderConstantF(4, (float *) &timeWarpMatrices[0],4);
- device->SetVertexShaderConstantF(20,(float *) &timeWarpMatrices[1],4);
- }
- else
- {
- device->SetVertexShader( vertexShader );
- }
-
- //Set up vertex shader constants
- device->SetVertexShaderConstantF( 0, ( FLOAT* )&(e->UVScaleOffset[0]), 1 );
- device->SetVertexShaderConstantF( 2, ( FLOAT* )&(e->UVScaleOffset[1]), 1 );
-
- device->DrawIndexedPrimitive( D3DPT_TRIANGLELIST,0,0,e->numVerts,0,e->numIndices/3);
- }
-}
-
-}}}
\ No newline at end of file diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionCS2x2.csh b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionCS2x2.csh new file mode 100644 index 0000000..c30b32a --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionCS2x2.csh @@ -0,0 +1,389 @@ +/************************************************************************************
+
+Filename : DistortionCS2x2Pentile.vsh
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+
+// Note - the only difference between the various Distortion Compute Shaders is these #defines.
+// The code is otherwise identical, so if you change one, rememeber to change the others!
+#define PENTILE_MODE 0
+#define ENABLE_OVERLAY 0
+#define ENABLE_TIMEWARP 1
+
+
+#define GRID_SIZE_IN_PIXELS 16
+#define PINS_PER_EDGE 128
+#define NXN_BLOCK_SIZE_PIXELS 2
+#define SIMD_SQUARE_SIZE 16
+
+
+struct DistortionComputePin
+{
+ float2 TanEyeAnglesR;
+ float2 TanEyeAnglesG;
+ float2 TanEyeAnglesB;
+ int Color;
+ int Padding[1];
+};
+struct DistortionComputePinUnpacked
+{
+ float2 TanEyeAnglesR;
+ float2 TanEyeAnglesG;
+ float2 TanEyeAnglesB;
+ float TimewarpLerp;
+ float Fade;
+};
+struct DistortionComputePinTimewarped
+{
+ float2 HmdSpcTexCoordR;
+ float2 HmdSpcTexCoordG;
+ float2 HmdSpcTexCoordB;
+#if ENABLE_OVERLAY
+ float2 OverlayTexCoordR;
+ float2 OverlayTexCoordG;
+ float2 OverlayTexCoordB;
+#endif
+};
+
+// Cut'n'pasted from D3DX_DXGIFormatConvert.inl. Obviously we should have #included it, but...
+typedef float4 XMFLOAT4;
+typedef uint UINT;
+#define D3DX11INLINE
+#define hlsl_precise precise
+D3DX11INLINE XMFLOAT4 D3DX_R8G8B8A8_UNORM_to_FLOAT4(UINT packedInput)
+{
+ hlsl_precise XMFLOAT4 unpackedOutput;
+ unpackedOutput.x = (FLOAT) (packedInput & 0x000000ff) / 255;
+ unpackedOutput.y = (FLOAT)(((packedInput>> 8) & 0x000000ff)) / 255;
+ unpackedOutput.z = (FLOAT)(((packedInput>>16) & 0x000000ff)) / 255;
+ unpackedOutput.w = (FLOAT) (packedInput>>24) / 255;
+ return unpackedOutput;
+}
+
+DistortionComputePinUnpacked UnpackPin ( DistortionComputePin src )
+{
+ DistortionComputePinUnpacked result;
+ result.TanEyeAnglesR = src.TanEyeAnglesR;
+ result.TanEyeAnglesG = src.TanEyeAnglesG;
+ result.TanEyeAnglesB = src.TanEyeAnglesB;
+ float4 tempColor = D3DX_R8G8B8A8_UNORM_to_FLOAT4 ( src.Color );
+ result.Fade = tempColor.r * 2.0 - 1.0;
+ result.TimewarpLerp = tempColor.a;
+ return result;
+}
+
+
+float4x4 Padding1;
+float4x4 Padding2;
+float2 EyeToSourceUVScale;
+float2 EyeToSourceUVOffset;
+float3x3 EyeRotationStart;
+float3x3 EyeRotationEnd;
+float UseOverlay = 1;
+float RightEye = 1;
+float FbSizePixelsX;
+
+
+RWTexture2D<float4> Framebuffer : register(u0);
+SamplerState Linear : register(s0);
+// Subtlety - fill->Set stops at the first NULL texture, so make sure you order them by priority!
+Texture2D HmdSpcTexture : register(t0);
+Texture2D OverlayTexture : register(t1);
+// t1, t2, t3 for layers in future.
+// This is set by other calls, so no problem putting it in t4.
+StructuredBuffer<DistortionComputePin> UntransformedGridPins : register(t4);
+
+// Each eye has a grid of "pins" - spaced every gridSizeInPixels apart in a square grid.
+// You can think of them as vertices in a mesh, but they are regularly
+// distributed in screen space, not pre-distorted.
+// Pins are laid out in a vertical scanline pattern,
+// scanning right to left, then within each scan going top to bottom, like DK2.
+// If we move to a different panel orientation, we may need to flip this around.
+// pinsPerEdge is the pitch of the buffer, and is fixed whatver the resolution
+// - it just needs to be large enough for the largest res we support.
+
+// The grid size remains fixed, but now each shader invocation does an NxN "tile" of output pixels.
+// This allows it to read, timewarp & project the input pins just once, then interpolate final UV over a number of pixels.
+// The "SIMD square size" is how large the square of dispatched pixels is - it's the
+// thing set in numthreads(N,N,1). For a SIMD size of 64-wide, it needs to be more than 8,
+// otherwise we'll starve the machine.
+
+// Summary:
+// Each SIMD lane does a tileBlockSizePixels^2 of pixels.
+// Each "CS group" (i.e. a virtualized SIMD thread) will cover a (simdSquareSize*tileBlockSizePixels)^2 block of pixels.
+// The pin grid is unaffected by any of these (except it has to be larger than tileBlockSizePixels).
+static const int gridSizeInPixels = GRID_SIZE_IN_PIXELS;
+static const int pinsPerEdge = PINS_PER_EDGE;
+static const int tileBlockSizePixels = NXN_BLOCK_SIZE_PIXELS;
+static const int simdSquareSize = SIMD_SQUARE_SIZE;
+static const int tilesPerGridSide = gridSizeInPixels / tileBlockSizePixels;
+
+DistortionComputePinTimewarped WarpAndDistort ( DistortionComputePinUnpacked inp )
+{
+ // Pin inputs are in TanEyeAngle space for the R,G,B channels (i.e. after chromatic aberration and distortion).
+#if ENABLE_TIMEWARP
+ // These are now "real world" vectors in direction (x,y,1) relative to the eye of the HMD.
+ float3 TanEyeAngle3R = float3 ( inp.TanEyeAnglesR.x, inp.TanEyeAnglesR.y, 1.0 );
+ float3 TanEyeAngle3G = float3 ( inp.TanEyeAnglesG.x, inp.TanEyeAnglesG.y, 1.0 );
+ float3 TanEyeAngle3B = float3 ( inp.TanEyeAnglesB.x, inp.TanEyeAnglesB.y, 1.0 );
+
+ // Apply the two 3x3 timewarp rotations to these vectors.
+ float3 TransformedRStart = mul ( EyeRotationStart, TanEyeAngle3R );
+ float3 TransformedGStart = mul ( EyeRotationStart, TanEyeAngle3G );
+ float3 TransformedBStart = mul ( EyeRotationStart, TanEyeAngle3B );
+ float3 TransformedREnd = mul ( EyeRotationEnd, TanEyeAngle3R );
+ float3 TransformedGEnd = mul ( EyeRotationEnd, TanEyeAngle3G );
+ float3 TransformedBEnd = mul ( EyeRotationEnd, TanEyeAngle3B );
+ // And blend between them.
+ float3 TransformedR = lerp ( TransformedRStart, TransformedREnd, inp.TimewarpLerp );
+ float3 TransformedG = lerp ( TransformedGStart, TransformedGEnd, inp.TimewarpLerp );
+ float3 TransformedB = lerp ( TransformedBStart, TransformedBEnd, inp.TimewarpLerp );
+
+ // Project them back onto the Z=1 plane of the rendered images.
+ float RecipZR = rcp ( TransformedR.z );
+ float RecipZG = rcp ( TransformedG.z );
+ float RecipZB = rcp ( TransformedB.z );
+ float2 FlattenedR = float2 ( TransformedR.x * RecipZR, TransformedR.y * RecipZR );
+ float2 FlattenedG = float2 ( TransformedG.x * RecipZG, TransformedG.y * RecipZG );
+ float2 FlattenedB = float2 ( TransformedB.x * RecipZB, TransformedB.y * RecipZB );
+#else
+ float2 FlattenedR = inp.TanEyeAnglesR;
+ float2 FlattenedG = inp.TanEyeAnglesG;
+ float2 FlattenedB = inp.TanEyeAnglesB;
+#endif
+
+ DistortionComputePinTimewarped result;
+
+ // These are now still in TanEyeAngle space.
+ // Scale them into the correct [0-1],[0-1] UV lookup space (depending on eye)
+ result.HmdSpcTexCoordR = FlattenedR * EyeToSourceUVScale + EyeToSourceUVOffset;
+ result.HmdSpcTexCoordG = FlattenedG * EyeToSourceUVScale + EyeToSourceUVOffset;
+ result.HmdSpcTexCoordB = FlattenedB * EyeToSourceUVScale + EyeToSourceUVOffset;
+
+#if ENABLE_OVERLAY
+ // Static layer texcoords don't get any time warp offset
+ result.OverlayTexCoordR = inp.TanEyeAnglesR * EyeToSourceUVScale + EyeToSourceUVOffset;
+ result.OverlayTexCoordG = inp.TanEyeAnglesG * EyeToSourceUVScale + EyeToSourceUVOffset;
+ result.OverlayTexCoordB = inp.TanEyeAnglesB * EyeToSourceUVScale + EyeToSourceUVOffset;
+#endif
+ return result;
+}
+
+float3 FindPixelColour ( float2 pinFrac,
+ DistortionComputePinUnpacked PinTL,
+ DistortionComputePinUnpacked PinTR,
+ DistortionComputePinUnpacked PinBL,
+ DistortionComputePinUnpacked PinBR,
+ DistortionComputePinTimewarped PinWarpTL,
+ DistortionComputePinTimewarped PinWarpTR,
+ DistortionComputePinTimewarped PinWarpBL,
+ DistortionComputePinTimewarped PinWarpBR)
+{
+ float pinWeightTL = (1.0-pinFrac.x) * (1.0-pinFrac.y);
+ float pinWeightTR = ( pinFrac.x) * (1.0-pinFrac.y);
+ float pinWeightBL = (1.0-pinFrac.x) * ( pinFrac.y);
+ float pinWeightBR = ( pinFrac.x) * ( pinFrac.y);
+
+ float Fade = ( PinTL.Fade * pinWeightTL ) +
+ ( PinTR.Fade * pinWeightTR ) +
+ ( PinBL.Fade * pinWeightBL ) +
+ ( PinBR.Fade * pinWeightBR );
+ float2 HmdSpcTexCoordR = ( PinWarpTL.HmdSpcTexCoordR * pinWeightTL ) +
+ ( PinWarpTR.HmdSpcTexCoordR * pinWeightTR ) +
+ ( PinWarpBL.HmdSpcTexCoordR * pinWeightBL ) +
+ ( PinWarpBR.HmdSpcTexCoordR * pinWeightBR );
+ float2 HmdSpcTexCoordG = ( PinWarpTL.HmdSpcTexCoordG * pinWeightTL ) +
+ ( PinWarpTR.HmdSpcTexCoordG * pinWeightTR ) +
+ ( PinWarpBL.HmdSpcTexCoordG * pinWeightBL ) +
+ ( PinWarpBR.HmdSpcTexCoordG * pinWeightBR );
+ float2 HmdSpcTexCoordB = ( PinWarpTL.HmdSpcTexCoordB * pinWeightTL ) +
+ ( PinWarpTR.HmdSpcTexCoordB * pinWeightTR ) +
+ ( PinWarpBL.HmdSpcTexCoordB * pinWeightBL ) +
+ ( PinWarpBR.HmdSpcTexCoordB * pinWeightBR );
+
+ float3 finalColor;
+
+#if PENTILE_MODE > 0
+ // R & B channels have a 0.5 bias because of fewer pels.
+ const float mipBiasRB = 0.5;
+#else
+ const float mipBiasRB = 0.0;
+#endif
+ finalColor.r = HmdSpcTexture.SampleLevel(Linear, HmdSpcTexCoordR, mipBiasRB).r;
+ finalColor.g = HmdSpcTexture.SampleLevel(Linear, HmdSpcTexCoordG, 0 ).g;
+ finalColor.b = HmdSpcTexture.SampleLevel(Linear, HmdSpcTexCoordB, mipBiasRB).b;
+#if ENABLE_OVERLAY
+ if(UseOverlay > 0)
+ {
+ float2 OverlayTexCoordR = ( PinWarpTL.OverlayTexCoordR * pinWeightTL ) +
+ ( PinWarpTR.OverlayTexCoordR * pinWeightTR ) +
+ ( PinWarpBL.OverlayTexCoordR * pinWeightBL ) +
+ ( PinWarpBR.OverlayTexCoordR * pinWeightBR );
+ float2 OverlayTexCoordG = ( PinWarpTL.OverlayTexCoordG * pinWeightTL ) +
+ ( PinWarpTR.OverlayTexCoordG * pinWeightTR ) +
+ ( PinWarpBL.OverlayTexCoordG * pinWeightBL ) +
+ ( PinWarpBR.OverlayTexCoordG * pinWeightBR );
+ float2 OverlayTexCoordB = ( PinWarpTL.OverlayTexCoordB * pinWeightTL ) +
+ ( PinWarpTR.OverlayTexCoordB * pinWeightTR ) +
+ ( PinWarpBL.OverlayTexCoordB * pinWeightBL ) +
+ ( PinWarpBR.OverlayTexCoordB * pinWeightBR );
+ float2 overlayColorR = OverlayTexture.SampleLevel(Linear, OverlayTexCoordR, mipBiasRB).ra;
+ float2 overlayColorG = OverlayTexture.SampleLevel(Linear, OverlayTexCoordG, 0 ).ga;
+ float2 overlayColorB = OverlayTexture.SampleLevel(Linear, OverlayTexCoordB, mipBiasRB).ba;
+ // do premultiplied alpha blending - overlayColorX.x is color, overlayColorX.y is alpha
+ finalColor.r = finalColor.r * saturate(1-overlayColorR.y) + overlayColorR.x;
+ finalColor.g = finalColor.g * saturate(1-overlayColorG.y) + overlayColorG.x;
+ finalColor.b = finalColor.b * saturate(1-overlayColorB.y) + overlayColorB.x;
+ }
+#endif
+ finalColor.rgb = saturate(finalColor.rgb * Fade);
+ return finalColor;
+}
+
+
+[numthreads(simdSquareSize, simdSquareSize, 1)]
+void main(uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint3 Gid : SV_GroupID)
+// Reminder:
+// GroupThreadID.xy will range from 0 to (simdSquareSize-1).
+// GroupID.xy will range from 0 to (screen_size.xy)/(simdSquareSize*tileBlockSizePixels)
+// DispatchThreadID.xy = GroupID.xy * simdSquareSize + GroupThreadID.xy
+{
+ int2 PixelPosTile = DTid.xy * tileBlockSizePixels;
+ float2 PixelPosFloat = (float2)PixelPosTile;
+ float2 pinFracTileStart = (float2)PixelPosTile * ( 1.0 / gridSizeInPixels );
+ float2 pinWholeTileStart = floor ( pinFracTileStart );
+ pinFracTileStart -= pinWholeTileStart;
+ int2 pinInt = (int2)pinWholeTileStart;
+ pinInt.x = (0.5*FbSizePixelsX/gridSizeInPixels - 1) - pinInt.x;
+ pinFracTileStart.x = 1.0 - pinFracTileStart.x;
+ if ( RightEye > 0.5 )
+ {
+ PixelPosTile.x += 0.5*FbSizePixelsX;
+ }
+
+ int pinIndexTL = pinInt.x*pinsPerEdge + pinInt.y;
+ int pinIndexTR = pinIndexTL + pinsPerEdge;
+ int pinIndexBL = pinIndexTL + 1;
+ int pinIndexBR = pinIndexTR + 1;
+ DistortionComputePinUnpacked PinTL = UnpackPin ( UntransformedGridPins[pinIndexTL] );
+ DistortionComputePinUnpacked PinTR = UnpackPin ( UntransformedGridPins[pinIndexTR] );
+ DistortionComputePinUnpacked PinBL = UnpackPin ( UntransformedGridPins[pinIndexBL] );
+ DistortionComputePinUnpacked PinBR = UnpackPin ( UntransformedGridPins[pinIndexBR] );
+ if ( ( PinTL.Fade > 0.0 ) ||
+ ( PinTR.Fade > 0.0 ) ||
+ ( PinBL.Fade > 0.0 ) ||
+ ( PinBR.Fade > 0.0 ) )
+ {
+ DistortionComputePinTimewarped PinWarpTL = WarpAndDistort ( PinTL );
+ DistortionComputePinTimewarped PinWarpTR = WarpAndDistort ( PinTR );
+ DistortionComputePinTimewarped PinWarpBL = WarpAndDistort ( PinBL );
+ DistortionComputePinTimewarped PinWarpBR = WarpAndDistort ( PinBR );
+
+ float2 pinFrac;
+ int2 PixelPos;
+ pinFrac.x = pinFracTileStart.x;
+ pinFrac.y = pinFracTileStart.y;
+ float3 finalColor00 = FindPixelColour ( pinFrac,
+ PinTL,
+ PinTR,
+ PinBL,
+ PinBR,
+ PinWarpTL,
+ PinWarpTR,
+ PinWarpBL,
+ PinWarpBR);
+ pinFrac.x = pinFracTileStart.x - (1.0 / gridSizeInPixels);
+ pinFrac.y = pinFracTileStart.y;
+ float3 finalColor01 = FindPixelColour ( pinFrac,
+ PinTL,
+ PinTR,
+ PinBL,
+ PinBR,
+ PinWarpTL,
+ PinWarpTR,
+ PinWarpBL,
+ PinWarpBR);
+ pinFrac.x = pinFracTileStart.x;
+ pinFrac.y = pinFracTileStart.y + (1.0 / gridSizeInPixels);
+ float3 finalColor10 = FindPixelColour ( pinFrac,
+ PinTL,
+ PinTR,
+ PinBL,
+ PinBR,
+ PinWarpTL,
+ PinWarpTR,
+ PinWarpBL,
+ PinWarpBR);
+ pinFrac.x = pinFracTileStart.x - (1.0 / gridSizeInPixels);
+ pinFrac.y = pinFracTileStart.y + (1.0 / gridSizeInPixels);
+ float3 finalColor11 = FindPixelColour ( pinFrac,
+ PinTL,
+ PinTR,
+ PinBL,
+ PinBR,
+ PinWarpTL,
+ PinWarpTR,
+ PinWarpBL,
+ PinWarpBR);
+
+ float3 finalOut00;
+ float3 finalOut01;
+ float3 finalOut10;
+ float3 finalOut11;
+#if PENTILE_MODE==0
+ // No pentile, so it's easy.
+ finalOut00 = finalColor00;
+ finalOut01 = finalColor01;
+ finalOut10 = finalColor10;
+ finalOut11 = finalColor11;
+#elif PENTILE_MODE==1
+ // Now the DK2 pentile swizzle. Don't try to understand it; just rope, throw and brand it.
+ finalOut00.g = finalColor10.g;
+ finalOut01.g = finalColor01.g;
+ finalOut10.g = finalColor00.g;
+ finalOut11.g = finalColor11.g;
+ finalOut00.r = finalColor10.r;
+ finalOut01.r = finalColor01.r;
+ finalOut10.r = finalColor00.b;
+ finalOut11.r = finalColor11.b;
+ finalOut00.b = 0.0;
+ finalOut01.b = 0.0;
+ finalOut10.b = 0.0;
+ finalOut11.b = 0.0;
+#endif
+
+ PixelPos.x = PixelPosTile.x;
+ PixelPos.y = PixelPosTile.y;
+ Framebuffer[PixelPos.xy] = float4 ( finalOut00, 0.0 );
+ PixelPos.x = PixelPosTile.x + 1;
+ PixelPos.y = PixelPosTile.y;
+ Framebuffer[PixelPos.xy] = float4 ( finalOut01, 0.0 );
+ PixelPos.x = PixelPosTile.x;
+ PixelPos.y = PixelPosTile.y + 1;
+ Framebuffer[PixelPos.xy] = float4 ( finalOut10, 0.0 );
+ PixelPos.x = PixelPosTile.x + 1;
+ PixelPos.y = PixelPosTile.y + 1;
+ Framebuffer[PixelPos.xy] = float4 ( finalOut11, 0.0 );
+ }
+};
+
+
+
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionCS2x2.h b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionCS2x2.h new file mode 100644 index 0000000..78cbb03 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionCS2x2.h @@ -0,0 +1,887 @@ +#ifndef DISTORTIONCS2X2_H
+#define DISTORTIONCS2X2_H
+
+static const unsigned char DistortionCS2x2[] = {
+ 0x44, 0x58, 0x42, 0x43, 0x08, 0x74, 0x15, 0x37, 0x48, 0x1d, 0x2c, 0xce,
+ 0x36, 0x3e, 0x2c, 0x71, 0x9b, 0xf3, 0x13, 0xa6, 0x01, 0x00, 0x00, 0x00,
+ 0x34, 0x29, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0xa8, 0x05, 0x00, 0x00, 0xb8, 0x05, 0x00, 0x00, 0xc8, 0x05, 0x00, 0x00,
+ 0x98, 0x28, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x6c, 0x05, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x1c, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x53, 0x43, 0x00, 0x01, 0x00, 0x00,
+ 0x38, 0x05, 0x00, 0x00, 0x52, 0x44, 0x31, 0x31, 0x3c, 0x00, 0x00, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
+ 0x24, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xdc, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe3, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0d, 0x00, 0x00, 0x00, 0xf1, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x07, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x13, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x00, 0x48,
+ 0x6d, 0x64, 0x53, 0x70, 0x63, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65,
+ 0x00, 0x55, 0x6e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d,
+ 0x65, 0x64, 0x47, 0x72, 0x69, 0x64, 0x50, 0x69, 0x6e, 0x73, 0x00, 0x46,
+ 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x00, 0x24,
+ 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, 0x13, 0x01, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x4c, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0xe8, 0x03, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xb4, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xc8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0xec, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0xf5, 0x02, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x34, 0x03, 0x00, 0x00,
+ 0x88, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0x48, 0x03, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x64, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0x88, 0x03, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
+ 0x2c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x64, 0x03, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x97, 0x03, 0x00, 0x00,
+ 0xec, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xa8, 0x03, 0x00, 0x00, 0xcc, 0x03, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0xd0, 0x03, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xa8, 0x03, 0x00, 0x00, 0xcc, 0x03, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0xd9, 0x03, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa8, 0x03, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x50, 0x61, 0x64, 0x64,
+ 0x69, 0x6e, 0x67, 0x31, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78,
+ 0x34, 0x00, 0xab, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xbd, 0x02, 0x00, 0x00, 0x50, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x32,
+ 0x00, 0x45, 0x79, 0x65, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x55, 0x56, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x00, 0x66, 0x6c, 0x6f, 0x61,
+ 0x74, 0x32, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x03, 0x00, 0x00, 0x45, 0x79, 0x65, 0x54, 0x6f, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x55, 0x56, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x00,
+ 0x45, 0x79, 0x65, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
+ 0x74, 0x61, 0x72, 0x74, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x78,
+ 0x33, 0x00, 0xab, 0xab, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x59, 0x03, 0x00, 0x00, 0x45, 0x79, 0x65, 0x52, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x00, 0x55, 0x73, 0x65, 0x4f, 0x76,
+ 0x65, 0x72, 0x6c, 0x61, 0x79, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x00,
+ 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x03, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x3f, 0x52, 0x69, 0x67, 0x68, 0x74, 0x45, 0x79, 0x65,
+ 0x00, 0x46, 0x62, 0x53, 0x69, 0x7a, 0x65, 0x50, 0x69, 0x78, 0x65, 0x6c,
+ 0x73, 0x58, 0x00, 0xab, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x05, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x24, 0x45, 0x6c, 0x65,
+ 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x44, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x74,
+ 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x50, 0x69,
+ 0x6e, 0x00, 0x54, 0x61, 0x6e, 0x45, 0x79, 0x65, 0x41, 0x6e, 0x67, 0x6c,
+ 0x65, 0x73, 0x52, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x03, 0x00, 0x00, 0x54, 0x61, 0x6e, 0x45, 0x79, 0x65, 0x41, 0x6e,
+ 0x67, 0x6c, 0x65, 0x73, 0x47, 0x00, 0x54, 0x61, 0x6e, 0x45, 0x79, 0x65,
+ 0x41, 0x6e, 0x67, 0x6c, 0x65, 0x73, 0x42, 0x00, 0x43, 0x6f, 0x6c, 0x6f,
+ 0x72, 0x00, 0x69, 0x6e, 0x74, 0x00, 0xab, 0xab, 0x00, 0x00, 0x02, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x82, 0x04, 0x00, 0x00, 0x50, 0x61, 0x64, 0x64,
+ 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x82, 0x04, 0x00, 0x00, 0x2e, 0x04, 0x00, 0x00, 0x3c, 0x04, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x3c, 0x04, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x6e, 0x04, 0x00, 0x00, 0x3c, 0x04, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x7c, 0x04, 0x00, 0x00, 0x88, 0x04, 0x00, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0xac, 0x04, 0x00, 0x00, 0xb4, 0x04, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00,
+ 0x00, 0x00, 0x05, 0x00, 0xd8, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x19, 0x04, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66,
+ 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53,
+ 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c,
+ 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e,
+ 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x4f, 0x53, 0x47, 0x4e, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x53, 0x48, 0x45, 0x58, 0xc8, 0x22, 0x00, 0x00,
+ 0x50, 0x00, 0x05, 0x00, 0xb2, 0x08, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01,
+ 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x04,
+ 0x00, 0x70, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x9c, 0x18, 0x00, 0x04, 0x00, 0xe0, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x55, 0x55, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x02, 0x32, 0x00, 0x02, 0x00,
+ 0x68, 0x00, 0x00, 0x02, 0x19, 0x00, 0x00, 0x00, 0x9b, 0x00, 0x00, 0x04,
+ 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x29, 0x00, 0x48, 0x09, 0x92, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x04, 0x02, 0x00, 0x02, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x2b, 0x00, 0x38, 0x05, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0xc6, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x18, 0x0a,
+ 0x32, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x96, 0x05, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3d,
+ 0x00, 0x00, 0x80, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x41, 0x00, 0x38, 0x05, 0x72, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x16, 0x05, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x40, 0x05,
+ 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x40, 0x08, 0x82, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0f, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f,
+ 0x0e, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x41, 0x00, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x40, 0x08,
+ 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x40, 0x05, 0x82, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x29, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x38, 0x0a,
+ 0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xa7, 0x00, 0x20, 0x8b, 0x02, 0x03, 0x01, 0x80, 0x83, 0x99, 0x19, 0x00,
+ 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x46, 0x72, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x07,
+ 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0x56, 0x00, 0x40, 0x05, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x40, 0x07,
+ 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x43,
+ 0x38, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0xa7, 0x00, 0x20, 0x8b,
+ 0x02, 0x03, 0x01, 0x80, 0x83, 0x99, 0x19, 0x00, 0x72, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x46, 0x72, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x56, 0x00, 0x40, 0x05,
+ 0x82, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x43, 0x38, 0x00, 0x40, 0x07,
+ 0x82, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
+ 0x00, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0xbf, 0xa7, 0x00, 0x20, 0x8b, 0x02, 0x03, 0x01, 0x80,
+ 0x83, 0x99, 0x19, 0x00, 0x72, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x1a, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x46, 0x72, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x2a, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0xff, 0x00, 0x00, 0x00, 0x56, 0x00, 0x40, 0x05, 0x82, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x7f, 0x43, 0x38, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x07,
+ 0x82, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf,
+ 0xa7, 0x00, 0x20, 0x8b, 0x02, 0x03, 0x01, 0x80, 0x83, 0x99, 0x19, 0x00,
+ 0x72, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x46, 0x72, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x07,
+ 0x82, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0x56, 0x00, 0x40, 0x05, 0x82, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x40, 0x07,
+ 0x82, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x43,
+ 0x38, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x31, 0x00, 0x40, 0x07,
+ 0x82, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x31, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x31, 0x00, 0x40, 0x07,
+ 0x82, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x3c, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x31, 0x00, 0x40, 0x07, 0x82, 0x00, 0x10, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x40, 0x07,
+ 0x82, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x1f, 0x00, 0x04, 0x03, 0x3a, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0d, 0x72, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x3d, 0x00, 0x00, 0x80, 0x3d, 0x00, 0x00, 0x80, 0x3d,
+ 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x72, 0x00, 0x10, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x70, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x31, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x0a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x22, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0f, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x1b, 0x00, 0x00, 0x05, 0x22, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x1a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x09,
+ 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, 0x00, 0x00, 0x8b,
+ 0x02, 0x03, 0x01, 0x80, 0x83, 0x99, 0x19, 0x00, 0xf2, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x55, 0x00, 0x08, 0x07, 0x12, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x56, 0x00, 0x08, 0x05,
+ 0x12, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xa7, 0x00, 0x00, 0x8b, 0x02, 0x03, 0x01, 0x80,
+ 0x83, 0x99, 0x19, 0x00, 0xf2, 0x00, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00,
+ 0x0a, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x55, 0x00, 0x20, 0x07, 0x42, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x2a, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0x56, 0x00, 0x20, 0x05, 0x42, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x28, 0x0a, 0x52, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x06, 0x02, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x7f, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x43,
+ 0x00, 0x00, 0x00, 0x00, 0xa7, 0x00, 0x00, 0x8b, 0x02, 0x03, 0x01, 0x80,
+ 0x83, 0x99, 0x19, 0x00, 0xf2, 0x00, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00,
+ 0x1a, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x55, 0x00, 0x08, 0x07, 0x12, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x2a, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0x56, 0x00, 0x08, 0x05, 0x12, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0xa7, 0x00, 0x00, 0x8b, 0x02, 0x03, 0x01, 0x80, 0x83, 0x99, 0x19, 0x00,
+ 0xf2, 0x00, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x46, 0x7e, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x55, 0x00, 0x10, 0x07,
+ 0x22, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x56, 0x00, 0x10, 0x05, 0x22, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x1a, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x18, 0x0a,
+ 0x32, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x43,
+ 0x00, 0x00, 0x7f, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0x56, 0x05, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x72, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00,
+ 0x0d, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x0d, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x56, 0x05, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x72, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08,
+ 0xb2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0d, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x46, 0x03, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0x72, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x81, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x2a, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x05,
+ 0x42, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0xf6, 0x0f, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x04, 0x10, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x46, 0x04, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07,
+ 0xf2, 0x00, 0x10, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x04, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0b, 0xf2, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x46, 0x84, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe6, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b,
+ 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0xe6, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b, 0xf2, 0x00, 0x10, 0x00,
+ 0x0d, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x0d, 0x00, 0x00, 0x00,
+ 0x46, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0xe6, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x56, 0x05, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x0f, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x0f, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x56, 0x05, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x72, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08,
+ 0xb2, 0x00, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x46, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0d, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00,
+ 0x46, 0x03, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x11, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x0f, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0xa6, 0x0a, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x81, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x2a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x05,
+ 0x42, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x05, 0x42, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x04, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x04, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07,
+ 0xf2, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x46, 0x04, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0b, 0xf2, 0x00, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x46, 0x84, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe6, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b,
+ 0xf2, 0x00, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x46, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0xe6, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b, 0xf2, 0x00, 0x10, 0x00,
+ 0x0f, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x46, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0xe6, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x56, 0x05, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00,
+ 0x56, 0x05, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x72, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08,
+ 0xb2, 0x00, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x46, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0d, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00,
+ 0x46, 0x03, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xe2, 0x00, 0x10, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x06, 0x89, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x81, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x2a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x05,
+ 0x42, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x04, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x04, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07,
+ 0xf2, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x46, 0x04, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0b, 0xf2, 0x00, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x46, 0x84, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe6, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b,
+ 0xf2, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x46, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0xe6, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b, 0xf2, 0x00, 0x10, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x46, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0xe6, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x56, 0x05, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x11, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x11, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00,
+ 0x56, 0x05, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x72, 0x00, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08,
+ 0xb2, 0x00, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x46, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0d, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00,
+ 0x46, 0x03, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xe2, 0x00, 0x10, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x06, 0x89, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0x72, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x72, 0x00, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x11, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x56, 0x05, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00,
+ 0x81, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x2a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x05,
+ 0x42, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x05, 0x42, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x04, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x04, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07,
+ 0xf2, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x46, 0x04, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0b, 0xf2, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x46, 0x84, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe6, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b,
+ 0xf2, 0x00, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x46, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0xe6, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b, 0xf2, 0x00, 0x10, 0x00,
+ 0x11, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00,
+ 0x46, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0xe6, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0b, 0xf2, 0x00, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00,
+ 0x06, 0x0a, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x38, 0x00, 0x00, 0x07,
+ 0xf2, 0x00, 0x10, 0x00, 0x13, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x56, 0x0f, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x56, 0x05, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x0a, 0x10, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00,
+ 0x15, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x56, 0x0f, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07,
+ 0xf2, 0x00, 0x10, 0x00, 0x16, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x06, 0x0a, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x07, 0x52, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0xf6, 0x0f, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x56, 0x07, 0x10, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x52, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x56, 0x07, 0x10, 0x00, 0x13, 0x00, 0x00, 0x00, 0x06, 0x02, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x52, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x56, 0x07, 0x10, 0x00, 0x15, 0x00, 0x00, 0x00, 0x06, 0x02, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x52, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x56, 0x07, 0x10, 0x00, 0x16, 0x00, 0x00, 0x00, 0x06, 0x02, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00,
+ 0x17, 0x00, 0x00, 0x00, 0xe6, 0x0e, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x56, 0x0f, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x17, 0x00, 0x00, 0x00, 0xe6, 0x0e, 0x10, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x56, 0x0f, 0x10, 0x00, 0x13, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x17, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x17, 0x00, 0x00, 0x00, 0xe6, 0x0e, 0x10, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x56, 0x0f, 0x10, 0x00, 0x15, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x17, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x17, 0x00, 0x00, 0x00, 0xe6, 0x0e, 0x10, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x56, 0x0f, 0x10, 0x00, 0x16, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x17, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07,
+ 0xf2, 0x00, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0xe6, 0x0e, 0x10, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x56, 0x0f, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0xe6, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x0f, 0x10, 0x00,
+ 0x13, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0xe6, 0x0e, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x56, 0x0f, 0x10, 0x00,
+ 0x15, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0xe6, 0x0e, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x56, 0x0f, 0x10, 0x00,
+ 0x16, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0xe6, 0x0e, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00,
+ 0x13, 0x00, 0x00, 0x00, 0xe6, 0x0e, 0x10, 0x00, 0x0d, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x13, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00,
+ 0x13, 0x00, 0x00, 0x00, 0xe6, 0x0e, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x15, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x13, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00,
+ 0x13, 0x00, 0x00, 0x00, 0xe6, 0x0e, 0x10, 0x00, 0x11, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x16, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x13, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x8d, 0xc2, 0x00, 0x00, 0x80,
+ 0x43, 0x55, 0x15, 0x00, 0x12, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x46, 0x00, 0x10, 0x00, 0x17, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x8d,
+ 0xc2, 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00, 0x22, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x48, 0x00, 0x00, 0x8d, 0xc2, 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00,
+ 0x42, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00,
+ 0x13, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x8d,
+ 0xc2, 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00, 0x12, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, 0x17, 0x00, 0x00, 0x00,
+ 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x48, 0x00, 0x00, 0x8d, 0xc2, 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00,
+ 0x22, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x8d, 0xc2, 0x00, 0x00, 0x80,
+ 0x43, 0x55, 0x15, 0x00, 0x42, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0xe6, 0x0a, 0x10, 0x00, 0x13, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, 0x00, 0x07,
+ 0x72, 0x00, 0x10, 0x00, 0x13, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x1a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x3d, 0x00, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x15, 0x00, 0x00, 0x00,
+ 0x56, 0x05, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x56, 0x0f, 0x10, 0x00,
+ 0x12, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00,
+ 0x16, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x06, 0x0a, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07,
+ 0xf2, 0x00, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x0a, 0x10, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x32, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0xd6, 0x05, 0x10, 0x00, 0x16, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0x32, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xd6, 0x05, 0x10, 0x00, 0x15, 0x00, 0x00, 0x00,
+ 0x46, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0x32, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0xd6, 0x05, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00,
+ 0x46, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0x32, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0xd6, 0x05, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x46, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07,
+ 0xf2, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x16, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x15, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x12, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x09, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x16, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x15, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x0b, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x16, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x0d, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x15, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x11, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x8d,
+ 0xc2, 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00, 0x12, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x48, 0x00, 0x00, 0x8d, 0xc2, 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00,
+ 0x22, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x8d, 0xc2, 0x00, 0x00, 0x80,
+ 0x43, 0x55, 0x15, 0x00, 0x42, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x46, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, 0x00, 0x07,
+ 0x72, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x48, 0x00, 0x00, 0x8d, 0xc2, 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00,
+ 0x12, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0xc6, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x8d, 0xc2, 0x00, 0x00, 0x80,
+ 0x43, 0x55, 0x15, 0x00, 0x42, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0xe6, 0x0a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xc6, 0x79, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x8d,
+ 0xc2, 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00, 0x82, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0xc6, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x38, 0x20, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x56, 0x05, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x86, 0x03, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xa4, 0x00, 0x00, 0x07, 0xf2, 0xe0, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xd6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
+ 0x82, 0x00, 0x10, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x07, 0xf2, 0xe0, 0x11, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xe6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x13, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x08,
+ 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xa4, 0x00, 0x00, 0x07, 0xf2, 0xe0, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x16, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xa4, 0x00, 0x00, 0x07, 0xf2, 0xe0, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x26, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x01, 0x3e, 0x00, 0x00, 0x01,
+ 0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00,
+ 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x79, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionCS2x2_refl.h b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionCS2x2_refl.h new file mode 100644 index 0000000..27db6d3 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionCS2x2_refl.h @@ -0,0 +1,16 @@ +#ifndef DistortionCS2x2_refl
+
+const OVR::CAPI::D3D_NS::ShaderBase::Uniform DistortionCS2x2_refl[] =
+{
+ { "Padding1", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 0, 64 },
+ { "Padding2", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 64, 64 },
+ { "EyeToSourceUVScale", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 128, 8 },
+ { "EyeToSourceUVOffset", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 136, 8 },
+ { "EyeRotationStart", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 144, 44 },
+ { "EyeRotationEnd", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 192, 44 },
+ { "UseOverlay", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 236, 4 },
+ { "RightEye", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 240, 4 },
+ { "FbSizePixelsX", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 244, 4 },
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_ps.h b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_ps.h new file mode 100644 index 0000000..5bc4599 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_ps.h @@ -0,0 +1,256 @@ +#ifndef DISTORTIONCHROMA_PS_H
+#define DISTORTIONCHROMA_PS_H
+
+static const unsigned char DistortionChroma_ps[] = {
+ 0x44, 0x58, 0x42, 0x43, 0xb7, 0x5b, 0x09, 0xd5, 0x8c, 0xb3, 0xcf, 0xc9,
+ 0x86, 0xe0, 0x0c, 0x3b, 0x65, 0x14, 0x61, 0x56, 0x01, 0x00, 0x00, 0x00,
+ 0xa4, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0xbc, 0x01, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0xac, 0x02, 0x00, 0x00,
+ 0x28, 0x0b, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x80, 0x01, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0x00, 0x01, 0x00, 0x00,
+ 0x4c, 0x01, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0xa3, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xab, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0d, 0x00, 0x00, 0x00, 0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x00, 0x54, 0x65, 0x78, 0x74, 0x75,
+ 0x72, 0x65, 0x00, 0x4c, 0x61, 0x73, 0x74, 0x54, 0x65, 0x78, 0x74, 0x75,
+ 0x72, 0x65, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00,
+ 0xb7, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x28, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x76, 0x65, 0x72, 0x64, 0x72, 0x69, 0x76, 0x65, 0x53, 0x63, 0x61,
+ 0x6c, 0x65, 0x73, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x61, 0x44, 0x65,
+ 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x75, 0x6c, 0x74,
+ 0x00, 0xab, 0xab, 0xab, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72,
+ 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c,
+ 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f,
+ 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e,
+ 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab,
+ 0x49, 0x53, 0x47, 0x4e, 0x9c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0f, 0x03, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x01, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x06, 0x06, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x0c, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74,
+ 0x69, 0x6f, 0x6e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45,
+ 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e,
+ 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0xab, 0xab,
+ 0x53, 0x48, 0x44, 0x52, 0x74, 0x08, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x1d, 0x02, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04,
+ 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
+ 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x55, 0x55, 0x00, 0x00, 0x64, 0x20, 0x00, 0x04, 0x32, 0x10, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03,
+ 0x12, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03,
+ 0x62, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03,
+ 0xc2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03,
+ 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03,
+ 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
+ 0x08, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x0b, 0x32, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x26, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1f, 0x00, 0x04, 0x03, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x00, 0x05, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x46, 0x14, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x05,
+ 0xf2, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x14, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x80, 0x81, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x80, 0x81, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0xa6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x96, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0xe6, 0x1a, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x36, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x0a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
+ 0x22, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xd2, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x06, 0x09, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c,
+ 0xf2, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0xe6, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xab, 0xaa, 0xaa, 0xbe,
+ 0xab, 0xaa, 0xaa, 0xbe, 0x00, 0x00, 0x20, 0xbf, 0x00, 0x00, 0x20, 0xbf,
+ 0x96, 0x19, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c,
+ 0xf2, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0xe6, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xab, 0xaa, 0xaa, 0xbe,
+ 0xab, 0xaa, 0xaa, 0xbe, 0x00, 0x00, 0x20, 0xbf, 0x00, 0x00, 0x20, 0xbf,
+ 0x46, 0x14, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c,
+ 0xf2, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0xe6, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xab, 0xaa, 0xaa, 0xbe,
+ 0xab, 0xaa, 0xaa, 0xbe, 0x00, 0x00, 0x20, 0xbf, 0x00, 0x00, 0x20, 0xbf,
+ 0xe6, 0x1e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
+ 0x12, 0x00, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x22, 0x00, 0x10, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x46, 0x02, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xd2, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x80, 0x40, 0x06, 0x09, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x36, 0x00, 0x00, 0x05, 0x22, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x1a, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0xd2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x06, 0x09, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x06, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c,
+ 0xf2, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3f,
+ 0x00, 0x00, 0x20, 0x3f, 0xab, 0xaa, 0xaa, 0x3e, 0xab, 0xaa, 0xaa, 0x3e,
+ 0x96, 0x19, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c,
+ 0xf2, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3f,
+ 0x00, 0x00, 0x20, 0x3f, 0xab, 0xaa, 0xaa, 0x3e, 0xab, 0xaa, 0xaa, 0x3e,
+ 0x46, 0x14, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c,
+ 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3f,
+ 0x00, 0x00, 0x20, 0x3f, 0xab, 0xaa, 0xaa, 0x3e, 0xab, 0xaa, 0xaa, 0x3e,
+ 0xe6, 0x1e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
+ 0x12, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x22, 0x00, 0x10, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x09, 0xd2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x09, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x09, 0x10, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x06, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0xe6, 0x0a, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0xe6, 0x0a, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0xe6, 0x0a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x36, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
+ 0x22, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0xd2, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x06, 0x09, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x0e, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0a, 0xd2, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x3e, 0x4b, 0x00, 0x00, 0x05,
+ 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x86, 0x03, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x01, 0x45, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x96, 0x15, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe6, 0x1a, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
+ 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x22, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x15, 0x00, 0x00, 0x01, 0x38, 0x00, 0x00, 0x07, 0xd2, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x04, 0x03,
+ 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x05,
+ 0x32, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x2d, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x86, 0x03, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x0b,
+ 0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x06, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x56, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x20, 0x00, 0x09,
+ 0x72, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x86, 0x03, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
+ 0x82, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x3f, 0x12, 0x00, 0x00, 0x01, 0x36, 0x00, 0x00, 0x05,
+ 0x72, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x86, 0x03, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x20, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x15, 0x00, 0x00, 0x01, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x86, 0x03, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x36, 0x00, 0x00, 0x05, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x3e, 0x00, 0x00, 0x01,
+ 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_ps.psh b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_ps.psh new file mode 100644 index 0000000..c69fce0 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_ps.psh @@ -0,0 +1,135 @@ +/************************************************************************************
+
+Filename : DistortionChroma_ps.psh
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+Texture2D Texture : register(t0);
+Texture2D LastTexture : register(t1);
+SamplerState Linear : register(s0);
+
+float2 OverdriveScales;
+float AaDerivativeMult;
+
+// Fast approximate gamma to linear conversion when averaging colors
+float3 ToLinear(float3 inColor) { return inColor * inColor; }
+float3 ToGamma(float3 inColor) { return sqrt(inColor); }
+
+void SampleStep(float2 oTexCoord0, float2 oTexCoord1, float2 oTexCoord2, float colorWeight, float2 texOffset,
+ inout float3 totalColor, inout float totalWeight)
+{
+ float3 newColor = 0;
+ newColor.r += Texture.Sample(Linear, oTexCoord0 + texOffset).r;
+ newColor.g += Texture.Sample(Linear, oTexCoord1 + texOffset).g;
+ newColor.b += Texture.Sample(Linear, oTexCoord2 + texOffset).b;
+ newColor = ToLinear(newColor);
+
+ totalColor += newColor * colorWeight;
+ totalWeight += colorWeight;
+}
+
+float3 ApplyHqAa(float2 oTexCoord0, float2 oTexCoord1, float2 oTexCoord2)
+{
+ float2 texWidth = fwidth(oTexCoord1);
+ float2 texStep = texWidth * AaDerivativeMult;
+
+ float totalWeight = 0;
+ float3 totalColor = 0;
+
+ // center sample
+ SampleStep(oTexCoord0, oTexCoord1, oTexCoord2, 4, 0, totalColor, totalWeight);
+
+ float3 smplExp = 1.0 / 3.0;
+ float3 smplWgt = 1.0;
+
+ SampleStep(oTexCoord0, oTexCoord1, oTexCoord2, smplWgt.x, -1.000 * smplExp.x * texStep, totalColor, totalWeight);
+ //SampleStep(oTexCoord0, oTexCoord1, oTexCoord2, smplWgt.y, -1.250 * smplExp.y * texStep, totalColor, totalWeight);
+ SampleStep(oTexCoord0, oTexCoord1, oTexCoord2, smplWgt.z, -1.875 * smplExp.z * texStep, totalColor, totalWeight);
+ SampleStep(oTexCoord0, oTexCoord1, oTexCoord2, smplWgt.z, 1.875 * smplExp.z * texStep, totalColor, totalWeight);
+ //SampleStep(oTexCoord0, oTexCoord1, oTexCoord2, smplWgt.y, 1.250 * smplExp.y * texStep, totalColor, totalWeight);
+ SampleStep(oTexCoord0, oTexCoord1, oTexCoord2, smplWgt.x, 1.000 * smplExp.x * texStep, totalColor, totalWeight);
+
+ return ToGamma(totalColor.rgb / totalWeight);
+}
+
+void main(in float4 oPosition : SV_Position,
+ in float oColor : COLOR,
+ in float2 oTexCoord0 : TEXCOORD0,
+ in float2 oTexCoord1 : TEXCOORD1,
+ in float2 oTexCoord2 : TEXCOORD2,
+ out float4 outColor0 : SV_Target0,
+ out float4 outColor1 : SV_Target1)
+{
+#define USE_ANISO 0
+
+#if USE_ANISO // enable "SampleMode hqFilter = (distortionCaps ... " in code
+ // Using anisotropic sampling - requires sRGB sampling
+
+ #if 1 // feeding in proper ddx & ddy does not yield better visuals
+ float2 uvDeriv = float2(ddx(oTexCoord1.x), ddy(oTexCoord1.y));
+ float ResultR = Texture.SampleGrad(Linear, oTexCoord0, uvDeriv.x, uvDeriv.y).r;
+ float ResultG = Texture.SampleGrad(Linear, oTexCoord1, uvDeriv.x, uvDeriv.y).g;
+ float ResultB = Texture.SampleGrad(Linear, oTexCoord2, uvDeriv.x, uvDeriv.y).b;
+ float3 newColor = float3(ResultR, ResultG, ResultB);
+ #else
+ float2 uvDerivX = ddx(oTexCoord1);
+ float2 uvDerivY = ddy(oTexCoord1);
+ float ResultR = Texture.SampleGrad(Linear, oTexCoord0, uvDerivX, uvDerivY).r;
+ float ResultG = Texture.SampleGrad(Linear, oTexCoord1, uvDerivX, uvDerivY).g;
+ float ResultB = Texture.SampleGrad(Linear, oTexCoord2, uvDerivX, uvDerivY).b;
+ float3 newColor = float3(ResultR, ResultG, ResultB);
+ #endif
+
+#else
+
+ float3 newColor;
+ // High quality anti-aliasing in distortion
+ if(AaDerivativeMult > 0)
+ {
+ newColor = ApplyHqAa(oTexCoord0, oTexCoord1, oTexCoord2);
+ }
+ else
+ {
+ float ResultR = Texture.Sample(Linear, oTexCoord0).r;
+ float ResultG = Texture.Sample(Linear, oTexCoord1).g;
+ float ResultB = Texture.Sample(Linear, oTexCoord2).b;
+ newColor = float3(ResultR, ResultG, ResultB);
+ }
+
+#endif
+
+ newColor = newColor * oColor.xxx;
+ outColor0 = float4(newColor, 1.0);
+ outColor1 = outColor0;
+
+ // pixel luminance overdrive
+ if(OverdriveScales.x > 0)
+ {
+ float3 oldColor = LastTexture.Load(int3(oPosition.xy, 0)).rgb;
+
+ float3 adjustedScales;
+ adjustedScales.x = newColor.x > oldColor.x ? OverdriveScales.x : OverdriveScales.y;
+ adjustedScales.y = newColor.y > oldColor.y ? OverdriveScales.x : OverdriveScales.y;
+ adjustedScales.z = newColor.z > oldColor.z ? OverdriveScales.x : OverdriveScales.y;
+
+ float3 overdriveColor = saturate(newColor + (newColor - oldColor) * adjustedScales);
+ outColor1 = float4(overdriveColor, 1.0);
+ }
+}
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_ps_refl.h b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_ps_refl.h new file mode 100644 index 0000000..fff0da3 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_ps_refl.h @@ -0,0 +1,9 @@ +#ifndef DistortionChroma_ps_refl
+
+const OVR::CAPI::D3D_NS::ShaderBase::Uniform DistortionChroma_ps_refl[] =
+{
+ { "OverdriveScales", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 0, 8 },
+ { "AaDerivativeMult", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 8, 4 },
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_vs.h b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_vs.h new file mode 100644 index 0000000..5ffc945 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_vs.h @@ -0,0 +1,101 @@ +#ifndef DISTORTIONCHROMA_VS_H
+#define DISTORTIONCHROMA_VS_H
+
+static const unsigned char DistortionChroma_vs[] = {
+ 0x44, 0x58, 0x42, 0x43, 0x8e, 0x20, 0x97, 0xab, 0xce, 0xc8, 0x74, 0x3e,
+ 0xfe, 0xeb, 0x97, 0xa0, 0xe6, 0xca, 0x72, 0xa1, 0x01, 0x00, 0x00, 0x00,
+ 0x64, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x38, 0x01, 0x00, 0x00, 0xd8, 0x01, 0x00, 0x00, 0x7c, 0x02, 0x00, 0x00,
+ 0xe8, 0x03, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xfc, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfe, 0xff, 0x00, 0x01, 0x00, 0x00,
+ 0xc8, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab,
+ 0x3c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xb4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x79, 0x65, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55,
+ 0x56, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00,
+ 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x79, 0x65, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55,
+ 0x56, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x00, 0x4d, 0x69, 0x63, 0x72,
+ 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c,
+ 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f,
+ 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e,
+ 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab,
+ 0x49, 0x53, 0x47, 0x4e, 0x98, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0f, 0x01, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e,
+ 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f,
+ 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x9c, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x06, 0x09, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50,
+ 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x43, 0x4f, 0x4c, 0x4f,
+ 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab,
+ 0x53, 0x48, 0x44, 0x52, 0x64, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00,
+ 0x59, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x12, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
+ 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0x12, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0x62, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0xc2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08,
+ 0xc2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f,
+ 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, 0x05, 0x12, 0x20, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0b, 0x62, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x06, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x11, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x8b, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b,
+ 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0xe6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b, 0xc2, 0x20, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x14, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0xa6, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_vs.vsh b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_vs.vsh new file mode 100644 index 0000000..bc35262 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_vs.vsh @@ -0,0 +1,53 @@ +/************************************************************************************
+
+Filename : DistortionChroma_vs.vsh
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+float2 EyeToSourceUVScale;
+float2 EyeToSourceUVOffset;
+
+void main(in float2 Position : POSITION,
+ in float4 Color : COLOR0,
+ in float2 TexCoord0 : TEXCOORD0,
+ in float2 TexCoord1 : TEXCOORD1,
+ in float2 TexCoord2 : TEXCOORD2,
+ out float4 oPosition : SV_Position,
+ out float1 oColor : COLOR,
+ out float2 oTexCoord0 : TEXCOORD0,
+ out float2 oTexCoord1 : TEXCOORD1,
+ out float2 oTexCoord2 : TEXCOORD2)
+{
+ oPosition.x = Position.x;
+ oPosition.y = Position.y;
+ oPosition.z = 0.5;
+ oPosition.w = 1.0;
+
+ // Scale them into UV lookup space
+ float2 tc0scaled = EyeToSourceUVScale * TexCoord0 + EyeToSourceUVOffset;
+ float2 tc1scaled = EyeToSourceUVScale * TexCoord1 + EyeToSourceUVOffset;
+ float2 tc2scaled = EyeToSourceUVScale * TexCoord2 + EyeToSourceUVOffset;
+
+ oTexCoord0 = tc0scaled; // R sample.
+ oTexCoord1 = tc1scaled; // G sample.
+ oTexCoord2 = tc2scaled; // B sample.
+ oColor = Color.r; // Used for vignette fade.
+}
+
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_vs_refl.h b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_vs_refl.h new file mode 100644 index 0000000..7feb789 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionChroma_vs_refl.h @@ -0,0 +1,9 @@ +#ifndef DistortionChroma_vs_refl
+
+const OVR::CAPI::D3D_NS::ShaderBase::Uniform DistortionChroma_vs_refl[] =
+{
+ { "EyeToSourceUVScale", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 0, 8 },
+ { "EyeToSourceUVOffset", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 8, 8 },
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarpChroma_vs.h b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarpChroma_vs.h new file mode 100644 index 0000000..418b740 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarpChroma_vs.h @@ -0,0 +1,214 @@ +#ifndef DISTORTIONTIMEWARPCHROMA_VS_H
+#define DISTORTIONTIMEWARPCHROMA_VS_H
+
+static const unsigned char DistortionTimewarpChroma_vs[] = {
+ 0x44, 0x58, 0x42, 0x43, 0x46, 0xb0, 0x5a, 0x1b, 0xfd, 0x8c, 0xdb, 0xa9,
+ 0x8d, 0x82, 0x83, 0x1f, 0xd6, 0x4f, 0x4a, 0x8f, 0x01, 0x00, 0x00, 0x00,
+ 0xac, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x98, 0x01, 0x00, 0x00, 0x38, 0x02, 0x00, 0x00, 0xdc, 0x02, 0x00, 0x00,
+ 0x30, 0x09, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x5c, 0x01, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfe, 0xff, 0x00, 0x01, 0x00, 0x00,
+ 0x2b, 0x01, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab,
+ 0x3c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+ 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xe4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xf8, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1c, 0x01, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x79, 0x65, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55,
+ 0x56, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00,
+ 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x79, 0x65, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55,
+ 0x56, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x00, 0x45, 0x79, 0x65, 0x52,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74,
+ 0x00, 0xab, 0xab, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x79, 0x65, 0x52,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x00, 0x4d,
+ 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29,
+ 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72,
+ 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e,
+ 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00,
+ 0x49, 0x53, 0x47, 0x4e, 0x98, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0f, 0x09, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e,
+ 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f,
+ 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x9c, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x06, 0x09, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50,
+ 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x43, 0x4f, 0x4c, 0x4f,
+ 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab,
+ 0x53, 0x48, 0x44, 0x52, 0x4c, 0x06, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00,
+ 0x93, 0x01, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x92, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
+ 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0x12, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0x62, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0xc2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x68, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
+ 0x32, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0xc2, 0x20, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x3f,
+ 0x36, 0x00, 0x00, 0x05, 0x12, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06,
+ 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
+ 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06,
+ 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
+ 0x22, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06,
+ 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
+ 0x42, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06,
+ 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
+ 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x1f, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
+ 0x32, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f,
+ 0x11, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x32, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x12, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x12, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x32, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x16, 0x85, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x85, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x22, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x22, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x52, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x56, 0x84, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x56, 0x84, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x42, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x42, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x92, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x56, 0x81, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x56, 0x81, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x82, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x07, 0x22, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x0f, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x07,
+ 0x42, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x46, 0x0f, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x07, 0x32, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x96, 0x05, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b, 0x62, 0x20, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x06, 0x01, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x06, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xa6, 0x8b, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x36, 0x00, 0x00, 0x05, 0x32, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x46, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08,
+ 0xc2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x80, 0x3f, 0x11, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x0f, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x07,
+ 0x22, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x46, 0x0f, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x11, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x07, 0x32, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b,
+ 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xe6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x36, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x11, 0x00, 0x00, 0x07,
+ 0x42, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x11, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x07,
+ 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0b, 0xc2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x06, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01,
+ 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarpChroma_vs.vsh b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarpChroma_vs.vsh new file mode 100644 index 0000000..7e5512b --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarpChroma_vs.vsh @@ -0,0 +1,66 @@ +/************************************************************************************
+
+Filename : DistortionTimewarpChroma_vs.vsh
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+float2 EyeToSourceUVScale;
+float2 EyeToSourceUVOffset;
+float4x4 EyeRotationStart;
+float4x4 EyeRotationEnd;
+
+float2 TimewarpTexCoordToWarpedPos(float2 inTexCoord, float4x4 rotMat)
+{
+ // Vertex inputs are in TanEyeAngle space for the R,G,B channels (i.e. after chromatic aberration and distortion).
+ // These are now "real world" vectors in direction (x,y,1) relative to the eye of the HMD.
+ // Apply the 3x3 timewarp rotation to these vectors.
+ float3 transformed = float3( mul ( rotMat, float4(inTexCoord.xy, 1, 1) ).xyz);
+ // Project them back onto the Z=1 plane of the rendered images.
+ float2 flattened = transformed.xy / transformed.z;
+ // Scale them into ([0,0.5],[0,1]) or ([0.5,0],[0,1]) UV lookup space (depending on eye)
+ return flattened * EyeToSourceUVScale + EyeToSourceUVOffset;
+}
+
+void main(in float2 Position : POSITION,
+ in float4 Color : COLOR0,
+ in float2 TexCoord0 : TEXCOORD0,
+ in float2 TexCoord1 : TEXCOORD1,
+ in float2 TexCoord2 : TEXCOORD2,
+ out float4 oPosition : SV_Position,
+ out float1 oColor : COLOR,
+ out float2 oTexCoord0 : TEXCOORD0,
+ out float2 oTexCoord1 : TEXCOORD1,
+ out float2 oTexCoord2 : TEXCOORD2)
+{
+ oPosition.x = Position.x;
+ oPosition.y = Position.y;
+ oPosition.z = 0.5;
+ oPosition.w = 1.0;
+
+ float timewarpLerpFactor = Color.a;
+ float4x4 lerpedEyeRot = lerp(EyeRotationStart, EyeRotationEnd, timewarpLerpFactor);
+
+ // warped positions are a bit more involved, hence a separate function
+ oTexCoord0 = TimewarpTexCoordToWarpedPos(TexCoord0, lerpedEyeRot);
+ oTexCoord1 = TimewarpTexCoordToWarpedPos(TexCoord1, lerpedEyeRot);
+ oTexCoord2 = TimewarpTexCoordToWarpedPos(TexCoord2, lerpedEyeRot);
+
+ oColor = Color.r; // Used for vignette fade.
+}
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarpChroma_vs_refl.h b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarpChroma_vs_refl.h new file mode 100644 index 0000000..38a168f --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarpChroma_vs_refl.h @@ -0,0 +1,11 @@ +#ifndef DistortionTimewarpChroma_vs_refl
+
+const OVR::CAPI::D3D_NS::ShaderBase::Uniform DistortionTimewarpChroma_vs_refl[] =
+{
+ { "EyeToSourceUVScale", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 0, 8 },
+ { "EyeToSourceUVOffset", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 8, 8 },
+ { "EyeRotationStart", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 16, 64 },
+ { "EyeRotationEnd", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 80, 64 },
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarp_vs.h b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarp_vs.h new file mode 100644 index 0000000..26fc0e2 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarp_vs.h @@ -0,0 +1,167 @@ +#ifndef DISTORTIONTIMEWARP_VS_H
+#define DISTORTIONTIMEWARP_VS_H
+
+static const unsigned char DistortionTimewarp_vs[] = {
+ 0x44, 0x58, 0x42, 0x43, 0x96, 0x74, 0x01, 0x0e, 0x69, 0xc5, 0xe0, 0xbd,
+ 0x73, 0x27, 0xa6, 0x54, 0x7e, 0xee, 0xb9, 0xb6, 0x01, 0x00, 0x00, 0x00,
+ 0x7c, 0x07, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x98, 0x01, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x7c, 0x02, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x5c, 0x01, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfe, 0xff, 0x00, 0x01, 0x00, 0x00,
+ 0x2b, 0x01, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab,
+ 0x3c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+ 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xe4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xf8, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1c, 0x01, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x79, 0x65, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55,
+ 0x56, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00,
+ 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x79, 0x65, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55,
+ 0x56, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x00, 0x45, 0x79, 0x65, 0x52,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74,
+ 0x00, 0xab, 0xab, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x79, 0x65, 0x52,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x00, 0x4d,
+ 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29,
+ 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72,
+ 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e,
+ 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00,
+ 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0f, 0x09, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e,
+ 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f,
+ 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x06, 0x09, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50,
+ 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x43, 0x4f, 0x4c, 0x4f,
+ 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab,
+ 0x53, 0x48, 0x44, 0x52, 0x7c, 0x04, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00,
+ 0x1f, 0x01, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x92, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
+ 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0x12, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0x62, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x68, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
+ 0x32, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0xc2, 0x20, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x3f,
+ 0x36, 0x00, 0x00, 0x05, 0x12, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06,
+ 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
+ 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06,
+ 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
+ 0x22, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06,
+ 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
+ 0x42, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06,
+ 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
+ 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x80,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x1f, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
+ 0x32, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f,
+ 0x11, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x62, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x81, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x81, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x12, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x12, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x62, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x56, 0x84, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x56, 0x84, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x22, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x22, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x52, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x56, 0x84, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x56, 0x84, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x42, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0a, 0x42, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x92, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x56, 0x81, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x56, 0x81, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
+ 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x11, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x46, 0x0e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x82, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x3a, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x07,
+ 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x07, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x96, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b, 0x62, 0x20, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x06, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xa6, 0x8b, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarp_vs.vsh b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarp_vs.vsh new file mode 100644 index 0000000..d594042 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarp_vs.vsh @@ -0,0 +1,63 @@ +/************************************************************************************
+
+Filename : DistortionTimewarp_vs.vsh
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+float2 EyeToSourceUVScale;
+float2 EyeToSourceUVOffset;
+float4x4 EyeRotationStart;
+float4x4 EyeRotationEnd;
+
+float2 TimewarpTexCoordToWarpedPos(float2 inTexCoord, float4x4 rotMat)
+{
+ // Vertex inputs are in TanEyeAngle space for the R,G,B channels (i.e. after chromatic aberration and distortion).
+ // These are now "real world" vectors in direction (x,y,1) relative to the eye of the HMD.
+ // Apply the 3x3 timewarp rotation to these vectors.
+ float3 transformed = float3( mul ( rotMat, float4(inTexCoord,1,1) ).xyz);
+ // Project them back onto the Z=1 plane of the rendered images.
+ float2 flattened = transformed.xy / transformed.z;
+ // Scale them into ([0,0.5],[0,1]) or ([0.5,0],[0,1]) UV lookup space (depending on eye)
+ return flattened * EyeToSourceUVScale + EyeToSourceUVOffset;
+
+}
+
+void main(in float2 Position : POSITION,
+ in float4 Color : COLOR0,
+ in float2 TexCoord0 : TEXCOORD0,
+ out float4 oPosition : SV_Position,
+ out float1 oColor : COLOR,
+ out float2 oTexCoord0 : TEXCOORD0)
+{
+
+ oPosition.x = Position.x;
+ oPosition.y = Position.y;
+ oPosition.z = 0.5;
+ oPosition.w = 1.0;
+
+ float timewarpLerpFactor = Color.a;
+ float4x4 lerpedEyeRot = lerp(EyeRotationStart, EyeRotationEnd, timewarpLerpFactor);
+
+ // Warped positions are a bit more involved, hence a separate function
+ oTexCoord0 = TimewarpTexCoordToWarpedPos(TexCoord0, lerpedEyeRot);
+ oColor = Color.r; // Used for vignette fade.
+}
+
+
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarp_vs_refl.h b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarp_vs_refl.h new file mode 100644 index 0000000..eab6baf --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/DistortionTimewarp_vs_refl.h @@ -0,0 +1,11 @@ +#ifndef DistortionTimewarp_vs_refl
+
+const OVR::CAPI::D3D_NS::ShaderBase::Uniform DistortionTimewarp_vs_refl[] =
+{
+ { "EyeToSourceUVScale", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 0, 8 },
+ { "EyeToSourceUVOffset", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 8, 8 },
+ { "EyeRotationStart", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 16, 64 },
+ { "EyeRotationEnd", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 80, 64 },
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_ps.h b/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_ps.h new file mode 100644 index 0000000..8d7867a --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_ps.h @@ -0,0 +1,65 @@ +#ifndef DISTORTION_PS_H
+#define DISTORTION_PS_H
+
+static const unsigned char Distortion_ps[] = {
+ 0x44, 0x58, 0x42, 0x43, 0x9d, 0x0b, 0x61, 0x6e, 0xd2, 0x1b, 0xc9, 0x8e,
+ 0x12, 0xdf, 0xf7, 0xa6, 0xae, 0xfe, 0x1e, 0x39, 0x01, 0x00, 0x00, 0x00,
+ 0xac, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0xd8, 0x00, 0x00, 0x00, 0x4c, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
+ 0x30, 0x02, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x9c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0x00, 0x01, 0x00, 0x00,
+ 0x6b, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x63, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x4c, 0x69, 0x6e, 0x65,
+ 0x61, 0x72, 0x00, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x4d,
+ 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29,
+ 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72,
+ 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e,
+ 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00,
+ 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x01, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x06, 0x06, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74,
+ 0x69, 0x6f, 0x6e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45,
+ 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e,
+ 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0xab, 0xab,
+ 0x53, 0x48, 0x44, 0x52, 0xa8, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x2a, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03,
+ 0x12, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03,
+ 0x62, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03,
+ 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
+ 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x96, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x20, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
+ 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x3f, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54,
+ 0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_ps.psh b/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_ps.psh new file mode 100644 index 0000000..e83c6d1 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_ps.psh @@ -0,0 +1,34 @@ +/************************************************************************************
+
+Filename : Distortion_ps.psh
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+
+Texture2D Texture : register(t0);
+SamplerState Linear : register(s0);
+
+float4 main(in float4 oPosition : SV_Position,
+ in float1 oColor : COLOR,
+ in float2 oTexCoord0 : TEXCOORD0) : SV_Target
+{
+ float3 Result = Texture.Sample(Linear, oTexCoord0).rgb;
+ return float4(Result * oColor, 1.0 );
+}
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_ps_refl.h b/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_ps_refl.h new file mode 100644 index 0000000..8a613f5 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_ps_refl.h @@ -0,0 +1 @@ +// No data available for shader reflection Distortion_ps_refl
\ No newline at end of file diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_vs.h b/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_vs.h new file mode 100644 index 0000000..52b9413 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_vs.h @@ -0,0 +1,82 @@ +#ifndef DISTORTION_VS_H
+#define DISTORTION_VS_H
+
+static const unsigned char Distortion_vs[] = {
+ 0x44, 0x58, 0x42, 0x43, 0xfd, 0x23, 0xd7, 0xc6, 0x1a, 0x85, 0x42, 0xd8,
+ 0xf1, 0xf2, 0x06, 0x88, 0x86, 0xf0, 0xd9, 0xc7, 0x01, 0x00, 0x00, 0x00,
+ 0x7c, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x38, 0x01, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00,
+ 0x00, 0x03, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xfc, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfe, 0xff, 0x00, 0x01, 0x00, 0x00,
+ 0xc8, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab,
+ 0x3c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xb4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x79, 0x65, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55,
+ 0x56, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00,
+ 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x45, 0x79, 0x65, 0x54, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55,
+ 0x56, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x00, 0x4d, 0x69, 0x63, 0x72,
+ 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c,
+ 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f,
+ 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e,
+ 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab,
+ 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0f, 0x01, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e,
+ 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f,
+ 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x06, 0x09, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50,
+ 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x43, 0x4f, 0x4c, 0x4f,
+ 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab,
+ 0x53, 0x48, 0x44, 0x52, 0xdc, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00,
+ 0x37, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x12, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
+ 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0x12, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0x62, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08,
+ 0xc2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f,
+ 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, 0x05, 0x12, 0x20, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0b, 0x62, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x06, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x11, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x8b, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01,
+ 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_vs.vsh b/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_vs.vsh new file mode 100644 index 0000000..d947772 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_vs.vsh @@ -0,0 +1,41 @@ +/************************************************************************************
+
+Filename : Distortion_vs.vsh
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+float2 EyeToSourceUVScale;
+float2 EyeToSourceUVOffset;
+
+void main(in float2 Position : POSITION,
+ in float4 Color : COLOR0,
+ in float2 TexCoord0 : TEXCOORD0,
+ out float4 oPosition : SV_Position,
+ out float1 oColor : COLOR,
+ out float2 oTexCoord0 : TEXCOORD0)
+{
+ oPosition.x = Position.x;
+ oPosition.y = Position.y;
+ oPosition.z = 0.5;
+ oPosition.w = 1.0;
+ oTexCoord0 = EyeToSourceUVScale * TexCoord0 + EyeToSourceUVOffset;
+ oColor = Color.r; // Used for vignette fade.
+}
+
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_vs_refl.h b/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_vs_refl.h new file mode 100644 index 0000000..b3e86ac --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/Distortion_vs_refl.h @@ -0,0 +1,9 @@ +#ifndef Distortion_vs_refl
+
+const OVR::CAPI::D3D_NS::ShaderBase::Uniform Distortion_vs_refl[] =
+{
+ { "EyeToSourceUVScale", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 0, 8 },
+ { "EyeToSourceUVOffset", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 8, 8 },
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_ps.h b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_ps.h new file mode 100644 index 0000000..00f928d --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_ps.h @@ -0,0 +1,51 @@ +#ifndef SIMPLEQUAD_PS_H
+#define SIMPLEQUAD_PS_H
+
+static const unsigned char SimpleQuad_ps[] = {
+ 0x44, 0x58, 0x42, 0x43, 0x8c, 0x53, 0x2f, 0x7c, 0x3d, 0xea, 0xa5, 0xb6,
+ 0x05, 0xb7, 0xe0, 0x83, 0x67, 0x16, 0x9c, 0x93, 0x01, 0x00, 0x00, 0x00,
+ 0x08, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x44, 0x01, 0x00, 0x00,
+ 0x8c, 0x01, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xc4, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0x00, 0x01, 0x00, 0x00,
+ 0x90, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab,
+ 0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00,
+ 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52,
+ 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65,
+ 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39,
+ 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31,
+ 0x00, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4f, 0x53, 0x47, 0x4e,
+ 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
+ 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0xab, 0xab,
+ 0x53, 0x48, 0x44, 0x52, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03,
+ 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06,
+ 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01,
+ 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_ps.psh b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_ps.psh new file mode 100644 index 0000000..c03d293 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_ps.psh @@ -0,0 +1,29 @@ +/************************************************************************************
+
+Filename : SimpleQuad_ps.psh
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+float4 Color;
+
+float4 main() : SV_Target
+{
+ return Color;
+}
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_ps_refl.h b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_ps_refl.h new file mode 100644 index 0000000..7980b65 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_ps_refl.h @@ -0,0 +1,8 @@ +#ifndef SimpleQuad_ps_refl
+
+const OVR::CAPI::D3D_NS::ShaderBase::Uniform SimpleQuad_ps_refl[] =
+{
+ { "Color", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 0, 16 },
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_vs.h b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_vs.h new file mode 100644 index 0000000..e68903f --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_vs.h @@ -0,0 +1,64 @@ +#ifndef SIMPLEQUAD_VS_H
+#define SIMPLEQUAD_VS_H
+
+static const unsigned char SimpleQuad_vs[] = {
+ 0x44, 0x58, 0x42, 0x43, 0xd5, 0x40, 0x5f, 0xa6, 0x2d, 0x0a, 0xd9, 0x2a,
+ 0x84, 0x41, 0x9e, 0x1f, 0xab, 0xa5, 0xa9, 0x2c, 0x01, 0x00, 0x00, 0x00,
+ 0xa8, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x38, 0x01, 0x00, 0x00, 0x6c, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00,
+ 0x2c, 0x02, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xfc, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfe, 0xff, 0x00, 0x01, 0x00, 0x00,
+ 0xc8, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab,
+ 0x3c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00,
+ 0xb8, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
+ 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x66, 0x66, 0x73,
+ 0x65, 0x74, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x00, 0xab, 0xab,
+ 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x4d, 0x69, 0x63, 0x72,
+ 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c,
+ 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f,
+ 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e,
+ 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab,
+ 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x07, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e,
+ 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50,
+ 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x53, 0x48, 0x44, 0x52,
+ 0x84, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x21, 0x00, 0x00, 0x00,
+ 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b,
+ 0x32, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xe6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0xc2, 0x20, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x3f,
+ 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_vs.vsh b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_vs.vsh new file mode 100644 index 0000000..94d6694 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_vs.vsh @@ -0,0 +1,31 @@ +/************************************************************************************
+
+Filename : SimplaeQuad_vs.vsh
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+float2 PositionOffset = float2(0, 0);
+float2 Scale = float2(1, 1);
+
+void main( in float3 Position : POSITION,
+out float4 oPosition : SV_Position)
+{
+ oPosition = float4(Position.xy * Scale + PositionOffset, 0.5, 1.0);
+}
\ No newline at end of file diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_vs_refl.h b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_vs_refl.h new file mode 100644 index 0000000..23bb021 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleQuad_vs_refl.h @@ -0,0 +1,9 @@ +#ifndef SimpleQuad_vs_refl
+
+const OVR::CAPI::D3D_NS::ShaderBase::Uniform SimpleQuad_vs_refl[] =
+{
+ { "PositionOffset", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 0, 8 },
+ { "Scale", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 8, 8 },
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_ps.h b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_ps.h new file mode 100644 index 0000000..39fda03 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_ps.h @@ -0,0 +1,77 @@ +#ifndef SIMPLETEXTUREDQUAD_PS_H
+#define SIMPLETEXTUREDQUAD_PS_H
+
+static const unsigned char SimpleTexturedQuad_ps[] = {
+ 0x44, 0x58, 0x42, 0x43, 0xbe, 0x17, 0xf1, 0xab, 0xc8, 0x62, 0x4c, 0x11,
+ 0xe8, 0x29, 0xb0, 0x5b, 0x0b, 0xf8, 0x73, 0x38, 0x01, 0x00, 0x00, 0x00,
+ 0x44, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x54, 0x01, 0x00, 0x00, 0xc8, 0x01, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00,
+ 0xc8, 0x02, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x18, 0x01, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0x00, 0x01, 0x00, 0x00,
+ 0xe4, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x8a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x53, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72,
+ 0x65, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, 0xab,
+ 0x92, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00,
+ 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52,
+ 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65,
+ 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39,
+ 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31,
+ 0x00, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50,
+ 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x43, 0x4f, 0x4c, 0x4f,
+ 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab,
+ 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65,
+ 0x74, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xc4, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04,
+ 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09,
+ 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07,
+ 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_ps.psh b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_ps.psh new file mode 100644 index 0000000..d29c9af --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_ps.psh @@ -0,0 +1,39 @@ +/************************************************************************************
+
+Filename : SimpleTextureQuad_ps.psh
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+float4 Color;
+
+SamplerState LinearSampler : register(s0);
+Texture2D Texture : register(t0);
+
+struct Values
+{
+ float4 Position : SV_Position;
+ float4 Color : COLOR0;
+ float2 TexCoord : TEXCOORD0;
+};
+
+float4 main(in Values inputValues) : SV_Target
+{
+ return Color * inputValues.Color * Texture.Sample(LinearSampler, inputValues.TexCoord);
+}
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_ps_refl.h b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_ps_refl.h new file mode 100644 index 0000000..578cc45 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_ps_refl.h @@ -0,0 +1,8 @@ +#ifndef SimpleTexturedQuad_ps_refl
+
+const OVR::CAPI::D3D_NS::ShaderBase::Uniform SimpleTexturedQuad_ps_refl[] =
+{
+ { "Color", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 0, 16 },
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_vs.h b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_vs.h new file mode 100644 index 0000000..8e18f8e --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_vs.h @@ -0,0 +1,82 @@ +#ifndef SIMPLETEXTUREDQUAD_VS_H
+#define SIMPLETEXTUREDQUAD_VS_H
+
+static const unsigned char SimpleTexturedQuad_vs[] = {
+ 0x44, 0x58, 0x42, 0x43, 0xe3, 0x2d, 0x41, 0xb3, 0xee, 0x4c, 0x7d, 0xb3,
+ 0x80, 0x0d, 0x3a, 0x0c, 0xb6, 0x80, 0x5e, 0xb1, 0x01, 0x00, 0x00, 0x00,
+ 0x7c, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x38, 0x01, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00,
+ 0x00, 0x03, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xfc, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfe, 0xff, 0x00, 0x01, 0x00, 0x00,
+ 0xc8, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab,
+ 0x3c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00,
+ 0xb8, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
+ 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x66, 0x66, 0x73,
+ 0x65, 0x74, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x00, 0xab, 0xab,
+ 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x4d, 0x69, 0x63, 0x72,
+ 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c,
+ 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f,
+ 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e,
+ 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab,
+ 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x07, 0x03, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x0f, 0x0f, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e,
+ 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f,
+ 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50,
+ 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x43, 0x4f, 0x4c, 0x4f,
+ 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab,
+ 0x53, 0x48, 0x44, 0x52, 0xdc, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00,
+ 0x37, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
+ 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
+ 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x32, 0x00, 0x00, 0x0b, 0x32, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x8a, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08,
+ 0xc2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f,
+ 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01,
+ 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_vs.vsh b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_vs.vsh new file mode 100644 index 0000000..33a5fe5 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_vs.vsh @@ -0,0 +1,39 @@ +/************************************************************************************
+
+Filename : SimpleTextureQuad_vs.vsh
+
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+************************************************************************************/
+
+struct Values
+{
+ float4 Position : SV_Position;
+ float4 Color : COLOR0;
+ float2 TexCoord : TEXCOORD0;
+};
+
+float2 PositionOffset = float2(0, 0);
+float2 Scale = float2(1, 1);
+
+void main(in float3 Position : POSITION, in float4 Color : COLOR0, in float2 TexCoord : TEXCOORD0, out Values outputValues)
+{
+ outputValues.Position = float4(Position.xy * Scale + PositionOffset, 0.5, 1.0);
+ outputValues.Color = Color;
+ outputValues.TexCoord = TexCoord;
+}
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_vs_refl.h b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_vs_refl.h new file mode 100644 index 0000000..5adb8a0 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/SimpleTexturedQuad_vs_refl.h @@ -0,0 +1,9 @@ +#ifndef SimpleTexturedQuad_vs_refl
+
+const OVR::CAPI::D3D_NS::ShaderBase::Uniform SimpleTexturedQuad_vs_refl[] =
+{
+ { "PositionOffset", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 0, 8 },
+ { "Scale", OVR::CAPI::D3D_NS::ShaderBase::VARTYPE_FLOAT, 8, 8 },
+};
+
+#endif
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/bin2header.exe b/LibOVR/Src/CAPI/D3D1X/Shaders/bin2header.exe Binary files differnew file mode 100644 index 0000000..b3f8d10 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/bin2header.exe diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/genComputeShaderHeader.bat b/LibOVR/Src/CAPI/D3D1X/Shaders/genComputeShaderHeader.bat new file mode 100644 index 0000000..784bc86 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/genComputeShaderHeader.bat @@ -0,0 +1,15 @@ +@echo off
+pushd %~dp0
+echo Compiling shader and packing into header: %~2
+setlocal
+
+set PATH=%PATH%;"%DXSDK_DIR%Utilities\bin\x86\"
+fxc.exe /nologo /E main /T cs_5_0 /Fo "%1" %2
+bin2header.exe "%1"
+
+echo Generating shader reflection data for %1
+ShaderReflector "%1" "%1_refl.h"
+
+del "%1"
+endlocal
+popd
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/genPixelShaderHeader.bat b/LibOVR/Src/CAPI/D3D1X/Shaders/genPixelShaderHeader.bat new file mode 100644 index 0000000..76f17c2 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/genPixelShaderHeader.bat @@ -0,0 +1,15 @@ +@echo off
+pushd %~dp0
+echo Compiling shader and packing into header: %~2
+setlocal
+
+set PATH=%PATH%;"%DXSDK_DIR%Utilities\bin\x86\"
+fxc.exe /nologo /E main /T ps_4_0 /Fo "%1" %2
+bin2header.exe "%1"
+
+echo Generating shader reflection data for %1
+ShaderReflector "%1" "%1_refl.h"
+
+del "%1"
+endlocal
+popd
diff --git a/LibOVR/Src/CAPI/D3D1X/Shaders/genVertexShaderHeader.bat b/LibOVR/Src/CAPI/D3D1X/Shaders/genVertexShaderHeader.bat new file mode 100644 index 0000000..7085775 --- /dev/null +++ b/LibOVR/Src/CAPI/D3D1X/Shaders/genVertexShaderHeader.bat @@ -0,0 +1,15 @@ +@echo off
+pushd %~dp0
+echo Compiling shader and packing into header: %~2
+setlocal
+
+set PATH=%PATH%;"%DXSDK_DIR%Utilities\bin\x86\"
+fxc.exe /nologo /E main /T vs_4_0 /Fo "%1" %2
+bin2header.exe "%1"
+
+echo Generating shader reflection data for %1
+ShaderReflector "%1" "%1_refl.h"
+
+del "%1"
+endlocal
+popd
|