bevy/crates/bevy_pbr/src
robtfm 452821dd52
more robust gpu image use (#12606)
# Objective

make morph targets and tonemapping more tolerant of delayed image
loading.

neither of these actually fail currently unless using a bespoke loader
(and even then it would be rare), but i am working on adding throttling
for asset gpu uploads (as a stopgap until we can do proper asset
streaming) and they break with that.

## Solution

when a mesh with morph targets is uploaded to the gpu, the prepare
function uploads the morph target texture if it's available, otherwise
it uploads without morph targets. this is generally fine as long as
morph targets are typically loaded from bytes (in gltf loader), but may
fail for a custom loader if the asset server async-loads the target
texture and the texture is not available yet. the mesh fails to render
and doesn't update when the image is loaded
-> if morph targets are specified but not ready yet, retry mesh upload
next frame

tonemapping `unwrap`s on the lookup table image. this is never a problem
since the image is added via `include_bytes!`, but could be a problem in
future with asset gpu throttling/streaming.
-> if the lookup texture is not yet available, use a fallback
-> in the node, check if the fallback was used before caching the bind
group
2024-04-07 17:18:58 +00:00
..
deferred Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
light Moving structs PointLight, SpotLight, and DirectionalLight out of light/mod.rs (#12656) 2024-03-23 02:16:07 +00:00
light_probe Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
lightmap Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
meshlet Relax BufferVec's type constraints (#12866) 2024-04-05 02:11:41 +00:00
prepass Micro-optimize queue_material_meshes, primarily to remove bit manipulation. (#12791) 2024-04-01 21:58:53 +00:00
render more robust gpu image use (#12606) 2024-04-07 17:18:58 +00:00
ssao Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bundle.rs Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00
extended_material.rs Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
fog.rs Migrate from LegacyColor to bevy_color::Color (#12163) 2024-02-29 19:35:12 +00:00
lib.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
material.rs Micro-optimize queue_material_meshes, primarily to remove bit manipulation. (#12791) 2024-04-01 21:58:53 +00:00
parallax.rs bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
pbr_material.rs Pack the StandardMaterialKey into a single scalar instead of a structure. (#12783) 2024-03-29 18:34:27 +00:00
wireframe.rs Intern mesh vertex buffer layouts so that we don't have to compare them over and over. (#12216) 2024-03-01 20:56:21 +00:00