Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1
2.2.1
33 changes: 21 additions & 12 deletions assets/gtk/gtk.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@
@define-color cy_bg rgba(7,9,13,0.88); /* window (glassy) */
@define-color cy_bg2 rgba(16,11,14,0.93); /* raised surfaces */
@define-color cy_base rgba(10,7,10,0.80); /* fields / views (NOT white) */
@define-color cy_hdr rgba(11,8,11,0.93); /* headerbars / toolbars */
@define-color cy_side rgba(9,6,9,0.90); /* sidebars / places */
@define-color cy_btn rgba(16,11,14,0.90); /* buttons */
@define-color cy_head rgba(14,9,12,0.95); /* treeview column heads */
@define-color cy_trough rgba(16,11,14,0.80); /* scale / progress groove */
@define-color cy_tip rgba(5,7,9,0.96); /* tooltips */
@define-color cy_fg #e7f1f6;
@define-color cy_dim #9a777e;
@define-color cy_red #ff2d3d; /* primary HUD accent */
@define-color cy_red2 #ff5a64;
@define-color cy_cyan #2de2ff; /* secondary accent */
@define-color cy_sel rgba(255,45,61,0.34); /* red selection fill */
@define-color cy_border rgba(255,45,61,0.42); /* red HUD borders */
@define-color cy_warn #ffb454;
@define-color cy_ink #0a0d12; /* text on a solid accent */
@define-color cy_sel rgba(255,45,61,0.34); /* accent selection fill */
@define-color cy_border rgba(255,45,61,0.42); /* accent HUD borders */
/* __CYBER_PALETTE__ */

/* ── GTK3 (Adwaita) named tokens ───────────────────────────────────────── */
@define-color theme_bg_color @cy_bg;
Expand All @@ -30,19 +39,19 @@
@define-color window_fg_color @cy_fg;
@define-color view_bg_color @cy_base;
@define-color view_fg_color @cy_fg;
@define-color headerbar_bg_color rgba(11,8,11,0.93);
@define-color headerbar_bg_color @cy_hdr;
@define-color headerbar_fg_color @cy_fg;
@define-color popover_bg_color @cy_bg2;
@define-color popover_fg_color @cy_fg;
@define-color card_bg_color @cy_bg2;
@define-color dialog_bg_color @cy_bg;
@define-color sidebar_bg_color rgba(9,6,9,0.90);
@define-color sidebar_bg_color @cy_side;
@define-color accent_color @cy_red2;
@define-color accent_bg_color @cy_red;
@define-color accent_fg_color #ffffff;
@define-color destructive_color @cy_red;
@define-color success_color @cy_cyan;
@define-color warning_color #ffb454;
@define-color warning_color @cy_warn;
@define-color error_color @cy_red;

/* ── base / windows ────────────────────────────────────────────────────── */
Expand All @@ -53,7 +62,7 @@ window, .background, dialog, assistant, messagedialog, .csd {

/* headerbars / toolbars / menubars — glass + red HUD edge */
headerbar, .titlebar, .toolbar, toolbar, .primary-toolbar, .csd headerbar {
background-color: rgba(11,8,11,0.93); color: @cy_fg;
background-color: @cy_hdr; color: @cy_fg;
border-bottom: 2px solid @cy_red; box-shadow: none; background-image: none;
}
menubar, .menubar { background-color: transparent; border-bottom: 1px solid alpha(@cy_red,0.5); }
Expand All @@ -77,7 +86,7 @@ entry image, entry placeholder, placeholder { color: @cy_dim; }
background-color: @cy_base; color: @cy_fg;
}
treeview.view:hover, row:hover, list row:hover, .view:hover { background-color: alpha(@cy_red,0.10); }
treeview.view header button { background-color: rgba(14,9,12,0.95); color: @cy_fg; border: 1px solid alpha(@cy_red,0.3); }
treeview.view header button { background-color: @cy_head; color: @cy_fg; border: 1px solid alpha(@cy_red,0.3); }

