I have some shaders,but they were written in Cg/HLSL.
It is difficult to transform some of them into UE4 material.
Ok, first of all you need to understand that the material is a shader, the graph you making there is just used to generate HLSL code. Each block is a function which is called in the way you set it up the graph.
Theres custom node
Which let you add custom HLSL code, but there few limitations:
- -The node it self is a function what you place in that node is placed
inside of function, which you can’t
place functions inside that node as
you can’t place functions inside
functions. You will need to use few
customs and link them right, but i
will only let you emulate non-looped
functions calls - -The code is placed as it is so it there might be portability issues
In UDK i was able to hack code generation, as you can call any generated function from custom, which let you call custom node functions, but i not sure if this will work on UE4 (it does not have code preview like UE3) and besides it very hackish.
Other then that, you may what to explore engine source code, but im not sure where to begin to add your on shaders from that level, i didn’t explored that yet:
https://github.com/EpicGames/UnrealEngine/tree/4.3/Engine/Shaders
Maybe in future where marketplace will be open somebody will do plugin giving you more shader freedom in editor
Thank you for your reply.I have solved this problem now due to your help.