So I went through and took a look at GpuSkinVertexFactory.usf.
Here are the changes I’ve made.
In FVertexFactoryIntermediates (line 179 unmodified), I added the PreSkinPosition as a float 3, after the UnpackedPosition parameter.
In CalcWorldPosition, line 494, I added this line:
Intermediates.PreSkinnedPosition = Intermediates.UnpackedPosition;
Then in VertexFactoryGetInterpolantsVSToPS (line 555 unmodified), I added this:
if NUM_MATERIAL_TEXCOORDS > 2
TexCoords.x = Intermediates.PreSkinnedPosition.x;
TexCoords.y = Intermediates.PreSkinnedPosition.y;
TexCoords.x = Intermediates.PreSkinnedPosition.z;
From what I understand of how this works, this should end up passing the pre-skin vertex positions through the Customized UVs 1 and 2.
The main downside to this from what I can tell is that if some materials use UVs 1 and 2 and are skinned, it will cause it to screw up the UVs.
Derp, I just realized I implemented this in a hackier way than it really needs to be. The way you mention seems to be a lot better than what I did above.
Using your method, I’d want to add PreSkinPosition to FMaterialVertexParamaters, reference that from the material via the custom node as you mention, then plug that into CusotmizedUVs 1 and 2, then us the UV coord node to utilize the results.
I think I have that right, at least.