Commit 72e373d2 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get the framebuffer height from the view in shader_glsl_load_constants().

parent 16afe47b
...@@ -1430,16 +1430,16 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context ...@@ -1430,16 +1430,16 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
if (update_mask & WINED3D_SHADER_CONST_PS_Y_CORR) if (update_mask & WINED3D_SHADER_CONST_PS_Y_CORR)
{ {
float correction_params[] = const struct wined3d_vec4 correction_params =
{ {
/* position is window relative, not viewport relative */ /* Position is relative to the framebuffer, not the viewport. */
context->render_offscreen ? 0.0f : (float)context->current_rt->resource.height, context->render_offscreen ? 0.0f : (float)state->fb->render_targets[0]->height,
context->render_offscreen ? 1.0f : -1.0f, context->render_offscreen ? 1.0f : -1.0f,
0.0f, 0.0f,
0.0f, 0.0f,
}; };
GL_EXTCALL(glUniform4fv(prog->ps.ycorrection_location, 1, correction_params)); GL_EXTCALL(glUniform4fv(prog->ps.ycorrection_location, 1, &correction_params.x));
} }
if (update_mask & WINED3D_SHADER_CONST_PS_NP2_FIXUP) if (update_mask & WINED3D_SHADER_CONST_PS_NP2_FIXUP)
......
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