Back to Browse

Using the Mesh2d Depth Texture - Bevy Labs

2.4K views
Aug 23, 2024
16:24

code: https://github.com/rust-adventure/yt-bevy-labs-2d-depth - Mesh2d Tracking issue: https://github.com/bevyengine/bevy/issues/13265 - wgsl inputs/outputs: https://www.w3.org/TR/WGSL/#builtin-inputs-outputs ## Sprite links - https://github.com/bevyengine/bevy/blob/e07119a0f971da2c0eb76a4294d9bf3326d0cf19/crates/bevy_sprite/src/mesh2d/mesh.rs#L121 - https://github.com/bevyengine/bevy/blob/e07119a0f971da2c0eb76a4294d9bf3326d0cf19/crates/bevy_sprite/src/render/mod.rs - https://github.com/bevyengine/bevy/blob/e07119a0f971da2c0eb76a4294d9bf3326d0cf19/crates/bevy_sprite/src/render/sprite.wgsl ## Chapters 00:00 Welcome to Labs 01:01 mesh2d depth buffer 01:39 What is a depth texture? 02:46 the example for today 03:49 z-fighting 05:03 capturing xcode gpu workloads 06:49 starting shader code 07:52 wgsl builtins 08:31 shader output 08:47 sprite.wgsl 09:37 writing depth values in a fragment shader 11:51 xcode gpu workload with depth texture 12:42 sprites don't write to depth texture 13:47 masking transparent alpha values 14:04 example recap 14:57 further work

Download

0 formats

No download links available.

Using the Mesh2d Depth Texture - Bevy Labs | NatokHD