mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
graphics: Stop comparing matrices in GLSL, which doesn't work on iPhone5s
This commit is contained in:
parent
bae27e19d7
commit
24bb5b5ca8
@ -58,15 +58,13 @@ varying highp vec2 vertex_out_tex_coord;
|
|||||||
void main(void) {
|
void main(void) {
|
||||||
lowp vec4 color = texture2D(texture, vertex_out_tex_coord);
|
lowp vec4 color = texture2D(texture, vertex_out_tex_coord);
|
||||||
|
|
||||||
if (color_matrix != mat4(1.0) || color_matrix_translation != vec4(0.0)) {
|
// Un-premultiply alpha
|
||||||
// Un-premultiply alpha
|
color.rgb /= color.a;
|
||||||
color.rgb /= color.a;
|
// Apply the color matrix
|
||||||
// Apply the color matrix
|
color = (color_matrix * color) + color_matrix_translation;
|
||||||
color = (color_matrix * color) + color_matrix_translation;
|
color = clamp(color, 0.0, 1.0);
|
||||||
color = clamp(color, 0.0, 1.0);
|
// Premultiply alpha
|
||||||
// Premultiply alpha
|
color.rgb *= color.a;
|
||||||
color.rgb *= color.a;
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_FragColor = color;
|
gl_FragColor = color;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user