cancel
Showing results for 
Search instead for 
Did you mean: 

feature request for overlay layer:set overlay layer texture uv matrix in unity

wangxiaogangan
Explorer
i had similar problem before "https://forums.oculusvr.com/developer/discussion/69025/compositor-layer-shape-feature-request-halfsp...", which talk about how to render 180 video with Equirect Layer.

after a lot of search in oculus unity sdk & John Carmack's 5k strip media player, i found overlay should has some struct & api in native code like vrapi_DefaultLayerEquirect2 and its member called TextureMatrix in file MultiVideo.cpp which should use for change frag shader sample position. in case of 180 video, we just need set Equirect Layer's TextureMatrix to cut sample position by half  in horizontal direction, when rendering overlay.

currently i realize 180 video render with double Equirect Layer's texture width, while the right half texture render with black. but it kill performance badly. could oculus staff update unity's sdk in future,  support changing Equirect Layer's texture uv when rendering? make layer's texture will ctrl its render shape with TextureMatrix,  instead of just simple cover it.

0 REPLIES 0