I made deferred shading renderer in WebGL using OES_texture_float texture to store G-buffer data.
This feature clearly works in browsers of PC(Chrome,Firefox,Safari,Edge...) But, this G-buffer seems not working in Mobile browser.
I tried to find out the reason, but I couldn't make it. This is how I did for debugging this.
- Check OES_texture_float supported or NOT.
Of course I did this. And I made sure my devices for debugging is supporting OES_texture_float. I tried to getExtension and that method didn't return undefined.
And I also checked out the website for check WebGL extension compatibility(http://renderingpipeline.com/webgl-extension-viewer/).
- I tried to fetch the pixels of the floating value texture with readPixels
I couldn't do this for mobile browser. But,in the Chrome in PC, readPixels to read floating value texture works correctly.
I guess readPixels to these types of texture is not ensured to work even if OES_texture_float was supported.
I know this is very hard to answer, but I couldn't paste my code here since these are very huge. And now I guess OES_texture_float is just supporting fetching texture value from texture liketexture2D(floatingTexture,uv)
and not made sure to use for rendering the texture itself.
I want any suggestion to debug. And, if you know any sample using floating value texture and working in mobile, please paste the url to work. I want to inspect it.
readPixels
of floating point textures if they're supported, however you should check and enable theWEBGL_color_buffer_float
extension if you're rendering to a floating point texture. See the last point in the Overview section of the extension spec. – LJᛃWEBGL_color_buffer_float
. I wonder this is the reason.... – kyasbal