PDA

View Full Version : Does any browser supports FP textures as render targets?



szimek
01-09-2011, 02:35 PM
Hey,

I've written a very basic app based on example from Learning WebGL page (http://learningwebgl.com/blog/?p=1786) that renders red color (value 2.0) to a texture and then in the next pass fetches color from this texture and renders it to the screen.

Everything works fine if I use UNSIGNED_BYTE as a texture type, but when I switch to FLOAT it doesn't work anymore and I get INVALID_FRAMEBUFFER_OPERATION error on clear and drawElements calls and just a black canvas. The render target is 512x512 and in RGB format.

Anybody knows if it's actually supported by any browser? I'm using Chrome 10 (dev channel), which says that it supports OES_texture_float extension.

Cheers,
Szymon

sheets
01-12-2011, 08:41 PM
https://www.khronos.org/webgl/public-ma ... 00200.html (https://www.khronos.org/webgl/public-mailing-list/archives/1012/msg00200.html)

szimek
01-13-2011, 01:04 AM
Thanks.

Actually it turned out that I wasn't enabling the extension - I thought that all available extensions are enabled by default and getExtension function is just used to check if it's available :)