Reorganize assets
This commit is contained in:
20
assets/assets_linux/apps.json
Normal file
20
assets/assets_linux/apps.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"env":{
|
||||
"PATH":"$(PATH):$(HOME)/.local/bin"
|
||||
},
|
||||
"apps":[
|
||||
{
|
||||
"name":"Low Res Desktop",
|
||||
"prep-cmd":[
|
||||
{ "do":"xrandr --output HDMI-1 --mode 1920x1080", "undo":"xrandr --output HDMI-1 --mode 1920x1200" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"Steam BigPicture",
|
||||
|
||||
"output":"steam.txt",
|
||||
"detached":["setsid steam steam://open/bigpicture"],
|
||||
"image-path":"./assets/steam.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
35
assets/assets_linux/shaders/opengl/ConvertUV.frag
Normal file
35
assets/assets_linux/shaders/opengl/ConvertUV.frag
Normal file
@@ -0,0 +1,35 @@
|
||||
#version 300 es
|
||||
|
||||
#ifdef GL_ES
|
||||
precision lowp float;
|
||||
#endif
|
||||
|
||||
uniform sampler2D image;
|
||||
|
||||
layout(shared) uniform ColorMatrix {
|
||||
vec4 color_vec_y;
|
||||
vec4 color_vec_u;
|
||||
vec4 color_vec_v;
|
||||
vec2 range_y;
|
||||
vec2 range_uv;
|
||||
};
|
||||
|
||||
in vec3 uuv;
|
||||
layout(location = 0) out vec2 color;
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Pixel Shader
|
||||
//--------------------------------------------------------------------------------------
|
||||
void main() {
|
||||
vec3 rgb_left = texture(image, uuv.xz).rgb;
|
||||
vec3 rgb_right = texture(image, uuv.yz).rgb;
|
||||
vec3 rgb = (rgb_left + rgb_right) * 0.5;
|
||||
|
||||
float u = dot(color_vec_u.xyz, rgb) + color_vec_u.w;
|
||||
float v = dot(color_vec_v.xyz, rgb) + color_vec_v.w;
|
||||
|
||||
u = u * range_uv.x + range_uv.y;
|
||||
v = v * range_uv.x + range_uv.y;
|
||||
|
||||
color = vec2(u, v * 224.0f / 256.0f + 0.0625);
|
||||
}
|
||||
27
assets/assets_linux/shaders/opengl/ConvertUV.vert
Normal file
27
assets/assets_linux/shaders/opengl/ConvertUV.vert
Normal file
@@ -0,0 +1,27 @@
|
||||
#version 300 es
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
uniform float width_i;
|
||||
|
||||
out vec3 uuv;
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Vertex Shader
|
||||
//--------------------------------------------------------------------------------------
|
||||
void main()
|
||||
{
|
||||
float idHigh = float(gl_VertexID >> 1);
|
||||
float idLow = float(gl_VertexID & int(1));
|
||||
|
||||
float x = idHigh * 4.0 - 1.0;
|
||||
float y = idLow * 4.0 - 1.0;
|
||||
|
||||
float u_right = idHigh * 2.0;
|
||||
float u_left = u_right - width_i;
|
||||
float v = idLow * 2.0;
|
||||
|
||||
uuv = vec3(u_left, u_right, v);
|
||||
gl_Position = vec4(x, y, 0.0, 1.0);
|
||||
}
|
||||
26
assets/assets_linux/shaders/opengl/ConvertY.frag
Normal file
26
assets/assets_linux/shaders/opengl/ConvertY.frag
Normal file
@@ -0,0 +1,26 @@
|
||||
#version 300 es
|
||||
|
||||
#ifdef GL_ES
|
||||
precision lowp float;
|
||||
#endif
|
||||
|
||||
uniform sampler2D image;
|
||||
|
||||
layout(shared) uniform ColorMatrix {
|
||||
vec4 color_vec_y;
|
||||
vec4 color_vec_u;
|
||||
vec4 color_vec_v;
|
||||
vec2 range_y;
|
||||
vec2 range_uv;
|
||||
};
|
||||
|
||||
in vec2 tex;
|
||||
layout(location = 0) out float color;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 rgb = texture(image, tex).rgb;
|
||||
float y = dot(color_vec_y.xyz, rgb);
|
||||
|
||||
color = y * range_y.x + range_y.y;
|
||||
}
|
||||
14
assets/assets_linux/shaders/opengl/Scene.frag
Normal file
14
assets/assets_linux/shaders/opengl/Scene.frag
Normal file
@@ -0,0 +1,14 @@
|
||||
#version 300 es
|
||||
|
||||
#ifdef GL_ES
|
||||
precision lowp float;
|
||||
#endif
|
||||
|
||||
uniform sampler2D image;
|
||||
|
||||
in vec2 tex;
|
||||
layout(location = 0) out vec4 color;
|
||||
void main()
|
||||
{
|
||||
color = texture(image, tex);
|
||||
}
|
||||
22
assets/assets_linux/shaders/opengl/Scene.vert
Normal file
22
assets/assets_linux/shaders/opengl/Scene.vert
Normal file
@@ -0,0 +1,22 @@
|
||||
#version 300 es
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
out vec2 tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
float idHigh = float(gl_VertexID >> 1);
|
||||
float idLow = float(gl_VertexID & int(1));
|
||||
|
||||
float x = idHigh * 4.0 - 1.0;
|
||||
float y = idLow * 4.0 - 1.0;
|
||||
|
||||
float u = idHigh * 2.0;
|
||||
float v = idLow * 2.0;
|
||||
|
||||
gl_Position = vec4(x, y, 0.0, 1.0);
|
||||
tex = vec2(u, v);
|
||||
}
|
||||
Reference in New Issue
Block a user