您的位置:首页 > 产品设计 > UI/UE

HTC Vive打包的UE4游戏全屏,铺满窗口的方法

2016-10-17 20:27 971 查看
未修改前,打包的游戏窗口两边会有黑边,修改后可以让游戏内容铺满窗口

要求使用源码版本的引擎打包

定位到Engine\Plugins\Runtime\Steam\SteamVR\Source\SteamVR\Private\SteamVRFunctionLibrary.cpp



<pre name="code" class="cpp">RendererModule->DrawRectangle( RHICmdList, ViewportWidth / 4, 0, ViewportWidth / 2, ViewportHeight,
0.1f, 0.2f, 0.3f, 0.6f, FIntPoint(ViewportWidth, ViewportHeight), FIntPoint(1, 1),
*VertexShader, EDRF_Default);



改为

RendererModule->DrawRectangle( RHICmdList, 0, 0, ViewportWidth, ViewportHeight,
0.0f, 0.3f, 0.4f, 0.4f, FIntPoint(ViewportWidth, ViewportHeight), FIntPoint(1, 1),
*VertexShader, EDRF_Default);

编译打包项目即可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: