Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
wangxiaogangan's avatar
7 years ago

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

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....... 


Replies have been turned off for this discussion