bevy/crates/bevy_render/src
Isaïe 2356276afd
Clarify error message due to missing shader file (#13766)
# Objective

The error printed-out due to a missing shader file was confusing; This
PR changes the error message.

Fixes #13644 

## Solution

I replaced the confusing wording (`... shader is not loaded yet`) with a
clear explanation (`... shader could not be loaded`)

## Testing

> Did you test these changes? If so, how?

removing `assets/shaders/game_of_life.wgsl` & running its associated
example now produces the following error:

```
thread '<unnamed>' panicked at examples/shader/compute_shader_game_of_life.rs:233:25:
Initializing assets/shaders/game_of_life.wgsl:
Pipeline could not be compiled because the following shader could not be loaded: AssetId<bevy_render::render_resource::shader::Shader>{ index: 0, generation: 0}
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_render::renderer::render_system`!
```

I don't think there are any tests expecting the previous error message,
so this change should not break anything.

> Are there any parts that need more testing?

If there was an intent behind the original message, this might need more
attention.

> How can other people (reviewers) test your changes? Is there anything
specific they need to know?

One should be able to preview the changes by running any example after
deleting/renaming their associated shader(s).

> If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

N/A
2024-06-10 13:15:54 +00:00
..
batching disable gpu preprocessing on android with Adreno 6xx GPU (#13323) 2024-05-30 14:33:27 +00:00
camera Allow mix of hdr and non-hdr cameras to same render target (#13419) 2024-06-06 20:55:05 +00:00
diagnostic Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
mesh Add segments to ExtrusionBuilder (#13719) 2024-06-10 12:50:29 +00:00
primitives Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
render_graph Update render graph docs (#13495) 2024-05-24 21:57:08 +00:00
render_phase Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
render_resource Clarify error message due to missing shader file (#13766) 2024-06-10 13:15:54 +00:00
renderer Update render graph docs (#13495) 2024-05-24 21:57:08 +00:00
texture Allow mix of hdr and non-hdr cameras to same render target (#13419) 2024-06-06 20:55:05 +00:00
view Allow mix of hdr and non-hdr cameras to same render target (#13419) 2024-06-06 20:55:05 +00:00
alpha.rs Implement alpha to coverage (A2C) support. (#12970) 2024-04-15 20:37:52 +00:00
color_operations.wgsl move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
extract_component.rs Fix some nightly Clippy lints (#12927) 2024-04-13 02:05:38 +00:00
extract_instances.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
extract_param.rs Enable the unsafe_op_in_unsafe_fn lint (#11591) 2024-01-28 23:18:11 +00:00
extract_resource.rs Add error when extract resource build fails (#4964) 2024-04-28 05:20:59 +00:00
globals.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
globals.wgsl Refactor Globals and View structs into separate shaders (#7512) 2023-02-11 17:55:18 +00:00
gpu_component_array_buffer.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
lib.rs fix: upgrade to winit v0.30 (#13366) 2024-06-03 13:06:48 +00:00
maths.wgsl add tonemapping LUT bindings for sprite and mesh2d pipelines (#13262) 2024-05-28 12:09:26 +00:00
pipelined_rendering.rs Make AppExit more specific about exit reason. (#13022) 2024-04-22 16:48:18 +00:00
render_asset.rs asset throttling: don't be exhausted if there is no limit (#13112) 2024-04-27 09:00:10 +00:00
settings.rs Update to wgpu 0.19 and raw-window-handle 0.6 (#11280) 2024-01-26 18:14:21 +00:00
spatial_bundle.rs Implement Clone for VisibilityBundle and SpatialBundle (#10394) 2023-11-07 21:25:00 +00:00