Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

box shadow #15204

Merged
merged 53 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
99a167f
Added `BoxShadow` component`
ickshonpe Sep 12, 2024
009e71a
Added `box_shadow` shader
ickshonpe Sep 12, 2024
31bfd99
load the box shadow shader
ickshonpe Sep 12, 2024
784cb8d
Added box shadow ui material and plugin
ickshonpe Sep 12, 2024
96ca27c
Added border radius vertex attribute
ickshonpe Sep 12, 2024
5299ad6
Removed normalization of border values.
ickshonpe Sep 12, 2024
e5f281c
Fixed incorrect uniform binding.
ickshonpe Sep 12, 2024
ee6e953
Updated `ui_material` example to display (square) border radius
ickshonpe Sep 12, 2024
e26585c
Merge branch 'main' into box-shadow
ickshonpe Sep 13, 2024
dbe7fe2
Merge branch 'ui-material-border-radius' into box-shadow
ickshonpe Sep 13, 2024
9262ad2
added missing gaussian function
ickshonpe Sep 13, 2024
e24ef00
removed unneeded ratio parameter
ickshonpe Sep 13, 2024
6f51772
Initial box shadow implementation. Added component support, plugin, s…
ickshonpe Sep 14, 2024
769a035
revert ui material changes
ickshonpe Sep 14, 2024
6170cea
reverted custom ui material changes
ickshonpe Sep 14, 2024
fed17c3
reverted custom ui material changes
ickshonpe Sep 14, 2024
13c897f
Implemented responsive coordinate support
ickshonpe Sep 14, 2024
fa0959a
Added `box_shadow` example
ickshonpe Sep 16, 2024
cb75986
Base resolved percent boxshadow values on matching axis
ickshonpe Sep 16, 2024
fdb3bd2
cargo run -p build-templated-pages -- update examples
ickshonpe Sep 16, 2024
4316179
expanded example
ickshonpe Sep 16, 2024
80ca1ef
try to improve shadow border radius scaling
ickshonpe Sep 16, 2024
dce8752
comments
ickshonpe Sep 16, 2024
600bb16
Docs
ickshonpe Sep 20, 2024
1c62971
Reverted changes to `ui_vertex_output.wgsl`
ickshonpe Sep 20, 2024
e01cf27
improved shader variable names
ickshonpe Sep 20, 2024
93cd35d
shader comments
ickshonpe Sep 20, 2024
cdc1a7a
Added a `SAMPLES` constant to control shadow quality.
ickshonpe Sep 20, 2024
262d34f
Added `BoxShadowSamples` resource and use it to set a SAMPLES shader …
ickshonpe Sep 20, 2024
034e2e2
Added samples argument to example
ickshonpe Sep 20, 2024
c31f4d4
Changed selectCorner to take a vec2 instead of separate x and y f32s.
ickshonpe Sep 20, 2024
63b2f44
Increase blur
ickshonpe Sep 25, 2024
8235070
Extra example bits
ickshonpe Sep 25, 2024
5f9557a
Merge branch 'main' into box-shadow
ickshonpe Oct 8, 2024
fcbd77a
Fixed imports
ickshonpe Oct 8, 2024
86f05cb
Updated extraction to use `TemporaryRenderEntity`
ickshonpe Oct 8, 2024
36fab40
fixed example to work with required components
ickshonpe Oct 8, 2024
f81e0ae
Replaced `BoxShadow`'s `x_spread` and `y_spread` fields with a single…
ickshonpe Oct 8, 2024
5ad6077
Improve comments
ickshonpe Oct 8, 2024
7209d88
Added comments
ickshonpe Oct 8, 2024
169dce9
fixed spread calculations
ickshonpe Oct 8, 2024
e70cc99
increased number of example cases
ickshonpe Oct 8, 2024
2b270ef
Fixed incorrect border radius corner mapping
ickshonpe Oct 8, 2024
cac5a16
updated example
ickshonpe Oct 8, 2024
125994e
Merge branch 'main' into box-shadow
ickshonpe Oct 8, 2024
8bb2eb2
Fixed example's imports
ickshonpe Oct 8, 2024
657af43
Merge branch 'box-shadow' of https://github.com/ickshonpe/bevy into b…
ickshonpe Oct 8, 2024
d344db5
Shadows samples is set per camera
ickshonpe Oct 8, 2024
d91d624
Merge branch 'main' into box-shadow
ickshonpe Oct 8, 2024
fe2418e
replaced import from `std` with `core`
ickshonpe Oct 8, 2024
5f57cbc
Merge branch 'box-shadow' of https://github.com/ickshonpe/bevy into b…
ickshonpe Oct 8, 2024
46c03de
Fixed doctest and cleaned up imports.
ickshonpe Oct 8, 2024
dc40d92
example ci fix
ickshonpe Oct 8, 2024
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
11 changes: 11 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2896,6 +2896,17 @@ description = "Demonstrates how to create a node with a border"
category = "UI (User Interface)"
wasm = true

[[example]]
name = "box_shadow"
path = "examples/ui/box_shadow.rs"
doc-scrape-examples = true

[package.metadata.example.box_shadow]
name = "Box Shadow"
description = "Demonstrates how to create a node with a shadow"
category = "UI (User Interface)"
wasm = true

[[example]]
name = "button"
path = "examples/ui/button.rs"
Expand Down
1 change: 1 addition & 0 deletions crates/bevy_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ impl Plugin for UiPlugin {
.register_type::<widget::Label>()
.register_type::<ZIndex>()
.register_type::<Outline>()
.register_type::<UiBoxShadowSamples>()
.configure_sets(
PostUpdate,
(
Expand Down
Loading