Skip to content

Commit

Permalink
Merge pull request #214 from StaffEngineer/minot
Browse files Browse the repository at this point in the history
minor
  • Loading branch information
Dimchikkk authored Jul 25, 2023
2 parents e1ec2f7 + 3d0f689 commit a6ac207
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions assets/shaders/grid.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,8 @@ fn fragment(
let point = (mesh.uv - vec2(0.5)) * grid_size;

let t = grid(point, cell_size, 0.05);
let u = grid(point, cell_size * major, 0.1 / major);
let u = grid(point, cell_size * major, 0.2 / major);
let g = min(t, u);
let alpha = 1.0 - smoothstep(0.0, fwidth(g), g);

// let o = origin(point, 1.);
// let fwo = fwidth(o);
// if o < 0.0 {
// let alpha = 1.0 - smoothstep(0.0, fwo, o);
// return vec4(1.0, 0., 0., alpha);
// }
return vec4(line_color.rgb, alpha * line_color.a);
}
2 changes: 1 addition & 1 deletion src/canvas/grid/systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn grid(
line_color: theme.canvas_bg_line_color,
grid_size: size,
cell_size: Vec2::splat(CELL_SIZE),
major: 4.0,
major: 8.0,
}),
..Default::default()
})
Expand Down
2 changes: 1 addition & 1 deletion src/themes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pub fn velo_light() -> Theme {
modal_bg: Color::WHITE,
modal_text_input_bg: Color::WHITE,
new_tab_btn_bg: Color::rgb(189.0 / 255.0, 189.0 / 255.0, 189.0 / 255.0),
node_bg: Color::rgb(0.98, 0.98, 0.98),
node_bg: Color::WHITE,
node_border: Color::BLACK.with_a(0.8),
node_found_color: Color::TEAL,
node_height: 144.,
Expand Down

0 comments on commit a6ac207

Please sign in to comment.