It seems that the numbers are rounded in VertexFactoryCommon shader.
The cube consists of vertices that are very far from the origin and are placed on the screen by placing them at coordinates that are almost inverse vectors to the origin.
In VertexFactoryCommon , LWCToFloat(TranslatedWorldPositionOrigin)
will be a large value. This causes rounding in ResolvedView.PreViewTransform due to the camera coordinates added in the previous line due to float mantissa precision issues.
This effect is more noticeable because the vertex coordinate values are almost inverse vectors of the actor's coordinate values and appear larger on the screen.


FLWCVector3 PreciseLWCPromote(float3 Value)
	float3 Tile = floor(Value/UE_LWC_RENDER_TILE_SIZE);
	float3 Offset = Value - Tile*UE_LWC_RENDER_TILE_SIZE;
	return MakeLWCVector3(Tile, Offset);

float4 TransformLocalToTranslatedWorld(float3 LocalPosition, FLWCMatrix LocalToWorld)
	// Multiply local position with LocalToWorld 3x3 first for high precision rotation and scale, then move the world position part to translated world before adding it  	
	// ...
	FLWCVector3 TranslatedWorldPositionOrigin = LWCAdd(LWCGetOrigin(LocalToWorld), ResolvedView.PreViewTranslation);
	// modifier start
	FLWCVector3 RSPositionLWC = PreciseLWCPromote(RotatedScaledPosition);
	return float4(LWCToFloat( LWCAdd(RSPositionLWC, TranslatedWorldPositionOrigin) ), 1.0f);
//	return float4(RotatedScaledPosition + LWCToFloat(TranslatedWorldPositionOrigin), 1.0f);
	// modifier end
Steps to Reproduce
  1. Open VR template project
  2. Import static mesh fbx file attached to UDN
  3. Place static mesh in VRTemplate map
  4. Set mesh location (X=-18475425.000000,Y=-2511033.000000,Z=-456.000000)
  5. Run PIE and look at static mesh

It appears to be a gibberish displacement that is occurring.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-191945 in the post.

Login to Vote

ComponentUE - Rendering Architecture
Affects Versions5.25.3
CreatedAug 3, 2023
UpdatedAug 17, 2023
View Jira Issue