[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Restricting WebGL exposure of OES_depth_texture

For what is worth, you can achieve the equivalent of a single-channel FLOAT readback by rendering the bit patterns of the floating point numbers to a 4x8-bit RGBA channel, and then reading the texture. It is horrendously ugly, but it is simple and does the job.

The version I wrote does not handle denormals, infinities, NaNs or anything that is not a "nice" IEEE 754 value. But I have used this in the past, and it works.

I don't have a ready-made GLSL program for you, for technical reasons; but the idea can be seen here:


Let me know if you need more specifics.


On Jun 28, 2012, at 4:44 AM, Yvonne Jung wrote:

> Hi all,
> another question concerning depth textures: is it still correct that readPixels is not yet implemented for FLOAT (I got an error when trying to use it and also found a corresponding bug report in the Mozilla bug tracker) and if true, when do you expect to be able to provide such an implementation?
> Regards
> Yvonne

You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl