← All ideas

WGSL export for materials

This is my last post this year - I know I've had a lot recently, so don't worry. It isn't a trend.

We need WGSL, GLSL, or HLSL export for shaders. I know that I'm able to use other node editors to make materials and export there, like unity, godot, etc, but they aren't exactly blender either as far as the node editing.

It really doesn't matter which one (WGSL, GLSL, HLSL) as it's easy to convert between them with tooling, but any would be a delight, though I know it likely a decent amount of work too.

It's a piece of the pie for web, cause nobody wants to hand code shaders - well some, but you know, it's not that easy even with nodes for complex shaders.

Alternatively, MaterialX integration which there is tooling to convert to coded shaders. I know you likely have a lot more knowledge about MaterialX than me, but I did find this piece regarding OSL and MaterialX - how they relate, integration. Starting at @42:21 into the video.

youtube.com/watch

One interesting bit was that it can generate OSL (for blender) and there's toolling to export materialx node graphs to coded shaders.

One last option would just to be export a node graph (json or similar) of corresponding nodes in another editor like godot, material maker, unity, bablyonjs node editor ( nme.babylonjs.com/ ) in a json file or whatever is used by the targeted environment, and then from the target environment, load the nodes, and generate the coded shader.

0%

Development Status: Open

Upvote 0 Downvote 0
JeffG
15 Jul 2022

0 Comments