https://github.com/iced-rs/iced/issues/674 Uses image/svg support in `iced_graphics`. The is not currently using an atlas, and uses one texture/draw per image. This should be good enough for now; supporting images with glow is better than not supporting them, and if something else performs better, that improvement can be made without any change to the public API.
22 lines
343 B
GLSL
22 lines
343 B
GLSL
#ifdef GL_ES
|
|
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
precision highp float;
|
|
#else
|
|
precision mediump float;
|
|
#endif
|
|
#endif
|
|
|
|
uniform sampler2D tex;
|
|
in vec2 tex_pos;
|
|
|
|
#ifdef HIGHER_THAN_300
|
|
out vec4 fragColor;
|
|
#define gl_FragColor fragColor
|
|
#endif
|
|
#ifdef GL_ES
|
|
#define texture texture2D
|
|
#endif
|
|
|
|
void main() {
|
|
gl_FragColor = texture(tex, tex_pos);
|
|
}
|