cancel
Showing results for 
Search instead for 
Did you mean: 

compositor layer shape feature request: halfsphere shape using for 180 video in unity

wangxiaogangan
Explorer
my halfsphere overlay shape feature request comes from plyaing 180 video. after a few test in playing 360 video, i found that if playing 180 video with full sphere, i must double the texture2d in horizontal direction which render the extra pixels in clear color to make 180 video work. so, if i play a 1000 * 1000 normal 180 video, i will create texture in 2000 * 1000, and copy texture like this:
TextureSize = new OVRPlugin.Sizei() { 
w = ( textures[0].width * 2),
    h = (textures[0].height) };


// just copy src into dst's half width & full height
Texture et = layerTextures[eyeId].swapChain[stage]; 
Graphics.CopyTexture(textures[0], 0, 0,
    0, 0, textures[0].width, textures[0].height,
    et, 0, 0, 0, 0);
is there a way for render 180 video just using its video texture's size in overlay? not double its width or height or something killing performance....... 


0 REPLIES 0