/* ── selection — red HUD with a red left-spine ── */
selection { background-color: @cy_sel; color: #ffffff; }
Expand All @@ -89,7 +98,7 @@ placessidebar row:selected, .sidebar row:selected, columnview row:selected {

/* ── buttons — angular glass, red border ── */
button, .button, spinbutton button {
background-color: rgba(16,11,14,0.9); color: @cy_fg;
background-color: @cy_btn; color: @cy_fg;
border: 1px solid @cy_border; border-radius: 2px; box-shadow: none; background-image: none;
}
button:hover { border-color: @cy_red; color: #ffffff; background-color: alpha(@cy_red,0.12); }
Expand All @@ -101,7 +110,7 @@ button.flat:hover { background-color: alpha(@cy_red,0.12); border-color: alpha(@

/* ── sidebars / places ── */
.sidebar, placessidebar, stacksidebar, .navigation-sidebar, paned.horizontal > .sidebar {
background-color: rgba(9,6,9,0.90); color: @cy_fg; border-right: 1px solid alpha(@cy_red,0.3);
background-color: @cy_side; color: @cy_fg; border-right: 1px solid alpha(@cy_red,0.3);
}

/* ── scrollbars — red ── */
Expand All @@ -111,13 +120,13 @@ scrollbar slider:hover { background-color: @cy_red; }

/* ── checks / radios / switches ── */
check, radio { background-color: @cy_base; border: 1px solid @cy_border; border-radius: 2px; }
check:checked, radio:checked { background-color: @cy_red; border-color: @cy_red2; color: #0a0d12; }
check:checked, radio:checked { background-color: @cy_red; border-color: @cy_red2; color: @cy_ink; }
switch { background-color: @cy_bg2; border: 1px solid @cy_border; border-radius: 2px; }
switch:checked { background-color: alpha(@cy_red,0.40); border-color: @cy_red; }
switch slider { background-color: @cy_fg; border-radius: 2px; }

/* ── progress / scales ── */
trough { background-color: rgba(16,11,14,0.8); border-radius: 2px; }
trough { background-color: @cy_trough; border-radius: 2px; }
progressbar progress, levelbar block.filled { background-color: @cy_red; }
scale highlight { background-color: @cy_red; }
scale slider { background-color: @cy_fg; border: 1px solid @cy_red; }
Expand All @@ -139,7 +148,7 @@ notebook > header tab:checked { color: #ffffff; box-shadow: inset 0 -2px @cy_red
.path-bar button:checked { color: @cy_red2; box-shadow: inset 0 -2px @cy_red; }

/* ── misc ── */
tooltip { background-color: rgba(5,7,9,0.96); color: @cy_red2; border: 1px solid @cy_red; }
tooltip { background-color: @cy_tip; color: @cy_red2; border: 1px solid @cy_red; }
link, *:link { color: @cy_cyan; }
spinner { color: @cy_red; }
label.dim-label, .dim-label { color: @cy_dim; }
Expand Down
91 changes: 91 additions & 0 deletions assets/rio/shaders/blade-baseline/accumulate.slang
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#version 450

// newpixie CRT
// by Mattias Gustavsson
// adapted for slang by hunterk

/*
------------------------------------------------------------------------------
This software is available under 2 licenses - you may choose the one you like.
------------------------------------------------------------------------------
ALTERNATIVE A - MIT License
Copyright (c) 2016 Mattias Gustavsson
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
------------------------------------------------------------------------------
ALTERNATIVE B - Public Domain (www.unlicense.org)
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
software, either in source code form or as a compiled binary, for any purpose,
commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this
software dedicate any and all copyright interest in the software to the public
domain. We make this dedication for the benefit of the public at large and to
the detriment of our heirs and successors. We intend this dedication to be an
overt act of relinquishment in perpetuity of all present and future rights to
this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
------------------------------------------------------------------------------
*/

layout(push_constant) uniform Push
{
vec4 SourceSize;
vec4 OriginalSize;
vec4 OutputSize;
uint FrameCount;
float acc_modulate;
} params;

#pragma parameter acc_modulate "Accumulate Modulation" 0.65 0.0 1.0 0.01
#define modulate params.acc_modulate

#define tex0 PassFeedback1
#define tex1 Source

layout(std140, set = 0, binding = 0) uniform UBO
{
mat4 MVP;
} global;

#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;

void main()
{
gl_Position = global.MVP * Position;
vTexCoord = TexCoord;
}

#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
layout(set = 0, binding = 3) uniform sampler2D PassFeedback1;

void main()
{
vec4 a = texture(tex0, vTexCoord.xy) * vec4(modulate);
vec4 b = texture(tex1, vTexCoord.xy);
FragColor = max( a, b * 0.96 );
}
142 changes: 142 additions & 0 deletions assets/rio/shaders/blade-baseline/blade-baseline.slang
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
#version 450

layout(push_constant) uniform Push
{
vec4 SourceSize;
vec4 OutputSize;
uint FrameCount;
float bloom;
float sheen;
} params;

#pragma parameter bloom "Deck Bloom" 1.0 0.0 2.0 0.05
#pragma parameter sheen "Deck Sheen" 1.0 0.0 2.0 0.05
#define backbuffer accum1
#define blurbuffer blur2

layout(std140, set = 0, binding = 0) uniform UBO
{
mat4 MVP;
} global;

#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;

void main()
{
gl_Position = global.MVP * Position;
vTexCoord = vec2(TexCoord.x, 1.0 - TexCoord.y);
}

#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
layout(set = 0, binding = 3) uniform sampler2D accum1;
layout(set = 0, binding = 4) uniform sampler2D blur2;

vec3 fetch( sampler2D samp, vec2 tc )
{
return texture( samp, vec2( tc.x, 1.0 - tc.y ) ).rgb;
}
float luma( vec3 c )
{
return dot( c, vec3( 0.299, 0.587, 0.114 ) );
}
float hash( vec2 p )
{
return fract( sin( dot( p, vec2( 127.1, 311.7 ) ) ) * 43758.5453 );
}

#define BODY_DARK vec3( 0.055, 0.055, 0.060 )
#define BODY_LITE vec3( 0.180, 0.170, 0.155 )
#define BEVEL vec3( 0.340, 0.310, 0.270 )
#define PHOS vec3( 0.004, 0.707, 0.698 )
#define PHOS_HI vec3( 0.560, 0.960, 0.950 )
#define LED vec3( 0.792, 0.325, 0.667 )
#define STEEL vec3( 0.500, 0.480, 0.440 )

#define FRAME_X 26.0
#define FRAME_Y 24.0
#define CORNER_R 1.0

float sdfBox( vec2 p, vec2 b, float r )
{
vec2 q = abs( p ) - b + r;
return length( max( q, vec2( 0.0 ) ) ) + min( max( q.x, q.y ), 0.0 ) - r;
}

void main()
{
vec2 uv = vTexCoord.xy;
vec2 res = params.OutputSize.xy;
vec2 px = uv * res;
vec2 pc = px - res * 0.5;

float outer = sdfBox( pc, res * 0.5, CORNER_R );
float screen = sdfBox( pc, res * 0.5 - vec2( FRAME_X, FRAME_Y ), max( CORNER_R - 1.0, 0.0 ) );

float bodyA = 1.0 - smoothstep( -0.9, 0.9, outer );
float scrA = 1.0 - smoothstep( -0.9, 0.9, screen );

float bezel = 1.0 - smoothstep( 1.0, 3.0, abs( screen + 2.0 ) );
float edge = 1.0 - smoothstep( 1.0, 3.0, abs( outer + 2.0 ) );

float grain = hash( floor( px * 0.5 ) ) * 0.5 + hash( floor( px * 0.25 ) ) * 0.5;
vec3 body = mix( BODY_DARK, BODY_LITE, 0.35 + grain * 0.30 );
body += BEVEL * pow( clamp( 1.0 - abs( uv.y - 0.5 ) * 2.0, 0.0, 1.0 ), 3.0 ) * 0.35;
body = mix( body, BEVEL, bezel * 0.85 );
body = mix( body, BEVEL * 1.4, edge * 0.6 );

vec2 screwUV[4];
screwUV[0] = vec2( FRAME_X * 0.5, FRAME_Y * 0.5 );
screwUV[1] = vec2( res.x - FRAME_X * 0.5, FRAME_Y * 0.5 );
screwUV[2] = vec2( FRAME_X * 0.5, res.y - FRAME_Y * 0.5 );
screwUV[3] = vec2( res.x - FRAME_X * 0.5, res.y - FRAME_Y * 0.5 );
for ( int i = 0; i < 4; i++ )
{
float sd = length( pc - ( screwUV[i] - res * 0.5 ) );
body = mix( body, STEEL * ( 0.7 + 0.3 * grain ), 1.0 - smoothstep( 2.4, 4.2, sd ) );
body = mix( body, vec3( 0.10 ), 1.0 - smoothstep( 0.0, 1.1, sd ) );
}
float led = length( pc - ( vec2( res.x - FRAME_X * 0.55, FRAME_Y * 0.5 ) - res * 0.5 ) );
float ledPulse = 0.75 + 0.25 * sin( float( params.FrameCount ) * 0.08 );
body = mix( body, LED * ledPulse, 1.0 - smoothstep( 2.5, 6.5, led ) );

vec2 suv = ( px - vec2( FRAME_X, FRAME_Y ) ) / ( res - vec2( FRAME_X * 2.0, FRAME_Y * 2.0 ) );
vec3 src = fetch( backbuffer, uv );
vec3 blr = fetch( blurbuffer, uv + vec2( -0.0009, 0.0012 ) );
float slum = luma( src );
float ink = smoothstep( 0.060, 0.280, slum );
float mat = smoothstep( 0.040, 0.320, luma( blr ) );

vec3 crt = src * vec3( 0.55, 1.05, 1.02 ) + blr * PHOS * 0.55;
crt += PHOS * mat * 0.48 * params.bloom;
crt *= 1.0 + 0.14 * mat;
crt += PHOS_HI * ink * 0.16;

float scan = 0.80 + 0.20 * sin( px.y * 3.14159265 );
crt *= mix( 1.0, scan, 0.60 );

float vscr = 0.94 + 0.06 * sin( px.x * 1.047 );
crt *= mix( 1.0, vscr, 0.25 );

float flick = 0.96 + 0.04 * hash( vec2( float( params.FrameCount ), 0.0 ) );
crt *= flick;

crt += vec3( ( hash( floor( px ) ) - 0.5 ) * 0.012 );

vec2 vp = ( suv - 0.5 ) * vec2( 1.05, 1.0 );
crt *= 1.0 - 0.34 * pow( clamp( length( vp ) * 1.30, 0.0, 1.0 ), 2.4 );

crt = mix( crt, PHOS * 0.35, bezel * 0.9 );
crt += PHOS_HI * pow( clamp( suv.y, 0.0, 1.0 ), 8.0 ) * 0.05 * params.sheen;
crt = clamp( crt, vec3( 0.0 ), vec3( 1.0 ) );

vec3 col = mix( crt, body, 1.0 - scrA );
float alpha = max( bodyA, scrA * 0.35 );

FragColor = vec4( col * alpha, alpha );
}
30 changes: 30 additions & 0 deletions assets/rio/shaders/blade-baseline/blade-baseline.slangp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
shaders = 4

shader0 = accumulate.slang
alias0 = accum1
scale0 = 1.0
scale_type0 = source
filter_linear0 = true

shader1 = blur_horiz.slang
alias1 = blur1
scale1 = 1.0
scale_type1 = source
filter_linear1 = true

shader2 = blur_vert.slang
alias2 = blur2
scale2 = 1.0
scale_type2 = source
filter_linear2 = true

shader3 = blade-baseline.slang
filter_linear3 = true
scale_type3 = viewport

acc_modulate = 0.14
blur_x = 5.00
blur_y = 5.00

bloom = 1.00
sheen = 1.00
Loading