Skip to content
Snippets Groups Projects
Commit 21398340 authored by Jens Koenen's avatar Jens Koenen
Browse files

Fixed last bug and updated documentation

parent b341a2c0
Branches
No related tags found
No related merge requests found
Pipeline #570822 failed
# THIS VERSION IS NOT WORKING RIGHT NOW
# HMD Simulator # HMD Simulator
The HMD Simulator is an Unreal plugin that emulates a connected HMD and its controllers. Once the plugin is added to your project and enabled, you can [start in VR](Resources/VRLaunch.png) even if you do not have an HMD connected. The HMD Simulator is an Unreal plugin that emulates a connected HMD and its controllers. Once the plugin is added to your project and enabled, you can [start in VR](Resources/VRLaunch.png) even if you do not have an HMD connected.
...@@ -27,8 +25,10 @@ As shown in the following image, if you want to control an action with the HMD S ...@@ -27,8 +25,10 @@ As shown in the following image, if you want to control an action with the HMD S
For the Unreal VR template, the following mappings could be used: For the Unreal VR template, the following mappings could be used:
**IMC_Default** **IMC_Default**
- IA_Grab_Left <-> HMDSimulator (L) Grip Button - IA_Grab_Left_Pressed <-> HMDSimulator (L) Grip Button
- IA_Grab_Right <-> HMDSimulator (R) Grip Button - IA_Grab_Right_Pressed <-> HMDSimulator (R) Grip Button
- IA_Grab_Left_Released <-> HMDSimulator (L) Grip Button
- IA_Grab_Right_Released <-> HMDSimulator (R) Grip Button
- IA_Menu_Toggle_Left <-> HMDSimulator (L) Menu Button - IA_Menu_Toggle_Left <-> HMDSimulator (L) Menu Button
- IA_Menu_Toggle_Right <-> HMDSimulator (R) Menu Button - IA_Menu_Toggle_Right <-> HMDSimulator (R) Menu Button
......
...@@ -250,13 +250,21 @@ void FSimulatedHMD::CopyTexture_RenderThread(FRHICommandListImmediate& RHICmdLis ...@@ -250,13 +250,21 @@ void FSimulatedHMD::CopyTexture_RenderThread(FRHICommandListImmediate& RHICmdLis
const bool bSameSize = DstRect.Size() == SrcRect.Size(); const bool bSameSize = DstRect.Size() == SrcRect.Size();
if (bSameSize) if (bSameSize)
{ {
//FRHIBatchedShaderParameters& BatchedParameters, FRHISamplerState* SamplerStateRHI, FRHITexture* TextureRHI FRHIBatchedShaderParametersAllocator* batch_allocator = RHICmdList.CreateBatchedShaderParameterAllocator(ERHIBatchedShaderParameterAllocatorPageSize::Small);
FRHIBatchedShaderParameters batch(*batch_allocator);
PixelShader->SetParameters(RHICmdList, TStaticSamplerState<SF_Point>::GetRHI(), SrcTexture); PixelShader->SetParameters(batch, TStaticSamplerState<SF_Point>::GetRHI(), SrcTexture);
RHICmdList.SetBatchedShaderParameters(PixelShader.GetPixelShader(), batch);
} }
else else
{ {
PixelShader->SetParameters(RHICmdList, TStaticSamplerState<SF_Bilinear>::GetRHI(), SrcTexture); FRHIBatchedShaderParametersAllocator* batch_allocator = RHICmdList.CreateBatchedShaderParameterAllocator(ERHIBatchedShaderParameterAllocatorPageSize::Small);
FRHIBatchedShaderParameters batch(*batch_allocator);
PixelShader->SetParameters(batch, TStaticSamplerState<SF_Bilinear>::GetRHI(), SrcTexture);
RHICmdList.SetBatchedShaderParameters(PixelShader.GetPixelShader(), batch);
} }
RendererModule->DrawRectangle( RendererModule->DrawRectangle(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment