mirror of https://github.com/wayvr-org/wayvr.git
wayvr: improve grid shader, dash-frontend: make pop-up title non-scrollable
This commit is contained in:
parent
07bd841bc6
commit
f3732c7087
|
|
@ -86,7 +86,8 @@
|
|||
round="8"
|
||||
flex_grow="1"
|
||||
width="100%"
|
||||
overflow_y="scroll"
|
||||
overflow="scroll"
|
||||
position="relative"
|
||||
>
|
||||
<!-- radial gradient -->
|
||||
<rectangle
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
width="100%"
|
||||
height="100%"
|
||||
flex_direction="column"
|
||||
position="absolute"
|
||||
>
|
||||
<!-- Top black bar -->
|
||||
<rectangle
|
||||
|
|
@ -32,13 +33,17 @@
|
|||
</div>
|
||||
</rectangle>
|
||||
|
||||
<!-- Content -->
|
||||
<rectangle height="100%"
|
||||
<rectangle
|
||||
width="100%"
|
||||
height="100%"
|
||||
color="#010310fe"
|
||||
color2="#051c55fc"
|
||||
gradient="vertical"
|
||||
padding="16"
|
||||
id="content">
|
||||
position="relative"
|
||||
>
|
||||
<div id="content" padding="16" width="100%" height="100%" position="absolute" overflow_y="scroll">
|
||||
<!-- Content, filled-in at runtime -->
|
||||
</div>
|
||||
</rectangle>
|
||||
</div>
|
||||
</elements>
|
||||
|
|
|
|||
|
|
@ -475,7 +475,6 @@ impl SettingType {
|
|||
| Self::UiGradientIntensity
|
||||
| Self::UprightScreenFix
|
||||
| Self::DoubleCursorFix
|
||||
| Self::ScreenRenderDown
|
||||
| Self::Language
|
||||
| Self::CaptureMethod
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,18 +1,37 @@
|
|||
#version 310 es
|
||||
precision highp float;
|
||||
|
||||
layout (location = 0) in vec2 in_uv;
|
||||
layout (location = 0) out vec4 out_color;
|
||||
layout(location = 0) in vec2 in_uv;
|
||||
layout(location = 0) out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
float fade = max(1.0 - 2.0 * length(in_uv.xy + vec2(-0.5, -0.5)), 0.0);
|
||||
float grid;
|
||||
const float circle_smoothness = 0.0025;
|
||||
const float circle_thickness = 0.01;
|
||||
const float circle_opacity = 0.3;
|
||||
const float circle_size = 0.1;
|
||||
|
||||
if (fract(in_uv.x / 0.0005) < 0.01 || fract(in_uv.y / 0.0005) < 0.01) {
|
||||
grid = 1.0;
|
||||
} else {
|
||||
grid = 0.0;
|
||||
}
|
||||
out_color = vec4(1.0, 1.0, 1.0, grid * fade);
|
||||
float calc_grid(vec2 coord, float m) {
|
||||
vec2 grid = fract(coord * m);
|
||||
return (step(m, grid.x) * step(m, grid.y));
|
||||
}
|
||||
|
||||
float calc_circle(float dist, float size) {
|
||||
float c1 = size;
|
||||
float c2 = size - circle_thickness;
|
||||
|
||||
return smoothstep(c1, c1 - circle_smoothness, dist) *
|
||||
smoothstep(c2 - circle_smoothness, c2, dist);
|
||||
}
|
||||
|
||||
void main() {
|
||||
float dist = length(in_uv.xy + vec2(-0.5, -0.5));
|
||||
float fade = max(1.0 - 2.0 * dist, 0.0);
|
||||
|
||||
float mask = 1.0 - calc_grid(in_uv.xy * 1000.0, 0.02);
|
||||
|
||||
mask = max(mask, (calc_circle(dist, circle_size) +
|
||||
calc_circle(dist, circle_size * 2.0) +
|
||||
calc_circle(dist, circle_size * 3.0)) *
|
||||
circle_opacity);
|
||||
|
||||
out_color = vec4(1.0, 1.0, 1.0, mask * fade);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use crate::{
|
|||
globals::WguiGlobals,
|
||||
i18n::Translation,
|
||||
layout::Layout,
|
||||
parser::{self, Fetchable, ParserData, ParserState},
|
||||
parser::{self, Fetchable, ParserState},
|
||||
task::Tasks,
|
||||
windowing::window::{WguiWindow, WguiWindowParams, WguiWindowParamsExtra},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue