Gems/AtomTressFX/External/Code/src/TressFX/TressFXSimulation.cpp
void TressFXSimulation::UpdateHairSkinning(EI_CommandContext& commandContext, std::vector<TressFXHairObject*>& hairObjects)
{
    // Adi: binding the m_SimCB buffers (matrices, wind parameters..) to the GPU 
    for (int i = 0; i < hairObjects.size(); ++i)
    {
        hairObjects[i]->UpdateConstantBuffer(commandContext);
    }

    // Adi: only skin hair vertices without any physics. 
    DispatchComputeShader(commandContext, mSkinHairVerticesTestPSO.get(), DISPATCHLEVEL_VERTEX, hairObjects);
    GetDevice()->GetTimeStamp("SkinHairVerticesTestPSO");
    

    // UpdateFollowHairVertices - This part is embedded in the single pass shader
//    DispatchComputeShader(commandContext, mUpdateFollowHairVerticesPSO.get(), DISPATCHLEVEL_VERTEX, hairObjects);
//    GetDevice()->GetTimeStamp("UpdateFollowHairVertices");

    // Adi: make sure the dual buffers are updated properly - advance the current frame 
    for (int i = 0; i < hairObjects.size(); ++i)
    {
        hairObjects[i]->IncreaseSimulationFrame();
    }
}
// Adi: this method handles the skinning of the hair and update the follow hair.
// It avoid any physics and simulation response and should be used for initial integration testing
this method handles the skinning of the hair and update the follow hair.
It avoid any physics and simulation response and should be used for initial integration testing
this method handles the skinning of the hair and update the follow hair . It avoid any physics and simulation response and should be used for initial integration testing
void TressFXSimulation::UpdateHairSkinning(EI_CommandContext& commandContext, std::vector<TressFXHairObject*>& hairObjects)
{
    for (int i = 0; i < hairObjects.size(); ++i)
    {
        hairObjects[i]->UpdateConstantBuffer(commandContext);
    }
    DispatchComputeShader(commandContext, mSkinHairVerticesTestPSO.get(), DISPATCHLEVEL_VERTEX, hairObjects);
    GetDevice()->GetTimeStamp("SkinHairVerticesTestPSO");
    for (int i = 0; i < hairObjects.size(); ++i)
    {
        hairObjects[i]->IncreaseSimulationFrame();
    }
}
void TressFXSimulation :: UpdateHairSkinning ( EI_CommandContext & commandContext , std :: vector < TressFXHairObject * > & hairObjects ) { for ( int i = 0 ; i < hairObjects . size ( ) ; ++ i ) { hairObjects [ i ] -> UpdateConstantBuffer ( commandContext ) ; } DispatchComputeShader ( commandContext , mSkinHairVerticesTestPSO . get ( ) , DISPATCHLEVEL_VERTEX , hairObjects ) ; GetDevice ( ) -> GetTimeStamp ( " " ) ; for ( int i = 0 ; i < hairObjects . size ( ) ; ++ i ) { hairObjects [ i ] -> IncreaseSimulationFrame ( ) ; } }
Adi: this method handles the skinning of the hair and update the follow hair.
Adi : this method handles the skinning of the hair and update the follow hair .
// Adi: binding the m_SimCB buffers (matrices, wind parameters..) to the GPU  // Adi: only skin hair vertices without any physics.  // UpdateFollowHairVertices - This part is embedded in the single pass shader //    DispatchComputeShader(commandContext, mUpdateFollowHairVerticesPSO.get(), DISPATCHLEVEL_VERTEX, hairObjects); //    GetDevice()->GetTimeStamp("UpdateFollowHairVertices"); // Adi: make sure the dual buffers are updated properly - advance the current frame 