Skip to content

Comments

feat: Implement thick lines for line renderer#145

Open
frewsxcv wants to merge 1 commit intomainfrom
feat/thick-lines
Open

feat: Implement thick lines for line renderer#145
frewsxcv wants to merge 1 commit intomainfrom
feat/thick-lines

Conversation

@frewsxcv
Copy link
Owner

@frewsxcv frewsxcv commented Aug 8, 2025

This commit introduces the functionality to render lines with a specified thickness, instead of a single pixel width.

The main changes are:

  • A new WGSL shader (rgis/assets/shaders/line.wgsl) is added to handle the rendering of thick lines. The vertex shader expands each line segment into a quad.
  • A custom LineMaterial is defined in rgis-renderer/src/line_material.rs, with color and width uniforms.
  • The mesh generation for line strings has been updated to produce a TriangleList of quads. This is done in a new rgis-renderer/src/mesh_conversion module, which is a custom implementation based on the geo-bevy crate.
  • The rendering systems in rgis-renderer/src/systems.rs have been updated to support the new LineMaterial.
  • A new UI widget for controlling the stroke width has been added in rgis-ui/src/widgets/stroke_width.rs and integrated into the "Manage Layer" window.
  • The Layer struct in rgis-layers/src/lib.rs has been updated to include a stroke_width field.
  • A new LayerStrokeWidthUpdatedEvent has been added to rgis-layer-events/src/lib.rs.

This commit introduces the functionality to render lines with a specified thickness, instead of a single pixel width.

The main changes are:
- A new WGSL shader (`rgis/assets/shaders/line.wgsl`) is added to handle the rendering of thick lines. The vertex shader expands each line segment into a quad.
- A custom `LineMaterial` is defined in `rgis-renderer/src/line_material.rs`, with `color` and `width` uniforms.
- The mesh generation for line strings has been updated to produce a `TriangleList` of quads. This is done in a new `rgis-renderer/src/mesh_conversion` module, which is a custom implementation based on the `geo-bevy` crate.
- The rendering systems in `rgis-renderer/src/systems.rs` have been updated to support the new `LineMaterial`.
- A new UI widget for controlling the stroke width has been added in `rgis-ui/src/widgets/stroke_width.rs` and integrated into the "Manage Layer" window.
- The `Layer` struct in `rgis-layers/src/lib.rs` has been updated to include a `stroke_width` field.
- A new `LayerStrokeWidthUpdatedEvent` has been added to `rgis-layer-events/src/lib.rs`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant