Commit graph

80 commits

Author SHA1 Message Date
Robert Swain
44df4c1fae Better depth biases (#23)
* 3d_scene_pipelined: Use a shallower directional light angle to provoke acne

* cornell_box_pipelined: Remove bias tweaks

* bevy_pbr2: Simplify shadow biases by moving them to linear depth
2021-07-24 16:43:37 -07:00
Jakob Hellermann
30b8324672 expose subgraph iterator (#25) 2021-07-24 16:43:37 -07:00
John
7bbeb11ed7 Fixed issue with how texture arrays were uploaded with write_texture. (#24) 2021-07-24 16:43:37 -07:00
Carter Anderson
be8d67d0b0 switch sprites back to wgsl shader 2021-07-24 16:43:37 -07:00
Carter Anderson
e0205019ef fmt + clippy 2021-07-24 16:43:37 -07:00
Carter Anderson
3542ddcd0c add glsl support 2021-07-24 16:43:37 -07:00
Robert Swain
326b20643f Directional light and shadow (#6)
Directional light and shadow
2021-07-24 16:43:37 -07:00
James Liu
a2cac6a0d5 Small Fixes (#20)
* Fix writing less than the full capacity to the staging buffer

* Add missing TrackedRenderPass::draw command
2021-07-24 16:43:37 -07:00
Carter Anderson
ac6b27925e fix clippy 2021-07-24 16:43:37 -07:00
Carter Anderson
bc769d9641 omni light -> point light 2021-07-24 16:43:37 -07:00
Jonas Matser
4099ef6aa2 Omnilight shadow map wgsl (#15) 2021-07-24 16:43:37 -07:00
Robert Swain
858065ef8d Do not queue sprites/meshes if there are no views (#13)
* bevy_sprite2/_pbr2: Do not queue sprites/meshes if there are no views
2021-07-24 16:43:37 -07:00
Robert Swain
a9937190cd bevy_pbr2: pbr.wgsl: Fix the orthographic projection check (#17) 2021-07-24 16:43:37 -07:00
bilsen
e1e4055a51 Allows resizing of windows (#8) 2021-07-24 16:43:37 -07:00
John
5d0655f84c Fixed issue where transform buffer wasn't creating new bindings on resize. (#7) 2021-07-24 16:43:37 -07:00
Robert Swain
7c57725a63 bevy_render2/bevy_pbr2: Update to wgpu 0.9 / naga 0.5 (#19) 2021-07-24 16:43:37 -07:00
Robert Swain
3f70f92bff wgsl PBR fixes (#12)
bevy_pbr2: Fix light uniforms
2021-07-24 16:43:37 -07:00
TheRawMeatball
7792b29aa4 Force main thread for prepare_windows system (#11)
Force main thread for prepare_windows system
2021-07-24 16:43:37 -07:00
Carter Anderson
61c8475069 Begin WGSL port (sprites work, pbr lights are broken) 2021-07-24 16:43:37 -07:00
Robert Swain
b1a91a823f bevy_pbr2: Add support for most of the StandardMaterial textures (#4)
* bevy_pbr2: Add support for most of the StandardMaterial textures

Normal maps are not included here as they require tangents in a vertex attribute.

* bevy_pbr2: Ensure RenderCommandQueue is ready for PbrShaders init

* texture_pipelined: Add a light to the scene so we can see stuff

* WIP bevy_pbr2: back to front sorting hack

* bevy_pbr2: Uniform control flow for texture sampling in pbr.frag

From 'fintelia' on the Bevy Render Rework Round 2 discussion:

"My understanding is that GPUs these days never use the "execute both branches
and select the result" strategy. Rather, what they do is evaluate the branch
condition on all threads of a warp, and jump over it if all of them evaluate to
false. If even a single thread needs to execute the if statement body, however,
then the remaining threads are paused until that is completed."

* bevy_pbr2: Simplify texture and sampler names

The StandardMaterial_ prefix is no longer needed

* bevy_pbr2: Match default 'AmbientColor' of current bevy_pbr for now

* bevy_pbr2: Convert from non-linear to linear sRGB for the color uniform

* bevy_pbr2: Add pbr_pipelined example

* Fix view vector in pbr frag to work in ortho

* bevy_pbr2: Use a 90 degree y fov and light range projection for lights

* bevy_pbr2: Add AmbientLight resource

* bevy_pbr2: Convert PointLight color to linear sRGB for use in fragment shader

* bevy_pbr2: pbr.frag: Rename PointLight.projection to view_projection

The uniform contains the view_projection matrix so this was incorrect.

* bevy_pbr2: PointLight is an OmniLight as it has a radius

* bevy_pbr2: Factoring out duplicated code

* bevy_pbr2: Implement RenderAsset for StandardMaterial

* Remove unnecessary texture and sampler clones

* fix comment formatting

* remove redundant Buffer:from

* Don't extract meshes when their material textures aren't ready

* make missing textures in the queue step an error

Co-authored-by: Aevyrie <aevyrie@gmail.com>
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2021-07-24 16:43:37 -07:00
Carter Anderson
25de2d1819 Port Mesh to RenderAsset, add Slab and FrameSlabMap garbage collection for Bind Groups 2021-07-24 16:43:37 -07:00
Carter Anderson
3ef951dcbc RenderAssetPlugin 2021-07-24 16:43:37 -07:00
Carter Anderson
09043b66ce fix tracing and add graph spans 2021-07-24 16:43:37 -07:00
Carter Anderson
13ca00178a bevy_render now uses wgpu directly 2021-07-24 16:43:37 -07:00
Robert Swain
01116b1fdb StandardMaterial flat values (#3)
StandardMaterial flat values
2021-07-24 16:43:37 -07:00
Carter Anderson
3400fb4e61 SubGraphs, Views, Shadows, and more 2021-07-24 16:43:37 -07:00
StarArawn
9588bb3243 Reverted combining of set_bind_group between different passes. 2021-07-24 16:43:37 -07:00
StarArawn
a0347195c0 Share code between passes for setting bind groups.
Renamed PipelineDescriptor to RenderPipelineDescriptor
2021-07-24 16:43:37 -07:00
StarArawn
cdf06ea293 Added compute to the new pipelined renderer. 2021-07-24 16:43:37 -07:00
Carter Anderson
4ac2ed7cc6 pipelined rendering proof of concept 2021-07-24 16:43:37 -07:00