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?

Unreal material graph don’t support matrixes, but there node which let you transform vector to different spaces which would be equivalent of mul(unity_ObjectToWorld, vector);. The name of node is “Transform” and in properties of note you select which space the input vector is and then what space vector should be outputted.

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

thank you Shadowriver!
I got a lot of help.