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

Re: [Public WebGL] Bad news for float textures?




On Jan 27, 2016, at 6:44 PM, Daniel Koch <dkoch@nvidia.com> wrote:

I fairly certain this is an oversight in the spec.  The SL docs probably never got updated.


Indeed in ES 3.1 the words "where each component is in the range [0, 1].” from the second of the 2 paragraphs. However in both 3.1 and 3.2 the first quoted words below still appear which means the spec contradicts itself.

We need to get the specs fixed.

Regards

    -Mark


On 2016-01-27, 8:19 PM, "owners-public_webgl@khronos.org on behalf of Jeff Gilbert" <owners-public_webgl@khronos.org on behalf of jgilbert@mozilla.com> wrote:


From all of the following SL specs:
* ESSL 3.0.4 p93
* GLSL 4.4.9 p160
* GLSL 4.5.5 p158

" Texture lookups on unsigned normalized integer and floating point
data return floating point values in the range [0, 1]."

"If a floating point sampler type is used, the result of a texture
lookup is a vec4, where each component is in the range [0, 1]."


The OES_texture_float extension doesn't seem to mention how it affects
the shading language, if at all. (perhaps this tacitly retains the
implicit range of [0,1] of unsigned normalized fixed-point)

Now clearly out-of-range (> 1.0) values often work in the real world
(the conformance tests even require this!), but I don't know which (if
any) extension actually guarantees this. It seems clear in the core
specs that the range is limited even for floating-point textures.

Should we:
* Make out-of-range sampling explicitly optional
* Require out-of-range sampling explicitly
* Attach out-of-range sampling to an extension and make its use opt-in
* Establish if this is an oversight in the GLSL/ESSL spec and get it fixed there

It would be good to get Mark's take on this, if there's context we're missing.

-Jeff

-----------------------------------------------------------
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
-----------------------------------------------------------



Regards

    -Mark


Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail