Navigation
API > API/Plugins > API/Plugins/HairStrandsCore
Description
Reset the interpolation data. This needs to be called prior to ComputeHairStrandsInterpolation and prior to the actual hair simulation in order to insure that: 1) when hair simulation is enabled, the first frame is correct 2) when hair simulation is enabled/disabled (i.e., toggle/change) we reset to deform buffer to rest state)
| Name | AddDeformSimHairStrandsPass |
| Type | function |
| Header File | /Engine/Plugins/Runtime/HairStrands/Source/HairStrandsCore/Public/HairStrandsInterpolation.h |
| Include Path | #include "HairStrandsInterpolation.h" |
| Source | /Engine/Plugins/Runtime/HairStrands/Source/HairStrandsCore/Private/HairStrandsInterpolation.cpp |
void AddDeformSimHairStrandsPass
(
FRDGBuilder & GraphBuilder,
FGlobalShaderMap * ShaderMap,
const uint32 InstanceRegisteredIndex,
const uint32 MeshLODIndex,
const uint32 VertexCount,
FHairStrandsRestRootResource * SimRestRootResources,
FHairStrandsDeformedRootResource * SimDeformedRootResources,
FRDGBufferSRVRef SimRestPosePositionBuffer,
FRDGBufferSRVRef SimPointToCurveBuffer,
FRDGImportedBuffer & OutSimDeformedPositionBuffer,
const FVector & SimRestOffset,
FRDGBufferSRVRef SimDeformedOffsetBuffer,
const bool bHasGlobalInterpolation,
FRHIShaderResourceView * BoneBufferSRV
)