First of all, I truly appreciate Oculus's overlay layer tech for media player developers, which make video looks sharper & less judder.
My team has been contributing to develop "view-based media player", the main method uses 24 quadrilateras to combine mesh into what just right cover camera's view. it works well while 24 quads rendered by unity mesh & shader, but we want to introduce this method into overlay, letting overlay renders the 24 quad.
I check the newest sdk v1.40, the overlay layer tech could coustom their mesh through vertexs & uv & triangle index by OVROverlayMeshGenerator, but there is no way to custom overlay's mesh shader though sdk v1.40. As for as i know, there should be program id created by gles though glCreateShader, which use for overlay mesh shadering.
so, could oculus staff update unity's sdk in future to support changing overlay's mesh shader? Somehitng like i can pass gles style shader into api and got the shader id, so i can modify params by native .so libary and render something very flexibly.
[dllImport"mylib"]
static extern void ModifyMyShader(int shaderId)
// get shader id though api in unity
void func()
{
uint shaderId = createOverlayProgram(string vertexShader, string fragShader);// not unity shader, we use gles native shade here
// pass it into native libary which share opengl context, so we can modify it
ModifyMyShader(shaderid)
}
// modify shader though shader id in c++
void func_native(int id)
{
GL_CHECK(glUseProgram(id));
texY = GL_CHECK(glGetUniformLocation(id, "TextureY"));
if (texY != -1)
GL_CHECK(glUniform1i(texY, 0));
}