07-27-2018 01:36 AM
private bool PopulateLayer(int mipLevels, bool isHdr, OVRPlugin.Sizei size, int sampleCount, int stage)
which make gama correct & copy texture into overlay SwapChain. because of blit operation kills performance, i do not need to render each frame until new frame come, i modify OVRoverlay's code looks like: void PopulateLayer()
{for (int eyeId = 0; eyeId < texturesPerStage; ++eyeId)
{Texture et = layerTextures[eyeId].swapChain[stage];
if (et == null)
continue;
// render for 360 top-bottom video
//textures[0] is videotexture from video file
if (eyeId == 0)
Graphics.CopyTexture(textures[0], 0, 0,
0, textures[0].height / 2, textures[0].width, textures[0].height / 2,
et, 0, 0, 0, 0);
else
Graphics.CopyTexture(textures[0], 0, 0,
0, 0, textures[0].width, textures[0].height / 2,
et, 0, 0, 0, 0);
ret = true;
}
}
07-27-2018 04:49 AM
if i copy video texture into all layerTextures[eyeId].swapChain's texture, the judder disappear. but make fps only 30 for oculus go, because 3 copytexture in one frame. this is unsufferable. the modified code looks likevoid PopulateLayer()
for (int eyeId = 0; eyeId < texturesPerStage; ++eyeId)
{
for(int i = 0; i < stageCount; ++i)
{
Texture et = layerTextures[eyeId].swapChain;
Graphics.CopyTexture()
}
}
07-30-2018 09:55 PM
08-01-2018 07:20 PM
imperativity said:
You should have you application decode the video content directly to that texture to solve your judder problem.
08-07-2018 08:56 PM
08-09-2018 12:35 PM
wangxiaogangan said:
@imperativity thank you very much, overlay is more effective compared with underlay. when finish my work, i will post the 360 video render method in detail using overlay if someone interested