Commit f4d2bddd authored by Anton Baskanov's avatar Anton Baskanov Committed by Alexandre Julliard

wined3d: Fix the odd line condition in gen_yv12_read().

parent 3f845b34
...@@ -12621,8 +12621,10 @@ static void gen_yv12_read(struct wined3d_string_buffer *buffer, ...@@ -12621,8 +12621,10 @@ static void gen_yv12_read(struct wined3d_string_buffer *buffer,
* Don't forget to clamp the y values in into the range, otherwise we'll * Don't forget to clamp the y values in into the range, otherwise we'll
* get filtering bleeding. */ * get filtering bleeding. */
/* Read odd lines from the right side (add 0.5 to the x coordinate). */ /* Read odd lines from the right side (add 0.5 to the x coordinate). Keep
shader_addline(buffer, " if (fract(floor(texcoord.y * size.y) * 0.5 + 1.0 / 6.0) >= 0.5)\n"); * in mind that each line of the chroma plane corresponds to 2 lines of the
* resulting image. */
shader_addline(buffer, " if (fract(floor(texcoord.y * size.y) * 0.25 + 1.0 / 6.0) >= 0.5)\n");
shader_addline(buffer, " texcoord.x += 0.5;\n"); shader_addline(buffer, " texcoord.x += 0.5;\n");
/* Clamp, keep the half pixel origin in mind. */ /* Clamp, keep the half pixel origin in mind. */
......
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