Shader discard doesn't seem to work well on mobile, remove it

* Instead we write transparent black when out of bounds. This only works
  when we're blending, but the cases that we don't blend are when we do
  a blit to a precisely sized output target with no offset, so it
  shouldn't cause a problem.
This commit is contained in:
baldurk
2018-01-02 15:13:07 +00:00
parent 0ea854a9da
commit 65724841b6
+6 -2
View File
@@ -92,14 +92,18 @@ void main(void)
{
// by convention display 1D textures as 100 high
if(scr2.x < 0.0f || scr2.x > 1.0f || scr2.y < 0.0f || scr2.y > 100.0f)
discard;
{
color_out = vec4(0, 0, 0, 0);
return;
}
}
else
{
if(scr2.x < 0.0f || scr2.y < 0.0f ||
scr2.x > 1.0f || scr2.y > 1.0f)
{
discard;
color_out = vec4(0, 0, 0, 0);
return;
}
}