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

[Public WebGL] Signed Int to Float Convertion Problem


While working on a project we've stabled upon what looks like an inconsistency between the spec and implementations. We use normalized integers as vertex attributes and our math rely on conversion rules described in GLES 2 spec (section 2.1.2). However, we were experiencing problems with it. Further investigation showed, that in GLES 3 and GL 4.2+ conversion rules were changed (https://www.khronos.org/opengl/wiki/Normalized_Integer#Signed). I've coded a repro case: http://output.jsbin.com/wezetob/1. The canvas'll be red if GLES 3 conversions are used by an implementation and green if GLES 2 ones. Testing different devices I was able to find some that produces green (on attached photo).

We're working on fixing the math we use since it seems we can't rely on any particular rule.

Should that be noted in the differences section of the spec? Has someone else run into similar problems?

Kirill Dmitrenko
Yandex Maps Team

Attachment: IMG_0545.JPG
Description: JPEG image