Download

How to get mesh data(PosL/Normal/Tangent and index) from the Codes?

I had finished blend something into scene color texture like this:




      	FPostOpaqueRenderDelegate PostOpaqueRender;
	PostOpaqueRender.BindLambda(
		[this](FPostOpaqueRenderParameters& p)
	{
		this->ExecutePixelShaderInternal();//Render Code,just some C++ and HLSL
	}
	);
	GetRendererModule().RegisterPostOpaqueRenderDelegate(PostOpaqueRender);
 
....

     ExecutePixelShaderInternal()
    {
         SetRenderTarget(RHICmdList, FSceneRenderTargets::Get(RHICmdList).GetSceneColorTexture(), FTexture2DRHIRef());
    }



I found that void FSkeletalMeshSceneProxy::GetDynamicElementsSection collect and render the meshcomponents.
just like this:



			if ( ensureMsgf(Mesh.MaterialRenderProxy, TEXT("GetDynamicElementsSection with invalid MaterialRenderProxy. Owner:%s LODIndex:%d UseMaterialIndex:%d"), *GetOwnerName().ToString(), LODIndex, SectionElementInfo.UseMaterialIndex) &&
				 ensureMsgf(Mesh.MaterialRenderProxy->GetMaterial(FeatureLevel), TEXT("GetDynamicElementsSection with invalid FMaterial. Owner:%s LODIndex:%d UseMaterialIndex:%d"), *GetOwnerName().ToString(), LODIndex, SectionElementInfo.UseMaterialIndex) )
			{
				Collector.AddMesh(ViewIndex, Mesh);
			}

			const int32 NumVertices = Chunk.NumRigidVertices + Chunk.NumSoftVertices;
			INC_DWORD_STAT_BY(STAT_GPUSkinVertices,(uint32)(bIsCPUSkinned ? 0 : NumVertices));
			INC_DWORD_STAT_BY(STAT_SkelMeshTriangles,Mesh.GetNumPrimitives());
			INC_DWORD_STAT(STAT_SkelMeshDrawCalls);


As you see, I’d been stopped here.I can’t get the vertex data for doing something like C++ with HLSL.
Do someone know how to get mesh data for another rendering pipeline?

Codes guide comes from Temaran and “女施主,使不得呀”

why only me?