egui/egui_glium/src/shader/vertex_100es.glsl
Emil Ernerfeldt 5dd68337c4 Use Rgba (4xf32) instead of Color32 in all interfaces
This simplifies a few things, but some benchmarks gets worse,
probably due to the increased memory use (and thus more cache misses).

I don't plan to merge this, but leave it here as an experiment
2021-08-15 20:15:14 +02:00

20 lines
435 B
GLSL

#version 100
precision mediump float;
uniform vec2 u_screen_size;
attribute vec2 a_pos;
attribute vec2 a_tc;
attribute vec4 a_rgba; // 0-1
varying vec4 v_rgba; // 0-1
varying vec2 v_tc;
void main() {
gl_Position = vec4(
2.0 * a_pos.x / u_screen_size.x - 1.0,
1.0 - 2.0 * a_pos.y / u_screen_size.y,
0.0,
1.0);
v_rgba = a_srgba;
v_tc = a_tc;
}