Open
Conversation
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces the functionality to render lines with a specified thickness, instead of a single pixel width.
The main changes are:
rgis/assets/shaders/line.wgsl) is added to handle the rendering of thick lines. The vertex shader expands each line segment into a quad.LineMaterialis defined inrgis-renderer/src/line_material.rs, withcolorandwidthuniforms.TriangleListof quads. This is done in a newrgis-renderer/src/mesh_conversionmodule, which is a custom implementation based on thegeo-bevycrate.rgis-renderer/src/systems.rshave been updated to support the newLineMaterial.rgis-ui/src/widgets/stroke_width.rsand integrated into the "Manage Layer" window.Layerstruct inrgis-layers/src/lib.rshas been updated to include astroke_widthfield.LayerStrokeWidthUpdatedEventhas been added torgis-layer-events/src/lib.rs.