I just using a SkinnedMeshRenderer and a computeShader and a bakeMesh() and creating a RenderTexture from this. But when I save the texture in exr format I get a striped picture. So how can yi save the vertices into a texture and use it in the Shadergraph?
Thanks
Some more Details
my compute shader
#pragma kernel RunThis
StructuredBuffer computeInVertexPositions; RWTexture2D computeOutTexture;
[numthreads(8, 8, 1)]
void RunThis (uint3 id : SV_DispatchThreadID)
{
if (id.x < computeInVertexPositions.Length)
{
float3 v = computeInVertexPositions[id.x];
computeOutTexture[id.xy] = float4(v, 1.0);
}
}
c# side
vertexToTexture2DComputeShader.SetBuffer(_kernelHandle, ComputeInVertexPositions, cb);
vertexToTexture2DComputeShader.SetTexture(_kernelHandle, ComputeOutTexture, _renderTextures[i]);
vertexToTexture2DComputeShader.Dispatch(_kernelHandle,
Mathf.CeilToInt(RenderTextureSize / (float)ThreadGroupX),
Mathf.CeilToInt(RenderTextureSize / (float)ThreadGroupY),
ThreadGroupZ);
my shaderGraph
the generated texture
Somebody please help!