Currently, spherical environment mapping is not implemented on WebGL. The reason is that spherical mapping was provided mostly for historical retrocompatibility, since even in the latest versions of Blitz3D it was usually replaced by cubemapping, that was more efficent and more effective in most cases. Still, OpenB3D kept supporting spherical mapping since fixed function pipeline provided it (and, in theory, OpenB3D could be used on older graphic card that don't support cube mapping).
The WebGL version requires a graphic card supporting programmable pipeline, and all of them support cubemapping, so having sphere mapping as a fallback is not necessary. And adding support for it, unfortunately, would double the complexity of the shaders generated by the library, since all possible combinations of lights and textures would have to be updated to include one more case.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks and got it now. Would it be possible or just ideal to fallback to shaders on gles/webgl build and perhaps add it to openb3dplus and replicate the same effect (1 light and 1 texture?) on GL? cheers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Currently, spherical environment mapping is not implemented on WebGL. The reason is that spherical mapping was provided mostly for historical retrocompatibility, since even in the latest versions of Blitz3D it was usually replaced by cubemapping, that was more efficent and more effective in most cases. Still, OpenB3D kept supporting spherical mapping since fixed function pipeline provided it (and, in theory, OpenB3D could be used on older graphic card that don't support cube mapping).
The WebGL version requires a graphic card supporting programmable pipeline, and all of them support cubemapping, so having sphere mapping as a fallback is not necessary. And adding support for it, unfortunately, would double the complexity of the shaders generated by the library, since all possible combinations of lights and textures would have to be updated to include one more case.
Thanks and got it now. Would it be possible or just ideal to fallback to shaders on gles/webgl build and perhaps add it to openb3dplus and replicate the same effect (1 light and 1 texture?) on GL? cheers.