VR Compositor Layers setup
Hello, I am following this doc. and I also check Unity StarterSample that shows example to setup 180/360 video playback. But before going to video, I wanted to try this with an Image. So I added this setup:
and now this is the RawImage with my custom shader:
now coding part:
RawImage rawImage = GameObject.Find("ImagePlayer").gameObject.GetComponent<RawImage>();
OVROverlay overlay = GameObject.Find("ImagePlayer").gameObject.GetComponent<OVROverlay>();
// OVROverlay won't check if the texture changed, so disable to clear old texture
overlay.enabled = false;
overlay.textures[0] = texture2d; //assigned from inspector window
overlay.enabled = true;
Material mat = new Material(rawImage.material);
rawImage.material = mat;
rawImage.texture = overlay.textures[0]; //I guess here the texture is already processed through ovroverlay ??is this the correct way to setup ovroverlay to process images? I tried with underlay and overlay as well but the visual difference is not too different from regular texture in my Quest 2. Perhaps my setup is wrong and the texture never goes through ovroverlay?
