mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-16 04:18:11 +00:00
[client] use cmake to generate renderers/fonts/clipboards headers/code
This is in preperation of cmake options to enable/disable various functionallity.
This commit is contained in:
11
client/renderers/EGL/shader/alert.frag
Normal file
11
client/renderers/EGL/shader/alert.frag
Normal file
@@ -0,0 +1,11 @@
|
||||
#version 300 es
|
||||
|
||||
in highp vec2 uv;
|
||||
out highp vec4 color;
|
||||
|
||||
uniform sampler2D sampler1;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = texture(sampler1, uv);
|
||||
}
|
21
client/renderers/EGL/shader/alert.vert
Normal file
21
client/renderers/EGL/shader/alert.vert
Normal file
@@ -0,0 +1,21 @@
|
||||
#version 300 es
|
||||
|
||||
layout(location = 0) in vec3 vertexPosition_modelspace;
|
||||
layout(location = 1) in vec2 vertexUV;
|
||||
|
||||
uniform vec2 screen;
|
||||
uniform vec2 size;
|
||||
uniform vec4 color;
|
||||
|
||||
out highp vec2 uv;
|
||||
out highp vec4 c;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position.xyz = vertexPosition_modelspace;
|
||||
gl_Position.w = 1.0;
|
||||
gl_Position.xy *= screen.xy * size.xy;
|
||||
|
||||
uv = vertexUV;
|
||||
c = color;
|
||||
}
|
9
client/renderers/EGL/shader/alert_bg.frag
Normal file
9
client/renderers/EGL/shader/alert_bg.frag
Normal file
@@ -0,0 +1,9 @@
|
||||
#version 300 es
|
||||
|
||||
in highp vec4 c;
|
||||
out highp vec4 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = c;
|
||||
}
|
25
client/renderers/EGL/shader/cursor.vert
Normal file
25
client/renderers/EGL/shader/cursor.vert
Normal file
@@ -0,0 +1,25 @@
|
||||
#version 300 es
|
||||
|
||||
layout(location = 0) in vec3 vertexPosition_modelspace;
|
||||
layout(location = 1) in vec2 vertexUV;
|
||||
|
||||
uniform vec4 mouse;
|
||||
|
||||
out highp vec2 uv;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position.xyz = vertexPosition_modelspace;
|
||||
gl_Position.w = 1.0;
|
||||
|
||||
gl_Position.x += 1.0f;
|
||||
gl_Position.y -= 1.0f;
|
||||
|
||||
gl_Position.x *= mouse.z;
|
||||
gl_Position.y *= mouse.w;
|
||||
|
||||
gl_Position.x += mouse.x;
|
||||
gl_Position.y -= mouse.y;
|
||||
|
||||
uv = vertexUV;
|
||||
}
|
14
client/renderers/EGL/shader/cursor_mono.frag
Normal file
14
client/renderers/EGL/shader/cursor_mono.frag
Normal file
@@ -0,0 +1,14 @@
|
||||
#version 300 es
|
||||
|
||||
in highp vec2 uv;
|
||||
out highp vec4 color;
|
||||
|
||||
uniform sampler2D sampler1;
|
||||
|
||||
void main()
|
||||
{
|
||||
highp vec4 tmp = texture(sampler1, uv);
|
||||
if (tmp.rgb == vec3(0.0, 0.0, 0.0))
|
||||
discard;
|
||||
color = tmp;
|
||||
}
|
11
client/renderers/EGL/shader/cursor_rgb.frag
Normal file
11
client/renderers/EGL/shader/cursor_rgb.frag
Normal file
@@ -0,0 +1,11 @@
|
||||
#version 300 es
|
||||
|
||||
in highp vec2 uv;
|
||||
out highp vec4 color;
|
||||
|
||||
uniform sampler2D sampler1;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = texture(sampler1, uv);
|
||||
}
|
20
client/renderers/EGL/shader/desktop.vert
Normal file
20
client/renderers/EGL/shader/desktop.vert
Normal file
@@ -0,0 +1,20 @@
|
||||
#version 300 es
|
||||
|
||||
layout(location = 0) in vec3 vertexPosition_modelspace;
|
||||
layout(location = 1) in vec2 vertexUV;
|
||||
|
||||
uniform vec4 position;
|
||||
|
||||
out highp vec2 uv;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position.xyz = vertexPosition_modelspace;
|
||||
gl_Position.w = 1.0;
|
||||
gl_Position.x -= position.x;
|
||||
gl_Position.y -= position.y;
|
||||
gl_Position.x *= position.z;
|
||||
gl_Position.y *= position.w;
|
||||
|
||||
uv = vertexUV;
|
||||
}
|
11
client/renderers/EGL/shader/desktop_rgb.frag
Normal file
11
client/renderers/EGL/shader/desktop_rgb.frag
Normal file
@@ -0,0 +1,11 @@
|
||||
#version 300 es
|
||||
|
||||
in highp vec2 uv;
|
||||
out highp vec4 color;
|
||||
|
||||
uniform sampler2D sampler1;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = texture(sampler1, uv);
|
||||
}
|
27
client/renderers/EGL/shader/desktop_yuv.frag
Normal file
27
client/renderers/EGL/shader/desktop_yuv.frag
Normal file
@@ -0,0 +1,27 @@
|
||||
#version 300 es
|
||||
|
||||
in highp vec2 uv;
|
||||
out highp vec4 color;
|
||||
|
||||
uniform sampler2D sampler1;
|
||||
uniform sampler2D sampler2;
|
||||
uniform sampler2D sampler3;
|
||||
|
||||
void main()
|
||||
{
|
||||
highp vec4 yuv = vec4(
|
||||
texture(sampler1, uv).r,
|
||||
texture(sampler2, uv).r,
|
||||
texture(sampler3, uv).r,
|
||||
1.0
|
||||
);
|
||||
|
||||
highp mat4 yuv_to_rgb = mat4(
|
||||
1.0, 0.0 , 1.402, -0.701,
|
||||
1.0, -0.344, -0.714, 0.529,
|
||||
1.0, 1.772, 0.0 , -0.886,
|
||||
1.0, 1.0 , 1.0 , 1.0
|
||||
);
|
||||
|
||||
color = yuv * yuv_to_rgb;
|
||||
}
|
11
client/renderers/EGL/shader/fps.frag
Normal file
11
client/renderers/EGL/shader/fps.frag
Normal file
@@ -0,0 +1,11 @@
|
||||
#version 300 es
|
||||
|
||||
in highp vec2 uv;
|
||||
out highp vec4 color;
|
||||
|
||||
uniform sampler2D sampler1;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = texture(sampler1, uv);
|
||||
}
|
22
client/renderers/EGL/shader/fps.vert
Normal file
22
client/renderers/EGL/shader/fps.vert
Normal file
@@ -0,0 +1,22 @@
|
||||
#version 300 es
|
||||
|
||||
layout(location = 0) in vec3 vertexPosition_modelspace;
|
||||
layout(location = 1) in vec2 vertexUV;
|
||||
|
||||
uniform vec2 screen;
|
||||
uniform vec2 size;
|
||||
|
||||
out highp vec2 uv;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position.xyz = vertexPosition_modelspace;
|
||||
gl_Position.w = 1.0;
|
||||
gl_Position.xy *= screen.xy * size.xy;
|
||||
gl_Position.x -= 1.0 - (screen.x * size.x);
|
||||
gl_Position.y += 1.0 - (screen.y * size.y);
|
||||
gl_Position.x += screen.x * 10.0;
|
||||
gl_Position.y -= screen.y * 10.0;
|
||||
|
||||
uv = vertexUV;
|
||||
}
|
8
client/renderers/EGL/shader/fps_bg.frag
Normal file
8
client/renderers/EGL/shader/fps_bg.frag
Normal file
@@ -0,0 +1,8 @@
|
||||
#version 300 es
|
||||
|
||||
out highp vec4 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = vec4(0.0, 0.0, 1.0, 0.5);
|
||||
}
|
13
client/renderers/EGL/shader/splash_bg.frag
Normal file
13
client/renderers/EGL/shader/splash_bg.frag
Normal file
@@ -0,0 +1,13 @@
|
||||
#version 300 es
|
||||
|
||||
in highp vec3 pos;
|
||||
in highp float a;
|
||||
out highp vec4 color;
|
||||
|
||||
uniform sampler2D sampler1;
|
||||
|
||||
void main()
|
||||
{
|
||||
highp float d = 1.0 - sqrt(pos.x * pos.x + pos.y * pos.y) / 2.0;
|
||||
color = vec4(0.234375 * d, 0.015625f * d, 0.425781f * d, a);
|
||||
}
|
17
client/renderers/EGL/shader/splash_bg.vert
Normal file
17
client/renderers/EGL/shader/splash_bg.vert
Normal file
@@ -0,0 +1,17 @@
|
||||
#version 300 es
|
||||
|
||||
layout(location = 0) in vec3 vertexPosition_modelspace;
|
||||
|
||||
uniform float alpha;
|
||||
|
||||
out highp vec3 pos;
|
||||
out highp float a;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position.xyz = vertexPosition_modelspace;
|
||||
gl_Position.w = 1.0;
|
||||
|
||||
pos = vertexPosition_modelspace;
|
||||
a = alpha;
|
||||
}
|
11
client/renderers/EGL/shader/splash_logo.frag
Normal file
11
client/renderers/EGL/shader/splash_logo.frag
Normal file
@@ -0,0 +1,11 @@
|
||||
#version 300 es
|
||||
|
||||
out highp vec4 color;
|
||||
in highp float a;
|
||||
|
||||
uniform sampler2D sampler1;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = vec4(1.0, 1.0, 1.0, a);
|
||||
}
|
16
client/renderers/EGL/shader/splash_logo.vert
Normal file
16
client/renderers/EGL/shader/splash_logo.vert
Normal file
@@ -0,0 +1,16 @@
|
||||
#version 300 es
|
||||
|
||||
layout(location = 0) in vec3 vertexPosition_modelspace;
|
||||
|
||||
uniform vec2 scale;
|
||||
|
||||
out highp float a;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position.xyz = vertexPosition_modelspace;
|
||||
gl_Position.y *= scale.y;
|
||||
gl_Position.w = 1.0;
|
||||
|
||||
a = scale.x;
|
||||
}
|
Reference in New Issue
Block a user