Well, a lot of stuff happens between the Vertex and Pixel shaders, but before we get into that, I'm worried that you may be a bit confused about what the Vertex and Pixel shaders do. So let's quickly go through the entire Direct3D 9 programmable pipeline again. This nice chart shows the entire pipeline, and you should print it out for reference.
(feel free to imagine I'm saying this with the voice of the "how it's made" videos)
It all begins at your program. There are several ways you can start drawing stuff on the screen. But regardless of whether you're using Indexed Primitives, Regular Primitives, Rect/Tri Patches (which are automatically tesselated for you) or directly with DrawPrimitiveUp, you will be feeding the pipeline with a lot of vertices.
Each vertex simply defines a point in space, maybe with some custom information for texture coordinates, or normals, or whatever you want to send with your vertices. But remember that they're just vertices. Triangles and Pixels don't even exist at this stage.
Then, a program called the Vertex Shader is applied to each one of these vertices indiscriminately. The main job of the Vertex Shader is to transform each vertex and convert it to viewport coordinates. Nothing is yet drawn at this stage (the white lines you see are put in there by the debugger for your debugging pleasure, but don't exist in the GPU at all).
Afterwards, all vertices go through Primitive Assembly, which takes vertices in groups of three, and makes triangles out of them.
If you're using DirectX 10 or above, triangles (or whatever your primitive topology is) can get sent to another program called the Geometry Shader, where you can create more triangles from the current ones if you wish. This is mostly used for tesselation and for particle systems.
Each triangle then goes through Face Culling if it's enabled. In Face Culling, triangles not facing the camera are discarded. Generally, half of all triangles are expected to be discarded in this stage.
Even more triangles are discarded in the Plane Clipping stage. Triangles too close or too far from the camera are discarded.
If this were too little, one additional round of triangle discarding goes on at the Frustum Clipping stage, which discards triangles that are outside of the viewport, and therefore not visible.
The next step consists of performing a Homogenous Divide (or "Division by w") to normalize the position of all triangles in the viewport.
Finally, all the triangle coordinates are transformed to those of the viewport (actual pixels) in the Viewport Mapping stage.
Next comes the Rasterization and Component Interpolation stage. Each triangle is disassembled into the fragments that make it up (one fragment for each pixel in the screen). For each fragment, all the components you passed into the original vertices, such as texture coordinates, normals, or your custom data, are interpolated throughout the entire triangle, and assigned to each fragment.
Each fragment is then passed to a program called the Pixel Shader, whose function is to make a pixel out of each fragment. You're supposed to use the interpolated texture coordinates, normals or whatever custom data you originally passed, to figure out what the color of each pixel is. In simpler terms, this is where "drawing happens".
Afterwards, pixels outside of a region you define called the Scissor Rect are discarded by the Scissor Test, if you enabled it.
Then each pixel goes through the Alpha Test, if you have enabled it. Pixels that fail the Alpha Test are discarded.
If there are triangles that overlap in the viewport, there will be more than one pixels meant to be drawn for each actual pixel in the screen. If you enable the Depth Test, you can make sure pixels belonging to triangles behind those that have already been rendered are discarded (no point in drawing what won't be seen)
The Stencil Test, if enabled, is similar to the Depth Test, and is used for effects such as volume textures.
Finally, Alpha Blending, if enabled, blends pixels in the same location with a function and parameters you can define.
The pixels can then be sent to the Dithering stage, if enabled (I've never enabled it myself). Afterwards, a Channel Mask can be applied, and everything gets sent to the Render Target.
At this point, the scene is considered to be rendered. No further per-pixel operations are performed. If the render target is the actual screen, the image can then be sent to the display.
Now, onto your specific problem, I'm not sure exactly where in the pipeline is each of the debugger views probing, but my guess is that you're using the w
coordinate incorrectly, because after the Vertex Shader, the only thing that can change the location of your vertices is the homogeneous divide.
In general, your vertices should be sent without a w coordinate. Make sure you use the right world and view matrices, and if after multiplying each vertex by your world and view matrices (you can do this by hand for debugging), your X and Y coordinates fall between -1 and 1, and your Z coordinate falls between your near and far clipping planes, your vertices will appear on the screen.