WebGL : small literals in glsl are set to zero depending on representation

Fixed Issue #226553


May 19, 2014
This issue is public.
Reported by 0 people

Sign in to watch or report this issue.

Steps to reproduce


Repro Steps:

Test page is at :

Inspect source to observe that when you press a button, you select a constant initialised with a different representation of 1.0E-9.
If the value is exactly zero, the viewport is red otherwise it turns green.

Test shows a green viewport for all selections on the following browsers :

Expected Results:

Small literals should only be (properly) rounded if they do not fit in the range of representable floating point numbers.
Most videocards have proper IEEE 32 bit floating point support now and can handle values in the range ~ +/- 1.0 E +/- 37.

Remark :
I am trying to implement a physics engine in WebGL using floating point textures for storage of state and doing the physics computations in glsl.
Small numbers just pop up in the computations and need to be represented correctly.

Actual Results:


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Rico M.”

      Changed Assigned To from “Rico M.” to “Daniel L.”

      Changed Status to “Confirmed”

      Changed Assigned To from “Daniel L.” to “IE F.”

      Changed Status from “Confirmed” to “Fixed”

    You need to sign in to your Microsoft account to add a comment.

    Sign in