ClipSpace missing, Shader parameter changes from UE4 to 5

It’s probably to do with the changes for Large World Coordinates - Large World Coordinates Rendering in Unreal Engine 5. | Unreal Engine 5.0 Documentation

With which World to clip space wouldn’t be a float matrix. However you transform your world position to a translated world one then you can use the View.TranslatedWorldToClip. Something like:

float4 ScreenPos	= mul(float4(WorldPos.xyz + LWCHackToFloat(PrimaryView.PreViewTranslation), 1),	PrimaryView.TranslatedWorldToClip);

Or if your vertex position is an LWC type you can do something like:

float3 TranslatedWorldPos = LWCToFloat(LWCAdd(WorldPos, PrimaryView.PreViewTranslation)));
float4 ScreenPos	= mul(float4(TranslatedWorldPos, 1),	PrimaryView.TranslatedWorldToClip);

I’m not sure there’s much up to date documentation on all of it, but happy to be proved wrong.

1 Like