VR View - Render: Unable to load Texture from image.jpg

旧街凉风 提交于 2019-12-05 11:07:45

The image that is produced by Cardboard Camera is not in the correct format. VR view requires a equirectangular-panoramic image, and for stereo images, they need to be stacked. See https://developers.google.com/vr/concepts/vrview#supported_formats for Reference.

There is a link to convert Cardboard Camera images to the correct format: https://storage.googleapis.com/cardboard-camera-converter/index.html

There are also a couple codelabs that walk through using VR view, including converting the image to the correct format: https://codelabs.developers.google.com/?cat=Virtual+Reality

Primary reason for the error you have mentioned is "CORS". Cross-Origin Resource Sharing.

Your image is not accessible to the calling iframe script. Which is hosted on Google servers.

http://enable-cors.org/

Once you enable CORS, it will work. The reason you have mentioned that it started working once you cloned it locally, is the same. Now the vr script and image are having same origin :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!