bevy/crates/bevy_pbr/src
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
..
render Move import_path definitions into shader source (#3976) 2022-02-18 21:54:03 +00:00
alpha.rs Replace old renderer with new renderer (#3312) 2021-12-14 03:58:23 +00:00
bundle.rs bevy_gltf: Add support for loading lights (#3506) 2022-01-03 07:59:25 +00:00
lib.rs fix: only init_resource() once for AmbientLight (#3853) 2022-02-03 00:43:37 +00:00
light.rs small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
material.rs small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
pbr_material.rs small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
wireframe.rs Add headless mode (#3439) 2022-01-08 10:39:43 +00:00