← Back to team overview

touch-packages team mailing list archive

[Bug 1350674] Re: GLRenderer: The default fragment shader is sub-optimal for alpha=1.0

 

** Branch linked: lp:ubuntu/vivid-proposed/mir

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mir in Ubuntu.
https://bugs.launchpad.net/bugs/1350674

Title:
  GLRenderer: The default fragment shader is sub-optimal for alpha=1.0

Status in Mir:
  Fix Committed
Status in mir package in Ubuntu:
  New

Bug description:
  GLRenderer: The default fragment shader is sub-optimal for alpha=1.0.
  It needlessly multiplies all four colour components on every
  fragment...

  const GLchar* fragment_shader_src =
  {
      "precision mediump float;\n"
      "uniform sampler2D tex;\n"
      "uniform float alpha;\n"
      "varying vec2 v_texcoord;\n"
      "void main() {\n"
      "   vec4 frag = texture2D(tex, v_texcoord);\n"
      "   gl_FragColor = alpha*frag;\n"
      "}\n"
  };

  If alpha is 1.0 (as it usually is) then we should take a more
  efficient shader than that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1350674/+subscriptions