Stefan Dösinger (@stefan) commented about dlls/ddraw/tests/ddraw1.c:
- /* Pick a pixel where no quads are present */
- pick_rect.x1 = pick_rect.x2 = 480;
- pick_rect.y1 = pick_rect.y2 = 360;
- get_pickrecords(device, execute_buffer, viewport, &pick_rect, 0, NULL);
- /* Pick a pixel where one quad is present */
- pick_rect.x1 = pick_rect.x2 = 120;
- pick_rect.y1 = pick_rect.y2 = 120;
- record_count = get_pickrecords(device, execute_buffer, viewport, &pick_rect, 1, &record[0]);
- if (record_count == 1)
check_pickrecord(&record[0], D3DOP_TRIANGLE, quad_offset + 12, 0.25f);
- /* Pick a pixel where quad is clipped */
- pick_rect.x1 = pick_rect.x2 = 40;
- pick_rect.y1 = pick_rect.y2 = 120;
- get_pickrecords(device, execute_buffer, viewport, &pick_rect, 0, NULL);
What does clipped mean here? Outside of the 0.0;1.0 depth range?
In the TLVERTEX case you get depth values -0.5, 6.5 and -3.0, suggesting that the near and far clip planes don't matter. If I understand this test here right they do matter for LVERTEX. That is consistent with later d3d versions where Z clipping is essentially disabled when drawing pretransformed geometry with the right settings.
Another way to look at this is that Z clipping is done by D3DPROCESSVERTICES_TRANSFORM not the draw op (D3DOP_TRIANGLE).