haven`t shader macros like Unity in Unreal?
Unity have shader macro like unity_ObjectToWorld.
Not in Unreal?
unity_ObjectToWorld is Scale, Rotation, Translation(Position) float4x4 Matrix
Do I need to always calculate the position, rotation, and size of an object in Unreal?
asked Jun 12 '19 at 09:51 PM in Rendering
Unreal material graph don't support matrixes, but there node which let you transform vector to different spaces which would be equivalent of
But you don't need to do this, as UE4 sends position and orientation to shader via parameters:
As you can see from that page there even more in disposal
There also "Object Scale" node which calculates scale
Also to me more exact "unity_ObjectToWorld" is not macro, it's a parameter send by Unity to shader and it a local to world conversion matrix, which is identical to actual model transform matrix which Unity send too as UNITY_MATRIX_M
Follow this question
Once you sign in you will be able to subscribe for any updates here