[X3D-Ecosystem] Question for X3D Browser Developers
Bergstrom, Aaron
aaron.bergstrom at und.edu
Thu Feb 26 07:58:08 PST 2026
X3D Browser Devs,
So all... please correct me if you think I've over simplified what I've written below.
Based on my conversation with Michalis, the existing X3D browsers (FreeWRL, X3DOM, X_ITE, and CGE) all have different shader naming conventions for their GLSL uniform, in, and out variables.
Any particular browser's naming convention may, or may not, match the list of MaterialX shader variable naming conventions found at the url below:
https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/documents/DeveloperGuide/ShaderGeneration.md
However, based on my reading, it seems to me that I can inject the proper naming conventions into the *.frag and *.vert files as a '#define' alias before writing the files to disk.
Then I could add your browser's aliases to the field names of the exported X3D shader node.
An injected alias would look something like this (just a random example of a GLSL shader alias):
#define vd_tangentWorld vd.tangentWorld
#define vd_normalWorld vd.normalWorld
I would ask that each browser vendor provide me with a list of the naming conventions for their browser shader's naming conventions that match up with the MaterialX naming conventions found at the link above.
If I have that list, I can just add those alias' to the GLSL file before writing it to disk, and write out a version of the X3D shader that matches your browser's naming conventions.
I just need the alias list for your browser and we should be good to go for supporting MaterialX shader export from Maya.
Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20260226/75b30dd1/attachment.html>
More information about the X3D-Ecosystem
mailing list