How to set what shader is used during rendering of a vertex factory

Hello,

I want to create a new vertex factory for a special kind of mesh that uses it’s own shaders.

Basically I have few passes to render that mesh, compute shader pass for simulation than first rendering pass of vertex shader and pixel shader to generate data for the for the second pass where it uses the data from the first pass to produce the final result that can be added to the gbuffer.

How can I set the shaders of this mesh so the render will bind the right shaders for each stage?