How to use an OVROverlay Cubemap?
Hi All,
For this question assume that I'm in the Cubes scene included in the OVR SDK. I'm on mobile using a Galaxy S6 with the GearVR.
In that scene, I used the OVRCameraRig to generate a cubemap using the Oculus screenshot tool (PNG, size 2048, mipmaps turned on). The cubemap works fine if I create a cubemap skybox material and apply it to the camera, but I want to try and use the OVROverlay cubemap.
What I did was attach an OVROverlay component to the OVRCameraRig in the scene, set its shape to Cubemap, and placed my generated cubemap in the two texture slots (as per this screenshot). I don't see anything in the editor, which I guess makes sense, but if I build to the phone I don't see the cubemap either. Furthermore if I use ADB I can see lots of errors. The first is
RenderTexture.GenerateMips failed: render texture does not have mip maps (set useMipMap to true).
Which seems odd because, as I mentioned, MipMaps is chcked on my .cubemap screenshot.
Graphics.CopyTexture can only copy between same texture format groups (OpenGL internal formats: src=37812, blockSize=16 ; dst=32856, blockSize=4)
I figure that means the screenshot is formatted incorrectly, but the screenshot tool doesn't give me a lot of options regarding format. I tried reducing the size of the screenshot but it didn't seem to have an effect (I thought it would change the blocksize or something.)
OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_ENUM: enum argument out of range
I see one of these at the end.
Is there a step I'm missing? Or is this something that isn't supported on mobile / the Galaxy S6? I actually just tried using the project (as well as the cubemap from the project) mentioned in this thread with the same results.
Thanks for any help you can provide,
John
For this question assume that I'm in the Cubes scene included in the OVR SDK. I'm on mobile using a Galaxy S6 with the GearVR.
In that scene, I used the OVRCameraRig to generate a cubemap using the Oculus screenshot tool (PNG, size 2048, mipmaps turned on). The cubemap works fine if I create a cubemap skybox material and apply it to the camera, but I want to try and use the OVROverlay cubemap.
What I did was attach an OVROverlay component to the OVRCameraRig in the scene, set its shape to Cubemap, and placed my generated cubemap in the two texture slots (as per this screenshot). I don't see anything in the editor, which I guess makes sense, but if I build to the phone I don't see the cubemap either. Furthermore if I use ADB I can see lots of errors. The first is
RenderTexture.GenerateMips failed: render texture does not have mip maps (set useMipMap to true).
Which seems odd because, as I mentioned, MipMaps is chcked on my .cubemap screenshot.
Graphics.CopyTexture can only copy between same texture format groups (OpenGL internal formats: src=37812, blockSize=16 ; dst=32856, blockSize=4)
I figure that means the screenshot is formatted incorrectly, but the screenshot tool doesn't give me a lot of options regarding format. I tried reducing the size of the screenshot but it didn't seem to have an effect (I thought it would change the blocksize or something.)
OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_ENUM: enum argument out of range
I see one of these at the end.
Is there a step I'm missing? Or is this something that isn't supported on mobile / the Galaxy S6? I actually just tried using the project (as well as the cubemap from the project) mentioned in this thread with the same results.
Thanks for any help you can provide,
John
