bevy/crates/bevy_render/src/render_resource
Carter Anderson e9f52b9dd2 Move import_path definitions into shader source (#3976)
This enables shaders to (optionally) define their import path inside their source. This has a number of benefits:

1. enables users to define their own custom paths directly in their assets
2. moves the import path "close" to the asset instead of centralized in the plugin definition, which seems "better" to me. 
3. makes "internal hot shader reloading" way more reasonable (see #3966)
4. logically opens the door to importing "parts" of a shader by defining "import_path blocks".

```rust
#define_import_path bevy_pbr::mesh_struct

struct Mesh {
    model: mat4x4<f32>;
    inverse_transpose_model: mat4x4<f32>;
    // 'flags' is a bit field indicating various options. u32 is 32 bits so we have up to 32 options.
    flags: u32;
};

let MESH_FLAGS_SHADOW_RECEIVER_BIT: u32 = 1u;
```
2022-02-18 21:54:03 +00:00
..
bind_group.rs Replace old renderer with new renderer (#3312) 2021-12-14 03:58:23 +00:00
bind_group_layout.rs Replace old renderer with new renderer (#3312) 2021-12-14 03:58:23 +00:00
buffer.rs small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
buffer_vec.rs Add 2d meshes and materials (#3460) 2022-01-08 01:29:08 +00:00
mod.rs bevy_render: Use RenderDevice to get limits/features and expose AdapterInfo (#3931) 2022-02-16 21:17:37 +00:00
pipeline.rs doc: remove mention of void return type in entry_point docs (#3881) 2022-02-07 22:07:43 +00:00
pipeline_cache.rs Proper prehashing (#3963) 2022-02-18 03:26:01 +00:00
pipeline_specializer.rs Replace old renderer with new renderer (#3312) 2021-12-14 03:58:23 +00:00
shader.rs Move import_path definitions into shader source (#3976) 2022-02-18 21:54:03 +00:00
texture.rs Fix doc_markdown lints in bevy_render (#3479) 2022-01-09 11:09:46 +00:00
uniform_vec.rs Prepare crevice for vendored release (#3394) 2021-12-23 22:49:12 +00:00