ft: hyprland to home manager, mostly
This commit is contained in:
1 parent
c7928a52a8
commit
0e3a6b116d
29 files changed
+885
-93
No files matched your search
@@ -0,0 +1,48 @@
|
||||
//modified version of [this shader](https://github.com/wessles/GLSL-CRT/blob/master/shader.frag)
|
||||
const vec3 VIB_RGB_BALANCE = vec3(1.0, 1.0, 1.0);
|
||||
const float VIB_VIBRANCE = 0.40;
|
||||
const vec3 VIB_coeffVibrance = VIB_RGB_BALANCE * -VIB_VIBRANCE;
|
||||
|
||||
void windowShader(inout vec4 color) {
|
||||
vec2 texCoord = x_TexCoord;
|
||||
|
||||
// Distance from the center
|
||||
float dx = abs(0.5-texCoord.x);
|
||||
float dy = abs(0.5-texCoord.y);
|
||||
|
||||
// Square it to smooth the edges
|
||||
dx *= dx;
|
||||
dy *= dy;
|
||||
|
||||
texCoord.x -= 0.5;
|
||||
texCoord.x *= 1.0 + (dy * 0.05);
|
||||
texCoord.x += 0.5;
|
||||
|
||||
texCoord.y -= 0.5;
|
||||
texCoord.y *= 1.0 + (dx * 0.18);
|
||||
texCoord.y += 0.5;
|
||||
|
||||
// Get texel, and add in scanline if need be
|
||||
color = x_Texture(texCoord);
|
||||
color.rgb += sin(texCoord.y * 1250.0) * 0.02;
|
||||
|
||||
// Cutoff
|
||||
if(texCoord.y > 1.0 || texCoord.x < 0.0 || texCoord.x > 1.0 || texCoord.y < 0.0)
|
||||
color = vec4(0.0);
|
||||
|
||||
// vec3 VIB_coefLuma = vec3(0.333333, 0.333334, 0.333333); // was for `if VIB_LUMA == 1`
|
||||
vec3 VIB_coefLuma = vec3(0.212656, 0.715158, 0.072186); // try both and see which one looks nicer.
|
||||
|
||||
float luma = dot(VIB_coefLuma, color.rgb);
|
||||
|
||||
float max_color = max(color.r, max(color.g, color.b));
|
||||
float min_color = min(color.r, min(color.g, color.b));
|
||||
|
||||
float color_saturation = max_color - min_color;
|
||||
|
||||
vec3 p_col = vec3(vec3(vec3(vec3(sign(VIB_coeffVibrance) * color_saturation) - 1.0) * VIB_coeffVibrance) + 1.0);
|
||||
|
||||
color.r = mix(luma, color.r, p_col.r);
|
||||
color.g = mix(luma, color.g, p_col.g);
|
||||
color.b = mix(luma, color.b, p_col.b);
|
||||
}
|
||||