Quick answer: The aux mesh on additionalVertexStreams must have identical vertex count to the source mesh. Set only the channels you intend to override. Shader reads them via the same TEXCOORDn semantic.
You bake per-instance wind weights into a UV2 stream and assign via additionalVertexStreams. Shader reads zero — aux mesh has 100 verts, source has 200.
The Symptom
additionalVertexStreams assignment silently fails. Shader reads default (zero) values. No error in console.
The Fix
var aux = new Mesh();
aux.SetVertices(sourceMesh.vertices); // must match count + order
aux.uv2 = customWeights; // length = sourceMesh.vertexCount
renderer.additionalVertexStreams = aux;
Vertex count and order must match. Set only the channels (uv2, colors, etc.) you want to override; others stay at the source values.
Shader Declaration
// Input semantic in vertex stage
struct Attributes
{
float4 positionOS : POSITION;
float2 uv2 : TEXCOORD1; // reads aux.uv2
};
Verifying
Pick a known vertex. Read its uv2 in the shader and visualize. Should match what you wrote into the aux mesh. If zero, vertex count or channel mismatch.
“Match vertex count. Right channel. Shader reads.”
Related Issues
For mesh deformer job, see deformer. For CombineMeshes, see CombineMeshes.
Vertex count match. Channel set. Shader sees.