webgl-noise: Problems in Safari iOS on mediump
It seems like snoise(vec3)
and maybe others are only working using precision highp float;
on Safari in iOS. I spent a bit of time debugging some older shaders of mine that aren’t working anymore and this appeared to fix it.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 25 (14 by maintainers)
OK. The feature gap between WebGL 1 and 2 (GLSL ES 1.00 vs. GLSL ES 3.00) is a rather wide one, while the differences between GLSL ES 3.00 and the upcoming WGSL are mostly syntactic in nature. For the next few years I guess there will be a need to support two versions of GLSL as well as WGSL. Oh, well. It’s not as if “the Web” has ever been a well defined and easy platform to target.
To get a more clear picture of where we stand, I made a test page. When/if you have the time and opportunity, you could check this out:
https://stegu.github.io/psrdnoise/test/showprecision.html
There’s no hurry with this, absolutely no obligations, and in any case I don’t expect you to give me more than a general hunch, but thanks in advance for any help!
To me, the important information would be whether you see any important devices/platforms that report less than 16 bits for “mediump float”, and whether the “int” type has support even where WebGL 2 is reported as “not supported”, which would imply that the device is WebGL2 ready even though the browser is not.
It would be interesting to know also if any device supports 32-bit integers but not 32-bit floats. I suppose that’s not the case, but I’m just guessing. Actual field testing on real devices is infinitely more useful than guesswork and reading formal specs.