Traditionally, in engines like Unity, we can write a shader, drop it into a material, and apply it to a mesh seamlessly. However, in Flax, the workflow for integrating custom coded shaders feels more cumbersome. From my understanding, it currently requires:
-
Using the Shader Graph and adding custom code via a node, which is only practical for very basic shaders.
-
Writing a script to manage the connection between a mesh and a shader, as demonstrated in the custom geometry drawing sample in the Flax documentation.
It would be incredibly useful to have a feature where .shader
files could be directly assigned to a material, similar to Unity’s approach.
At my company, we rely heavily on coded shaders for dynamic features like pulsing map markers or visually rich progress bars. Shader Graph quickly becomes unwieldy even for such basic tasks, where iteration speed and flexibility are key. More complex shaders—for path tracing, raymarching, and similar techniques—would be impractical to implement using node scripts. While binding shaders via scripts works, it introduces friction in the workflow.
A streamlined way to bind .shader
files directly to materials would be a welcome addition to Flax.
Note: I’m still getting familiar with Flax, so I apologize if this is already possible and I’ve simply missed it.