Commit 235908a7 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Fix the center offset in get_projection_matrix.

If we have clip control, viewport_miscpart_cc applies both the half pixel offset and the filling convention nudge. We always have integer pixel centers in this <= d3d9-only codepath. Signed-off-by: 's avatarStefan Dösinger <stefan@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent d2daa8b9
......@@ -5550,12 +5550,16 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
* driver, but small enough to prevent it from interfering with any
* anti-aliasing. */
/* Projection matrices are <= d3d9, which all have integer pixel centers. */
if (!(d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER))
ERR("Did not expect to enter this codepath without WINED3D_PIXEL_CENTER_INTEGER.\n");
clip_control = d3d_info->clip_control;
flip = !clip_control && context->render_offscreen;
if (!clip_control && d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER)
if (!clip_control)
center_offset = 63.0f / 64.0f;
else
center_offset = -1.0f / 64.0f;
center_offset = 0.0f;
if (context->last_was_rhw)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment