I have been reading the shader documentation. See for example the following snippet about the cross compiler:
“Cross compiler
The HLSL Cross Compiler is used to automatically convert HLSL into GLSL for OpenGL platforms, allowing shaders to be authored only once for all platforms. It is run during offline shader compilation and performs various optimizations to the code that OpenGL drivers are frequently missing.”
So my understanding is that for OpenGL platforms, we can sill use the HLSL shader code because the cross compiler will automatically take care of the conversion process.
-
My question is about Windows platforms supporting DirectX. In this case Will UE4 use the HLSL code and call the DirectX API directly without any intermediate cross compiling?
-
I have a few vertex shaders written in HLSL language for the Windows/ Directx 11 combo. Can I call them straightaway in UE4? I notice that the UE4 shader files have an extension of usf!