Unreal HLSL semantics

We have some HLSL shader code that uses the predefined shader semantics TEXCOORDX to map input streams. We now want to support Unreal as rendering back-end and see that they use ATTRIBUTEX semantics instead. Ideally, we would use the same shader code for both rendering back-ends. The question now is whether we can make Unreal conform and change the shader semantics Unreal uses. I could not find where Unreal defines these but maybe some of you have an idea? Any other pointers on how to resolve this without modifying the shader source would also be greatly appreciated.

Thanks in advance!

Hey @LETMEPLAYALREADY,
Unreal uses its own semantics that differs from the HLSL norms, but don’t worry, they’ve created a cross-compiler that will allow you also to use HLSL Shaders in your projects. I’ve found a link that might get you started on the implementation: HLSL Cross Compiler | Unreal Engine Documentation
I hope this helps!
-Zen

Thanks for the quick reply!
I am probably missing something but it looks like the cross-compiler can be used to convert HLSL to GLSL? What we would need is something like a HLSL to USF converter. We could of course write that ourselves but it feels like there should be an Unreal-way of doing it.

@LETMEPLAYALREADY,
I know that there is a “Shaders In Plugin”, but it seems like it is just a way to use USF:

But, I’ve done some digging for you, and have found another plugin if you’re interested:

I hope this can help! :vulcan_salute:
-Zen