in this example Tex is a color, but Colors are suppose to be RGBA but it has an ID parameter!!!
If i’m writing my own HLSL on my own, how am i suppose to know that color has ID or the parameters types have in general??
where does epic expect people to find such info??
I believe there should be some api or reference that i can’t find, so can anyone point me to the startup guide for Epic’s HLSL code that explain the basics of UE HLSL API and the type definitions.
I’m using microsoft visual studio and I dont get recommendation in my USF file
I’m looked at the source code but it’s pain to find the info i’m looking for, the information is scattered everywhere, a little in the FMaterialCompiler header, but it doesnt have all the functions, and I still need to know how to know the definition of types in the usf file
Yeah, unfortunately Unreal has no HLSL api that I know of. As you’ve discovered, information is scarce and scattered.
Luckily, I’ve managed to track down where all of the engine-provided HLSL functions are stored.
They are in your engine’s \Engine\Shaders\Private folder. You can control-F here to search for particular functions, and the Common.ush file contains a large amount of basic functions (this is most likely where you’ll have luck finding what you’re looking for).
As far as where to pick up additional Unreal HLSL information, I’ve found the most luck through watching talks given by Epic-employed tech artists. This video in particular is a great resource, as it goes into a lot of lesser-known features of the material graph and goes over how to use Custom functions within Custom expressions (though if I recall this information is out of date and might require some googling to get it working).
Best of luck in your learning! Let me know if you have any other questions.