Files
UnrealEngineUWP/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Private/GeometryCollection/GeometryCollectionSceneProxy.ispc
andrew davidson 08570f0250 LWC: Enable ISPC for LWC double types. Submitted on behalf of jeff.rous[at]intel.com
#rb andy.davidson
#jira UE-107988
#preflight 61eec2feaa3f15faa57a5702

#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18708912 in //UE5/Release-5.0/... via CL 18708982 via CL 18709226
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18709243 by andrew davidson in ue5-main branch]
2022-01-24 10:54:27 -05:00

34 lines
963 B
Plaintext

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Math/Vector.isph"
#include "Math/Matrix.isph"
export void SetDynamicData_RenderThread(uniform FVector3f PositionBuffer[],
const uniform unsigned int NumVertices,
const uniform unsigned int Stride,
const uniform int32 BoneMap[],
const uniform FMatrix44f Transforms[],
const uniform FVector3f Vertices[])
{
uniform unsigned int Chunk = 0;
foreach(i = 0 ... NumVertices)
{
uniform float * uniform pVertices = (uniform float * uniform)&Vertices[Chunk];
uniform float * uniform pPosition = (uniform float * uniform)&PositionBuffer[Chunk];
FVector3f P;
aos_to_soa3(pVertices, &P.V[0], &P.V[1], &P.V[2]);
FVector3f Out;
const int32 Bone = BoneMap[i];
foreach_unique(Index in Bone)
{
Out = MatrixTransformPosition(P, Transforms[Index]);
}
soa_to_aos3(Out.V[0], Out.V[1], Out.V[2], pPosition);
Chunk += programCount;
}
}