[x3d-public] which do you like best? How can I make thecomparison more equal?

Michalis Kamburelis michalis.kambi at gmail.com
Wed Oct 25 11:53:01 PDT 2017


2017-10-24 14:32 GMT+02:00 vmarchetti at kshell.com <vmarchetti at kshell.com>:
> I see the example page http://coderextreme.net/X3DJSONLD/src/main/html/flowers.xhtml works on Windows 10 in:
> Edge 38.14393
> Firefox 56.0.1
> Chrome 62.0
>
> The X3D scenes use ComposedShader node:
> <ComposedShader language="GLSL">...
>
> for those of us not up to speed on shaders, including myself, could you review whether you would expect this to work on MacOS, either with the new Metal graphics or in older OpenGL Mac systems?  My understanding is that Metal is a replacement for OpenGL implementation on MacOS and iOS; but I cannont find clear information on whether Metal is or is even intended to be fully backward compatible with OpenGL.
>

Metal is deliberately not backward-compatible with OpenGL. Metal is
supposed to be faster, but also lower-level, than OpenGL. It also has
it's own shading language, MLSL (Metal Shading Language), that is not
compatible with GLSL (even if it's greatly inspired by GLSL). See
specification on
https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf
, and a gentler introduction on
https://crimild.wordpress.com/2016/05/26/praise-the-metal-part-3-metal-shading-language/
.

One could write a desktop Mac OS X viewer for X3D using Metal for
rendering, and allowing to use <ComposedShader language="MLSL">.

But all this doesn't matter for X3DOM and anything else on top of
WebGL. WebGL calls OpenGL (OpenGLES on iOS), and OpenGL[ES] is still
supported on Mac OS X and iOS. Possibly OpenGL[ES] is implemented
using Metal underneath, but this fact *should* be invisible to us. So
GLSL shaders *should* work in X3D on Mac OS X. (And they do, at least
with my view3dscene -- I have not tested X3DOM lately on Mac.)

Regards,
Michalis



More information about the x3d-public mailing list