Zhixing Zhang
d9fb61d474
Wireframe Rendering Pipeline ( #562 )
...
This PR implements wireframe rendering.
Usage:
This is now ready as soon as #1401 gets merged.
Usage:
```rust
app
.insert_resource(WgpuOptions {
name: Some("3d_scene"),
features: WgpuFeatures::NON_FILL_POLYGON_MODE,
..Default::default()
}) // To enable the NON_FILL_POLYGON_MODE feature
.add_plugin(WireframePlugin)
.run();
```
Now we just need to add the Wireframe component on an entity, and it'll draw. its wireframe.
We can also enable wireframe drawing globally by setting the global property in the `WireframeConfig` resource to `true`.
Co-authored-by: Zhixing Zhang <me@neoto.xin>
2021-03-04 01:23:24 +00:00
François
1fcafc4210
Glb textures should use bevy_render to load images ( #1454 )
...
Fixes #1396
<img width="1392" alt="Screenshot 2021-02-16 at 02 24 01" src="https://user-images.githubusercontent.com/8672791/108011774-1b991a80-7008-11eb-979e-6ebfc51fba3c.png ">
Issue was that, when loading an image directly from its bytes in the binary glb file, it didn't follow the same flow as when loaded as a texture file. This PR removes the dependency to `image` from `bevy_gltf`, and load the image using `bevy_render` in all cases. I also added support for more mime types while there.
<img width="1392" alt="Screenshot 2021-02-16 at 02 44 56" src="https://user-images.githubusercontent.com/8672791/108011915-674bc400-7008-11eb-83d4-ded96a38919b.png ">
2021-03-03 21:36:16 +00:00
François
6a0968b2ea
convert grayscale images to rgb ( #1524 )
...
Fixes #1518
Issue was that images loaded as [`ImageLumaA8`](https://docs.rs/image/0.23.13/image/enum.DynamicImage.html#variant.ImageLumaA8 ) (grayscale with alpha channel) from `image` were considered as [`Rg8Unorm`](https://docs.rs/wgpu/0.7.0/wgpu/enum.TextureFormat.html#variant.Rg8Unorm ) (red green channels) from `wgpu`.
Same for `ImageLuma8` (grayscale) that was converted to `R8Unorm` (only red channel).
As `wgpu` doesn't seem to have grayscale texture formats, I converted the grayscale textures to rgba.
2021-03-03 21:20:45 +00:00
Jakob Hellermann
bc4fe9b186
keep track of type name in NodeState ( #1444 )
...
Adds the original type_name to `NodeState`, enabling plugins like [this](https://github.com/jakobhellermann/bevy_mod_debugdump ).
This does increase the `NodeState` type by 16 bytes, but it is already 176 so it's not that big of an increase.
2021-02-22 09:15:29 +00:00
Jonas Matser
72f2a7b581
Add getter for RenderGraph Node uuid ( #1499 )
...
`RenderGraph` errors only give the `Uuid` of the node. So for my graphviz dot based visualization of the `RenderGraph` I really wanted to show it to the user. I think it makes sense to have it accessible for at least debugging purposes.
2021-02-22 08:59:14 +00:00
Nathan Stocks
13b602ee3f
Xtask CI ( #1387 )
...
This PR is easiest to review commit by commit.
Followup on https://github.com/bevyengine/bevy/pull/1309#issuecomment-767310084
- [x] Switch from a bash script to an xtask rust workspace member.
- Results in ~30s longer CI due to compilation of the xtask itself
- Enables Bevy contributors on any platform to run `cargo ci` to run linting -- if the default available Rust is the same version as on CI, then the command should give an identical result.
- [x] Use the xtask from official CI so there's only one place to update.
- [x] Bonus: Run clippy on the _entire_ workspace (existing CI setup was missing the `--workspace` flag
- [x] Clean up newly-exposed clippy errors
~#1388 builds on this to clean up newly discovered clippy errors -- I thought it might be nicer as a separate PR.~ Nope, merged it into this one so CI would pass.
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2021-02-22 08:42:19 +00:00
Jakob Hellermann
cd688d7a41
fix rustdoc warnings ( #1437 )
...
Every warning is fixed except for
b39df9a8d2/crates/bevy_render/src/texture/texture_descriptor.rs (L61)
because I didn't know what the required feature is.
I opened https://github.com/gfx-rs/wgpu/issues/1213 for that.
2021-02-22 03:59:35 +00:00
Alec Deason
97a78c3698
Make vertex buffers optional ( #1485 )
...
For some cases, like driving a full screen fragment shader, it is sometimes convenient to not have to create and upload a mesh because the necessary vertices are simple to synthesize in the vertex shader. Bevy's existing pipeline compiler assumes that there will always be a vertex buffer. This PR changes that such that vertex buffer descriptor is only added to the pipeline layout if there are vertex attributes in the shader.
2021-02-22 03:43:27 +00:00
Alexander Sepity
c2a427f1a3
Non-string labels ( #1423 continued) ( #1473 )
...
Non-string labels
2021-02-18 13:20:37 -08:00
Alexander Sepity
d5a7330431
System sets and parallel executor v2 ( #1144 )
...
System sets and parallel executor v2
2021-02-09 12:14:10 -08:00
Jakob Hellermann
4796ea8d22
move texture_to_image and image_to_texture into new module ( #1381 )
...
The `Texture::convert` function previously was only compiled when
one of the image format features (`png`, `jpeg` etc.) were enabled.
The `bevy_sprite` crate needs this function though, which led
to compilation errors when using `cargo check --no-default-features
--features render`.
Now the `convert` function has no features and the `texture_to_image`
and `image_to_texture` utilites functions are in an unconditionally
compiled module.
2021-02-02 13:25:16 -08:00
François
6b8f8a7ed0
Texture atlas format and conversion ( #1365 )
...
* can specify texture format for a texture atlas
* add automatic conversion
2021-02-01 11:30:11 -08:00
Zhixing Zhang
81809c71ce
Update to wgpu-rs 0.7 ( #542 )
...
Update to wgpu-rs 0.7
2021-01-31 20:06:42 -08:00
Jasen Borisov
7d065eeb71
3D OrthographicProjection improvements + new example ( #1361 )
...
* use `length_squared` for visible entities
* ortho projection 2d/3d different depth calculation
* use ScalingMode::FixedVertical for 3d ortho
* new example: 3d orthographic
2021-01-31 16:22:06 -08:00
Daniel McNab
b922a3ec60
Update init_resource to not overwrite ( #1349 )
...
Update init_resource to not overwrite
2021-01-30 12:48:11 -08:00
Renato Caldas
8e0e4223e5
Improve clarity of WindowTextureNode and WindowSwapchainNode error messages ( #1355 )
...
Improve clarity of WindowTextureNode and WindowSwapchainNode error messages
2021-01-30 12:47:27 -08:00
Jasen Borisov
57f9ac18d7
OrthographicProjection scaling mode + camera bundle refactoring ( #400 )
...
* add normalized orthographic projection
* custom scale for ScaledOrthographicProjection
* allow choosing base axis for ScaledOrthographicProjection
* cargo fmt
* add general (scaled) orthographic camera bundle
FIXME: does the same "far" trick from Camera2DBundle make any sense here?
* fixes
* camera bundles: rename and new ortho constructors
* unify orthographic projections
* give PerspectiveCameraBundle constructors like those of OrthographicCameraBundle
* update examples with new camera bundle syntax
* rename CameraUiBundle to UiCameraBundle
* update examples
* ScalingMode::None
* remove extra blank lines
* sane default bounds for orthographic projection
* fix alien_cake_addict example
* reorder ScalingMode enum variants
* ios example fix
2021-01-30 02:31:03 -08:00
Renato Caldas
0a39c81be6
Add support for reading from mapped buffers ( #1274 )
...
* Add support for mapping buffers for reading.
* Add support for reading from a mapped buffer.
2021-01-21 17:53:43 -08:00
Aevyrie
18e4fa8cdf
world coords to screen space ( #1258 )
...
Add Camera::world_to_screen to convert world coordinates to screen space
2021-01-21 17:49:29 -08:00
TheRawMeatball
a880b54508
Make EventReader a SystemParam ( #1244 )
...
* Add generic support for `#[derive(SystemParam)]`
* Make EventReader a SystemParam
2021-01-18 22:23:30 -08:00
Alec Deason
71c6a19ed8
Minimal change to support instanced rendering ( #1262 )
2021-01-18 16:52:06 -08:00
Zhixing Zhang
cf0e9f9968
Adding copy_texture_to_buffer and copy_texture_to_texture ( #1236 )
...
* Adding copy_texture_to_buffer and copy_texture_to_texture
* Adding CopyTextureToTexture and CopyTextureToBuffer in CommandQueue
2021-01-14 11:01:07 -08:00
João Capucho
478f947768
Don't panic if there's no index buffer and call draw ( #1229 )
2021-01-12 14:05:13 -08:00
bjorn3
fbf08ac545
Faster compilation of bevy_diagnostic ( #1235 )
...
* Remove AHashExt
There is little benefit of Hash*::new() over Hash*::default(), but it
does require more code that needs to be duplicated for every Hash* in
bevy_utils. It may also slightly increase compile times.
* Add StableHash* to bevy_utils
* Use StableHashMap instead of HashMap + BTreeSet for diagnostics
This is a significant reduction in the release mode compile times of
bevy_diagnostics
```
Benchmark #1 : touch crates/bevy_diagnostic/src/lib.rs && cargo build --release -p bevy_diagnostic -j1
Time (mean ± σ): 3.645 s ± 0.009 s [User: 3.551 s, System: 0.094 s]
Range (min … max): 3.632 s … 3.658 s 20 runs
```
```
Benchmark #1 : touch crates/bevy_diagnostic/src/lib.rs && cargo build --release -p bevy_diagnostic -j1
Time (mean ± σ): 2.938 s ± 0.012 s [User: 2.850 s, System: 0.090 s]
Range (min … max): 2.919 s … 2.969 s 20 runs
```
2021-01-12 13:21:45 -08:00
François
c434f57de1
use biggest RenderResources instead of first ( #1208 )
2021-01-11 14:28:32 -08:00
Schell Carl Scivally
a6a242cb86
Render Layers ( #1209 )
...
Adds RenderLayers, which enable cameras and entities to opt in to layers that apply to them
2021-01-08 12:45:54 -08:00
Jakob Hellermann
3f2dd22cb5
bevy_render: add torus and capsule shape ( #1223 )
...
* bevy_render: add torus shape
* bevy_render: add capsule shape
* bevy_render: reorganize shape module
* bevy_render: add more docs
2021-01-08 11:39:33 -08:00
Daniel McNab
9f2410a4ac
Add from_xyz
to Transform
( #1212 )
...
* Add the from_xyz helper method to Transform
* Use `from_xyz` where possible
2021-01-06 17:17:06 -08:00
TheRawMeatball
c69aa98a60
Refactor Box<dyn System>
to BoxedSystem ( #1191 )
...
Added BoxedSystem
2021-01-03 12:39:30 -08:00
Restioson
820f37fccf
add convenience function ( #1197 )
2021-01-03 11:57:18 -08:00
MsK`
ca310b856f
New mesh attribute: color ( #1194 )
...
New mesh attribute: color
2021-01-03 11:39:15 -08:00
MsK`
2754a9dde8
Mutable mesh accessors: indices_mut and attribute_mut ( #1164 )
...
mutable mesh accessors: indices_mut and attribute_mut
2020-12-30 15:17:44 -06:00
François
871b47f1c3
let user disable feature png when using only other format ( #1156 )
2020-12-28 15:31:23 -06:00
Nathan Stocks
f574c2c547
Render text in 2D scenes ( #1122 )
...
Render text in 2D scenes
2020-12-27 13:19:03 -06:00
Jakob Hellermann
0a51a26aba
bevy_render: load .spv assets ( #1104 )
...
bevy_render: ShaderLoader can now load spv files
2020-12-23 19:41:34 -06:00
Ryan Lee
acc29ec719
Add bmp as a supported texture format ( #1081 )
2020-12-23 16:53:02 -06:00
Carter Anderson
3b2c6ce49b
release 0.4.0 ( #1093 )
2020-12-19 13:28:00 -06:00
Carter Anderson
841755aaf2
Adopt a Fetch pattern for SystemParams ( #1074 )
2020-12-15 21:57:16 -08:00
Nathan Jeffords
d2e4327b14
update Window
's width
& height
methods to return f32
( #1033 )
...
update `Window`'s `width` & `height` methods to return `f32`
2020-12-13 15:05:56 -08:00
Carter Anderson
509b138e8f
Schedule v2 ( #1021 )
...
Schedule V2
2020-12-12 18:04:42 -08:00
Nathan Jeffords
9239621ffc
add ability to load .dds
, .tga
, and .jpeg
texture formats ( #1038 )
...
add ability to load `.dds`, `.tga`, and `.jpeg` texture formats
2020-12-09 18:34:27 -08:00
James R
4a5bcccde2
Don't panic when attempting to set shader defs from an asset that hasn't loaded yet ( #1035 )
...
Don't panic when attempting to set shader defs from an asset that hasn't loaded yet
2020-12-09 16:34:22 -08:00
Carter Anderson
7ab0eeece0
Break out Visible component from Draw ( #1034 )
...
Break out Visible component from Draw
2020-12-09 13:38:48 -08:00
Corey Farwell
66f972c850
Use shaderc for aarch64-apple-darwin. ( #1027 )
2020-12-09 13:02:43 -08:00
Nathan Jeffords
3d386a77b4
attempt to deal with rounding issue when creating the swap chain ( #997 )
...
attempt to deal with rounding issue when creating the swap chain on high DPI displays
2020-12-07 13:32:57 -08:00
Al M
2c9b7956d1
Live reloading of shaders ( #937 )
...
* Add ShaderLoader, rebuild pipelines for modified shader assets
* New example
* Add shader_update_system, ShaderError, remove specialization assets
* Don't panic on shader compilation failure
2020-12-07 12:32:13 -08:00
François
a3bca7e464
Fix ci ( #1024 )
...
* fix format
* fix clippy
* used fixed nightly
2020-12-07 11:57:15 -08:00
Patrik Buhring
fcbae57489
Update Hexasphere to improve MSRV ( #994 )
...
Assumes hexasphere will follow semver (I will try to make sure it does!)
2020-12-04 10:38:25 -08:00
Carter Anderson
d601eeb829
account for "still loading" textures in RenderResourceNodes ( #1000 )
2020-12-04 10:37:41 -08:00
Carter Anderson
704a116778
fix scene loading ( #988 )
2020-12-03 13:57:36 -08:00
François
59d98de194
naming coherence for cameras ( #995 )
...
naming coherence for cameras
2020-12-03 13:46:15 -08:00
Carter Anderson
7699f8b6db
optimize asset gpu data transfer ( #987 )
2020-12-03 12:39:29 -08:00
Carter Anderson
915024bf35
fix changed meshes ( #984 )
2020-12-02 14:23:49 -08:00
Carter Anderson
ccb31bc949
Optimize Text rendering / SharedBuffers ( #972 )
...
optimize Text rendering / SharedBuffers
2020-12-02 12:38:20 -08:00
Joshua J. Bouw
9f4c8b1b9a
Fix errors and panics to typical Rust conventions ( #968 )
...
Fix errors and panics to typical Rust conventions
2020-12-02 11:31:16 -08:00
Patrik Buhring
f54eb12efc
Fixed Hexasphere versioning. ( #974 )
2020-12-01 21:48:25 -08:00
Carter Anderson
c05c1dc119
hidpi swap chains ( #973 )
...
hidpi swap chains
2020-12-01 20:25:31 -08:00
Carter Anderson
b5ffab7135
Renderer Optimization Round 1 ( #958 )
...
* only update global transforms when they (or their ancestors) have changed
* only update render resource nodes when they have changed (quality check plz)
* only update entity mesh specialization when mesh (or mesh component) has changed
* only update sprite size when changed
* remove stale bind groups
* fix setting size of loading sprites
* store unmatched render resource binding results
* reduce state changes
* cargo fmt + clippy
* remove cached "NoMatch" results when new bindings are added to RenderResourceBindings
* inline current_entity in world_builder
* try creating bind groups even when they havent changed
* render_resources_node: update all entities when resized
* fmt
2020-12-01 13:17:48 -08:00
Patrik Buhring
3da653e4dd
Update Hexasphere & Usage. ( #965 )
2020-11-30 22:25:33 -08:00
Nick
f35f813137
additional vertex attribute value types ( #946 )
2020-11-30 13:05:03 -08:00
Mariusz Kryński
dbf226be49
store PipelineSpecialization.dynamic_bindings in HashSet ( #936 )
2020-11-28 13:10:18 -08:00
Carter Anderson
72b2fc9843
Bevy Reflection ( #926 )
...
Bevy Reflection
2020-11-27 16:39:59 -08:00
dependabot[bot]
8e4eb41757
Update shaderc requirement from 0.6.3 to 0.7.0 ( #823 )
...
Updates the requirements on [shaderc](https://github.com/google/shaderc-rs ) to permit the latest version.
- [Release notes](https://github.com/google/shaderc-rs/releases )
- [Commits](https://github.com/google/shaderc-rs/compare/v0.6.3...v0.7.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-25 18:46:13 -08:00
Duncan
46fac78774
Extend the Texture asset type to support 3D data ( #903 )
...
Extend the Texture asset type to support 3D data
Textures are still loaded from images as 2D, but they can be reshaped
according to how the render pipeline would like to use them.
Also add an example of how this can be used with the texture2DArray uniform type.
2020-11-22 12:04:47 -08:00
Plecra
3a9a5b4e07
fix: update image version ( #911 )
...
into_bgra8 was added in 0.23.12
2020-11-21 19:08:02 -08:00
Valentin
d458406540
Add box shape ( #883 )
...
* Add rectangular cuboid shape
Co-authored-by: Jason Lessard <jason.lessard@usherbrooke.ca>
Co-authored-by: Jason Lessard <jason.lessard@usherbrooke.ca>
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2020-11-21 14:51:24 -08:00
bg
106486bd99
fix deprecation error in image_texture_loader (and CI error) ( #906 )
...
fix deprecation error in image_texture_loader (and CI error)
2020-11-21 12:26:35 -08:00
Vladyslav Batyrenko
d11be437cb
Switch to default PartialEq implementation for RenderResourceBinding ( #877 )
...
* Switch to default PartialEq implementation for RenderResourceBinding
* Move specialized RenderResourceBinding Hash implementation to BindGroupBuilder
2020-11-21 11:52:44 -08:00
bjorn3
d6eb647451
Misc cleanups ( #879 )
...
* Remove cfg!(feature = "metal-auto-capture")
This cfg! has existed since the initial commit, but the corresponding
feature has never been part of Cargo.toml
* Remove unnecessary handle_create_window_events call
* Remove EventLoopProxyPtr wrapper
* Remove unnecessary statics
* Fix unrelated deprecation warning to fix CI
2020-11-17 13:40:18 -08:00
Carter Anderson
3a6f6de277
System Inputs, Outputs, Chaining, and Registration Ergo ( #876 )
...
System Inputs, Outputs, Chaining, and Registration Ergo
2020-11-16 18:18:00 -08:00
rod-salazar
3fca8c60bb
Remove redundant texture copies in TextureCopyNode ( #871 )
...
Remove redundant texture syncs in TextureCopyNode
2020-11-16 16:38:14 -08:00
Julian Heinken
fcf9d525e1
Removed vertex fallback buffer ( #870 )
...
removed fallback buffer
2020-11-16 16:36:57 -08:00
Carter Anderson
7628f4a64e
combine bevy_ecs and bevy_hecs crates. rename XComponents to XBundle ( #863 )
...
combine bevy_ecs and bevy_hecs crates. rename XComponents to XBundle
2020-11-15 20:32:23 -08:00
milkybit
b3541a9a31
Add all basic color constants ( #859 )
...
Add all basic color constants
2020-11-15 12:44:02 -08:00
Joshua J. Bouw
bb4a7392c0
Remove redundant .into
for mesh set_attributes with impl ( #866 )
2020-11-15 12:08:03 -08:00
Mariusz Kryński
515d750004
wasm32: non-spirv shader specialization ( #843 )
...
wasm32: non-spirv shader specialization
2020-11-15 12:07:17 -08:00
Carter Anderson
e03f17ba7f
Log Plugin ( #836 )
...
add bevy_log plugin
2020-11-12 17:23:57 -08:00
Mariusz Kryński
fae628797f
bevy_render: delegate buffer aligning to render_resource_context ( #842 )
2020-11-11 14:08:27 -08:00
Carter Anderson
e769974d6a
query filters ( #834 )
2020-11-10 20:48:34 -08:00
Mariusz Kryński
60fa2d5f93
delegate layout reflection to RenderResourceContext ( #691 )
...
* delegate layout reflection to RenderResourceContext
Also:
* auto-reflect DynamicBindings
* use RenderPipeline::new, update dynamic_bindings
linting.
* add dynamic binding generation
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2020-11-10 13:20:05 -08:00
Carter Anderson
4ef6eb8a85
adjust to new clippy lints ( #826 )
2020-11-09 14:12:42 -08:00
Bram Buurlage
07f07a0736
Added RenderPass::set_scissor_rect ( #815 )
...
Added RenderPass::set_scissor_rect
2020-11-09 13:24:29 -08:00
Carter Anderson
ebcdc9fb8c
Flexible ECS System Params ( #798 )
...
system params can be in any order, faster compiles, remove foreach
2020-11-08 12:34:05 -08:00
Carter Anderson
9224983897
upgrade glam and hexasphere ( #794 )
2020-11-06 17:11:32 -08:00
Carter Anderson
9afe196f16
release: 0.3.0 ( #783 )
2020-11-03 13:34:00 -08:00
Carter Anderson
2e2fa4fef4
make Mesh::attribute() immutable ( #774 )
2020-11-02 22:54:20 -08:00
Nicholas Rishel
53c4c45eca
Use embedded glslang for runtime glsl-to-spirv and add Android example ( #740 )
...
Use embedded glslang for runtime glsl-to-spirv and add Android example
2020-11-02 16:30:30 -08:00
Carter Anderson
44b3e24e32
fix mesh allocation bug and public mesh api improvements ( #768 )
2020-11-02 13:15:07 -08:00
simlay
9cc6368b28
An initial xcode setup for using xcode ( #539 )
...
An example of bevy using xcode
2020-10-31 14:36:24 -07:00
Julian Heinken
4645da30c8
Mesh overhaul with custom vertex attributes #592 ( #599 )
...
Mesh overhaul with custom vertex attributes
2020-10-30 19:21:53 -07:00
Carter Anderson
ad940fbf6e
Rename query.entity() to query.get() and query.get() to query.get_component() ( #752 )
2020-10-30 18:04:33 -07:00
Carter Anderson
1d4a95db62
ecs: ergonomic query.iter(), remove locks, add QuerySets ( #741 )
2020-10-29 23:39:55 -07:00
Alex Hirsch
1b051d3353
Add SamplerDescriptor to Texture ( #399 ) ( #747 )
...
GLTF loader now grabs (some) sampler information from the respective
GLTF sampler struct.
2020-10-29 14:22:45 -07:00
Carter Anderson
f88cfabdde
asset: WasmAssetIo ( #703 )
...
asset: WasmAssetIo
2020-10-19 17:29:31 -07:00
tigregalis
03bc5d7fdd
two-way conversions between Color
-Vec4
and Color
-[f32; 4]
( #688 )
...
two-way conversions between `Color`-`Vec4` and `Color`-`[f32; 4]` - use `impl From` instead of `impl Into`
2020-10-19 12:37:15 -07:00
Carter Anderson
c32e637384
Asset system rework and GLTF scene loading ( #693 )
2020-10-18 13:48:15 -07:00
Marek Legris
5acebed731
Transform and GlobalTransform are now Similarities ( #596 )
...
Transform and GlobalTransform are now Similarities.
This resolves precision errors and simplifies the api
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2020-10-18 13:03:16 -07:00
David Ackerman
7ba45849f3
Add default for texture format ( #675 )
2020-10-16 11:44:31 -07:00
Mariusz Kryński
fccfa12d3b
do not depend on spirv on wasm target ( #689 )
...
do not use spirv for wasm target
2020-10-16 11:12:55 -07:00
François
76cc25823d
can change window settings at runtime ( #644 )
...
can change window settings at runtime
2020-10-15 11:42:19 -07:00
Carter Anderson
5e7c36d1c1
Fix example colors ( #672 )
2020-10-12 16:54:22 -07:00
walterpie
53d6d10506
Register IndexFormat
as a property ( #664 )
2020-10-12 10:22:10 -07:00
Julian Heinken
32b122e1c5
Update color.rs ( #670 )
...
Co-authored-by: Julian Heinken <julian.heinken@gmail.com>
2020-10-12 10:19:06 -07:00
Grayson Burton
354d71cc1f
The Great Debuggening ( #632 )
...
The Great Debuggening
2020-10-08 11:43:01 -07:00
Julian Heinken
a92790c011
sRGB awareness for Color ( #616 )
...
Color is now sRGB aware, added SrgbColorSpace trait for f32
2020-10-08 10:30:23 -07:00
Boutillier
219527ed7d
Iter added camera to update their projection ( #488 )
2020-10-05 10:41:34 -07:00
Carter Anderson
dd07674b59
github actions: use stable clippy ( #577 )
2020-09-25 21:34:47 -07:00
Gray Olson
afc656701d
switch to u32 indices by default ( #572 )
2020-09-25 14:29:30 -07:00
Gray Olson
f7c8882c04
Index buffer specialization ( #568 )
...
index buffer specialization
2020-09-25 12:13:01 -07:00
Carter Anderson
a768bae33b
properly update bind group ids when setting dynamic bindings. ( #560 )
2020-09-23 13:20:14 -07:00
Carter Anderson
74dba5f36b
release: 0.2.1 ( #533 )
2020-09-20 15:58:32 -07:00
Carter Anderson
ba5af4dd56
release: 0.2.0 ( #520 )
2020-09-19 15:29:08 -07:00
Carter Anderson
70ad6671db
ecs: use generational entity ids and other optimizations ( #504 )
...
ecs: use generational entity ids and other optimizations
2020-09-17 17:16:38 -07:00
Marek Legris
474bb5403e
Transform Rewrite ( #374 )
...
Remove individual Translation / Rotation / Scale components in favor of a combined Transform component
2020-09-14 14:00:32 -07:00
Logan Magee
3bc5e4cb1e
render: Export specific items outside of prelude ( #473 )
...
It's a preference of some people to not use prelude modules at all in
order to make their imports more explicit. Currently, items like
`Camera3dComponent` are only exported in a prelude module, making an
explicit import look like
`use bevy::prelude::Camera3dComponent`
which feels a bit hackish. This change doesn't remove such components
from the prelude, but just re-exports them at the crate's
(`bevy_render` in this case) root.
2020-09-11 16:23:21 -07:00
BimDav
4ef18e2608
Resource change tracking ( #388 )
...
* Add mutated tracker on resources and ChangedRes query for added or mutated resources.
* ResMut:::new() now takes a reference to a 'mutated' flag in its archetype.
* Change FetchResource so that get() returns an Option. Systems using Resources will only be called if all fetched Resources are Some(). This is done to implement ChangedRes, which is Some iff the Resource has been changed.
* Add OrRes for a logical or in tuples of Resource queries.
* Separate resource query get() in is_some() and get() methods for clarity
* Remove unneeded unsafe
* Change ResMut::new()
2020-09-10 13:15:02 -07:00
Smite Rust
a9ce7f4e82
update dependencies ( #470 )
2020-09-10 12:54:24 -07:00
Carter Anderson
413caae7bb
resolve errors from latest clippy version
2020-09-07 15:00:03 -07:00
julhe
cc3e99388a
Allowing glTFs to be loaded that don't have uvs and normals ( #406 )
...
allowing gltfs to be loaded that don't have uvs and normals, by filling missing attributes them with zeros
2020-09-03 17:30:10 -07:00
Michael Hills
38a982b28d
iOS: use shaderc-rs for glsl to spirv compilation ( #324 )
2020-09-01 11:06:15 -07:00
wyhaya
8106f770de
Add Color::hex fn ( #362 )
...
Add Color::hex fn
2020-08-30 11:27:37 -07:00
Jasen Borisov
ad460159b0
add bevy_render::pass::ClearColor to prelude ( #396 )
...
It is common for users to want to set their clear color.
2020-08-30 11:20:11 -07:00
Hugo Lindsay
00be5d083e
UI component bundles derive clone ( #390 )
...
make Draw, TextStyle, and the rest of the ui components derive clone
2020-08-29 16:49:39 -07:00
Robbie Davenport
4aabe983ec
Switch usage of std HashMap/HashSet default hasher, to aHash algo ( #258 )
...
switch to ahash for HashMaps and HashSets via a new bevy_utils crate
2020-08-28 17:08:51 -07:00
Patrik Buhring
c40e29bca3
Update icosphere dependency and add a limit to subdivisions. ( #379 )
2020-08-28 16:52:06 -07:00
Guillaume DALLENNE
d64882ffbf
add Color::rgb_u8 and Color::rgba_u8 ( #381 )
2020-08-28 16:50:49 -07:00
Carter Anderson
89a1d360c1
Fix despawn ( #361 )
...
* simplify RenderResourcesNode gpu array management
* support removals in RenderResourcesNode
2020-08-26 23:03:55 -07:00
multun
022a31fd8f
fix formatting / clippy warnings ( #295 )
2020-08-22 18:35:40 -07:00
Carter Anderson
b925e22949
0.1.3 upgrade
2020-08-22 10:16:52 -07:00
Boutillier
4eb437ab2e
Fixes #134 and #135 with a slight hit on performances as get_or_assign_index will now always assign ( #247 )
2020-08-22 09:28:38 -07:00
Carter Anderson
7c3b49cb6f
upgrade to latest wgpu
2020-08-21 18:36:32 -07:00
Lachlan Sneff
1eca55e571
Replace std synchronization primitives with parking_lot ( #210 )
...
* Replace std::sync::Mutex with parking_lot::Mutex
* Replace std::sync::RwLock with parking_lot::RwLock
2020-08-21 14:55:16 -07:00
Boutillier
38d3da5b86
Fix #187 . Multiple return instead of continue inside for loops. ( #230 )
2020-08-20 16:09:04 -07:00
Carter Anderson
1ebb7e44ff
Merge pull request #189 from StarArawn/bind-group-reflect-fix
...
Reflect shader stage for bind groups.
2020-08-20 12:57:38 -07:00
Carter Anderson
e31f576484
Merge pull request #206 from multun/clippy
...
Add clippy support and fix all warnings / errors
2020-08-19 21:33:28 -07:00
John Mitchell
d4d68f6670
Fixed tests.
2020-08-19 10:16:35 -04:00
John Mitchell
f1b0d04e53
Fixed formatting.
2020-08-19 10:00:45 -04:00
John Mitchell
131a5e9167
Merge branch 'master' into bind-group-reflect-fix
2020-08-19 09:24:22 -04:00
Victor "multun" Collod
46636ed076
fix formatting
2020-08-18 19:48:03 -07:00
Carter Anderson
6ffe0696db
Merge pull request #203 from lachlansneff/ironing-out-uniforms
...
Replace vector of UniformProperty with a single UniformProperty
2020-08-18 13:44:10 -07:00
Lachlan Sneff
ccfa815cac
Use can_draw in can_draw_indexed
2020-08-17 10:56:27 -04:00
Lachlan Sneff
e24aaf3dd3
Add Draw command to RenderCommand
2020-08-16 16:28:52 -04:00
Victor "multun" Collod
e36b26c226
render: fix RenderResourceBinding PartialEq impl
2020-08-16 07:20:06 -07:00
Victor "multun" Collod
dfbdeeb27f
render: fix bind group PartialEq impl
2020-08-16 07:20:06 -07:00
Victor "multun" Collod
c38420f1e9
enforce clippy for all target and features
2020-08-16 07:20:06 -07:00
Victor "multun" Collod
d138647818
enforce cargo fmt --check
2020-08-16 05:02:06 -07:00
Lachlan Sneff
9883cd15cd
Replace vector of UniformProperty with a single property
2020-08-16 01:16:00 -04:00
ifletsomeclaire
c0d4877486
added draw.is_visible checks
2020-08-15 14:38:55 -05:00
John Mitchell
e11fa3e316
Added hack to allow all of the examples to work.
2020-08-15 15:03:57 -04:00
John Mitchell
eac53c1ab7
Fixed! 🎉
2020-08-14 23:21:38 -04:00
John Mitchell
76564a486e
Removed old comment.
2020-08-14 16:59:18 -04:00
John Mitchell
f3ef23bda7
Working on correctly reflecting shader stage for bind groups.
2020-08-14 14:02:56 -04:00
Carter Anderson
95dce3ac72
Merge pull request #154 from OptimisticPeach/master
...
Add Icospheres mesh generation
2020-08-13 19:44:50 -07:00
John Mitchell
3f5aae877e
Removed some whitespace.
2020-08-13 13:00:27 -04:00
John Mitchell
02b1907738
Use BindingShaderStage to pass which program the binding is attached to.
2020-08-13 12:44:21 -04:00
OptimisticPeach
86c20eb6df
Add Icospheres.
...
Additionally documents the shapes module.
2020-08-13 00:14:23 -04:00
Cameron Hart
5912206441
Upgrade glam to 0.9.3
2020-08-12 17:31:51 +12:00
caelunshun
58be36a09a
Fix compilation when png or hdr features are disabled
2020-08-11 00:49:17 -06:00
caelunshun
a694d9a1b6
Make audio/image dependencies optional through feature flags
2020-08-11 00:30:42 -06:00
Carter Anderson
3deeb05264
use bevy-glsl-to-spirv
2020-08-09 18:57:17 -07:00
Carter Anderson
34752a27bd
add "0.1" version to all bevy crate references
2020-08-09 17:39:28 -07:00
Carter Anderson
9aee5323e1
add crate metadata
2020-08-09 17:24:27 -07:00
Carter Anderson
3d09459813
add more doc comments and clean up some public exports
2020-08-09 16:13:04 -07:00
Carter Anderson
f963cd41dc
app: rename AppPlugin to Plugin
2020-08-07 20:22:17 -07:00
Carter Anderson
07858aa348
scene: fix dynamically loading RenderPipelines scenes
2020-08-02 19:33:27 -07:00
Carter Anderson
ccf81edd8f
render: add atlas padding support to work around MSAA artifacts, disable MSAA by default
2020-07-30 14:38:13 -07:00
Carter Anderson
54eaa2bdc6
render: easier msaa color attachments and fix multi-window example
2020-07-30 13:20:27 -07:00
Carter Anderson
44c08f90aa
render: remove Drawable implementation from RenderPipelines because it doesnt add any value
2020-07-29 18:28:32 -07:00
Carter Anderson
ca87359c6e
render: add MSAA support
2020-07-29 18:15:15 -07:00
Carter Anderson
db665b96c0
ui: fix z indices and depth calculations
2020-07-29 00:28:44 -07:00
Carter Anderson
2929197d9b
render: add RenderPass queries. move ui to its own pass
2020-07-28 20:11:27 -07:00
Carter Anderson
7212b70478
rustfmt changes
2020-07-28 14:24:03 -07:00
Carter Anderson
6dadf34401
add more example comments
2020-07-28 13:45:36 -07:00
Thomas Herzog
23149f1753
add texture loader for more formats using image
crate
...
This adds support for PNG images only for now. More formats can be added
relatively easily.
Images with various pixel formats are supported (such as RGB-16bit or
R-8bit).
2020-07-27 23:30:31 +02:00
Thomas Herzog
7412b0ec25
add HDR image loader
...
Using the `image` crate, HDR images can be loaded into RGBA-f32 textures.
2020-07-27 11:37:45 +02:00
Thomas Herzog
4cf0f53eae
use TextureFormat for Textures
...
This commit also inserts debug asserts that texture data roughly respects
the format.
2020-07-26 22:08:15 +02:00
Thomas Herzog
b4c185eb0c
cargo fmt
2020-07-26 21:10:18 +02:00
Carter Anderson
93bb1d5b8e
ui: initial flexbox support
2020-07-24 23:04:45 -07:00
Carter Anderson
0c2e26ddde
Revert "ecs: remove &mut requirement on query iterators"
...
This reverts commit 6dc1d07cbc
.
2020-07-21 20:12:15 -07:00
Carter Anderson
6dc1d07cbc
ecs: remove &mut requirement on query iterators
2020-07-20 13:59:51 -07:00
Carter Anderson
b5d3f7e794
use right handed coordinate system in 3d
2020-07-20 01:33:30 -07:00
Carter Anderson
726eb37198
use rh coordinate system in 2d
...
z = 0 is now "farthest back" and z=1000 "farthest forward"
2020-07-19 17:00:08 -07:00
Carter Anderson
cadbb4c1b0
render: fix "next swap chain texture" bug
2020-07-19 16:15:19 -07:00
Carter Anderson
946d5d1024
ecs: refactor resources
...
fixes unintialized global resource memory
2020-07-19 14:23:06 -07:00
Carter Anderson
fe1adb6cf6
ui: focus/click/hover system. initial buttons
2020-07-18 14:08:46 -07:00
Carter Anderson
19fe299f5a
ecs: use Mut<T> tracking pointer everywhere
2020-07-18 02:09:55 -07:00
Carter Anderson
81df34adcf
finish up import simplification
2020-07-16 19:38:21 -07:00
Carter Anderson
f742ce3ef2
app: simplify app imports
2020-07-16 18:47:51 -07:00
Carter Anderson
b12c4d0a48
render: simplify imports and cleanup prelude
2020-07-16 18:26:21 -07:00
Carter Anderson
196bde64e3
cargo fmt
2020-07-16 17:23:50 -07:00
Carter Anderson
1110f9b877
create bevy_math crate and move math types there
2020-07-16 17:11:52 -07:00
Carter Anderson
4712e96aa8
ecs: make parallel executor resource-aware
2020-07-15 17:20:36 -07:00
Carter Anderson
a7bab755ee
ecs: add query get safety checks
2020-07-14 19:05:39 -07:00
Carter Anderson
50335e21e2
derive: allow manually forcing modules to "crate", which prevents the need for ambiguous crates
...
this fixes a failing doc test
2020-07-14 16:16:01 -07:00
Carter Anderson
0dc810a37a
ecs: add thread local system support to parallel executor
2020-07-14 14:19:17 -07:00
Carter Anderson
17f3860d12
remove unsafe Clone implementation on Res/ResMut in favor of UnsafeClone
2020-07-12 12:06:43 -07:00
Carter Anderson
6d58a5a033
render: add direct buffer mapping/unmapping
2020-07-11 12:29:07 -07:00
Carter Anderson
2ca6de2b81
upgrade wgpu
2020-07-10 13:47:31 -07:00
Carter Anderson
2508a59f68
remove darling
2020-07-10 02:53:31 -07:00
Carter Anderson
c81ab99dac
cargo fmt
2020-07-10 01:37:06 -07:00
Carter Anderson
950e50bbb1
Bevy ECS migration
2020-07-10 01:06:21 -07:00
Carter Anderson
5787bcb2c5
legion: upgrade
2020-06-27 14:32:50 -07:00
Carter Anderson
1f12964026
legion: remove foreach system functions
...
this is a bit sad, but upstream legion's new lifetimes appear to be incompatible with our foreach approach
2020-06-27 12:06:12 -07:00
Carter Anderson
981687ae41
remove ui camera now that default 2d camera is identical
2020-06-27 10:21:20 -07:00
Carter Anderson
e75496772e
legion: change query system ordering
2020-06-27 10:18:27 -07:00
Carter Anderson
1e614e41f1
render: make ClearColor a tuple struct
2020-06-26 21:39:30 -07:00
Carter Anderson
a4afa4e7f3
render: only attempt to create camera bind group when the camera bind group descriptor exists
...
this fixes panics in empty scenes
2020-06-26 14:27:22 -07:00
Carter Anderson
69925f0817
render: multi-window cameras ready to go!
...
passes now bind camera buffers and cameras can now be assigned non-primary windows
2020-06-25 23:04:08 -07:00
Carter Anderson
ca4726ea7d
render to second window in multiple_windows example
2020-06-25 16:02:21 -07:00
Carter Anderson
8a8d01aa88
render: add ClearColor resource
2020-06-25 15:24:27 -07:00
Carter Anderson
4a0f8b8869
add root ui node to example
2020-06-25 13:19:48 -07:00
Carter Anderson
92c44320ee
ecs: rename EntityArchetype to ComponentSet
2020-06-25 11:21:56 -07:00
Carter Anderson
1ef4fbf005
ui: rework so Nodes now use transforms and z-sort happens
2020-06-25 10:13:00 -07:00
Carter Anderson
75429f4639
render: use left-handed coordinate system and y-up
2020-06-24 15:29:10 -07:00
Carter Anderson
4ba2f72572
render: is_transparent flag. draw transparent object back-to-front and opaque objects front-to-back
2020-06-24 11:35:01 -07:00
Carter Anderson
2b8fe144a8
render: rename MainPassNode to PassNode
...
there will be more than one and it is suitably generic
2020-06-24 10:29:26 -07:00
Carter Anderson
2c74560283
render: draw in back-to-front mode to be safe (until we can do both at the same time). expand texture example
2020-06-23 19:29:12 -07:00
Carter Anderson
3ee8aa8b0f
camera: make camera transform in world coordinates instead of the inverse
2020-06-23 19:18:32 -07:00
Carter Anderson
41dc8a5967
render: add front-to-back drawing
...
MainPassNodes now have assigned cameras and draw using those camera's VisibleEntities
2020-06-23 16:52:50 -07:00
Carter Anderson
ca8625c407
render: ActiveCameras resource and system
2020-06-23 15:58:06 -07:00
Carter Anderson
2f5f6e017a
render: intitial VisibleEntities component and sort system
2020-06-22 17:55:48 -07:00
Carter Anderson
031a0c6d58
camera: add scale component to camera entities
2020-06-22 13:26:49 -07:00
Carter Anderson
06b2b06e9d
camera: update cameras when windows are created
2020-06-22 13:21:39 -07:00
Carter Anderson
c654987ae3
fix bug where pipelines used unspecialized shaders
2020-06-21 18:55:22 -07:00
Carter Anderson
faacd2778d
sprite: add color to TextureAtlasSprite and make Vec3 16 bytes again to account for glsl UBO layout
2020-06-21 17:43:36 -07:00
Carter Anderson
da3d6983a7
text: immediate-mode atlased text rendering works, but theres no character positioning/layout yet
2020-06-19 13:45:26 -07:00
Carter Anderson
a3c1b7930e
render: fix SharedBuffers render resource context
2020-06-19 13:44:21 -07:00
Carter Anderson
4246d47fec
render: move pipeline compilation and bind group creation into draw stage. impl ResourceSet for DrawContext. progress on text drawing. general cleanup
2020-06-18 17:27:20 -07:00
Carter Anderson
74d0055a3d
render: move dynamic_bindings to PipelineSpecialization
...
This is a temporary step back in ergonomics as we are no longer automatically inferring dynamic bindings from RenderResourceBindings
2020-06-17 18:10:29 -07:00
Carter Anderson
e89c693c4d
render: add SpecializedPipeline and SpecializedShader types
2020-06-17 13:27:10 -07:00
Carter Anderson
e57fdca1bc
render: more progress on immediate mode rendering and DrawableText
2020-06-17 13:10:33 -07:00
Carter Anderson
f4acbdddad
SharedBuffersNode
2020-06-16 22:23:33 -07:00
Carter Anderson
e855995145
cargo fmt
2020-06-15 12:47:35 -07:00
Carter Anderson
8a704a3e28
render: add AssetRenderResourceBindings
2020-06-15 12:45:18 -07:00
Carter Anderson
f799d3ac93
render: add RenderPipeline and begin moving logic there
2020-06-15 00:08:50 -07:00
Carter Anderson
97edaa7343
render: rename ResourceType to RenderResourceType
2020-06-14 15:24:33 -07:00
Carter Anderson
3786224b28
render: replace ResourceInfo with ResourceType
2020-06-14 15:22:31 -07:00
Carter Anderson
574656b767
render: remove RenderResources wrapper type
2020-06-14 12:32:06 -07:00
Carter Anderson
0fec350411
render: rename "Assignment" to "Binding" and "AssignmentSet" to "BindGroup"
2020-06-14 12:02:19 -07:00
Carter Anderson
0f608fc90f
render: add "specific" ids for buffers, textures, and samplers. Use them instead of RenderResourceIds wherever possible
2020-06-14 11:41:42 -07:00
Carter Anderson
5f0363a4f5
render: move more render code into system scheduler
2020-06-13 18:38:25 -07:00
Carter Anderson
eed40fee9c
render: initial SharedBuffer
2020-06-13 18:37:02 -07:00
Carter Anderson
6362b2a516
render: support arbitrary RenderResource byte lengths and temporarily disable RenderResource asset change events
2020-06-13 18:34:50 -07:00
Carter Anderson
8803bcd92e
include buffer range when hashing RenderResourceAssignments
2020-06-11 11:12:23 -07:00
Carter Anderson
fc4160ea41
AssetRenderResourceNodes now consume asset change events. Remove EntitiesWaitingForAssets in favor of DrawState.
2020-06-10 18:54:17 -07:00
Carter Anderson
2e48269923
migrate UniformNode / AssetUniformNode to query system fns
2020-06-10 16:02:50 -07:00
Carter Anderson
3c3449b719
RenderResourceSet builder pattern
2020-06-10 15:45:33 -07:00
Carter Anderson
3d07fbdc81
render: "Immediate Mode" draw api
...
This replaces Renderable with Draw/RenderPipelines components and makes various aspects of the renderer much simpler and legible
2020-06-09 23:16:48 -07:00
Carter Anderson
1426208e2f
remove DrawTargets in favor of PassNodes and in preparation for "immediate mode" drawing api
2020-06-08 14:35:13 -07:00
Carter Anderson
4568f5dae3
remove specialization. bevy now builds on stable rust!
2020-06-07 23:36:39 -07:00