mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 22:50:19 +00:00
e9f52b9dd2
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; ``` |
||
---|---|---|
.. | ||
bevy_app | ||
bevy_asset | ||
bevy_audio | ||
bevy_core | ||
bevy_core_pipeline | ||
bevy_crevice | ||
bevy_derive | ||
bevy_diagnostic | ||
bevy_dylib | ||
bevy_dynamic_plugin | ||
bevy_ecs | ||
bevy_ecs_compile_fail_tests | ||
bevy_gilrs | ||
bevy_gltf | ||
bevy_input | ||
bevy_internal | ||
bevy_log | ||
bevy_macro_utils | ||
bevy_math | ||
bevy_pbr | ||
bevy_reflect | ||
bevy_render | ||
bevy_scene | ||
bevy_sprite | ||
bevy_tasks | ||
bevy_text | ||
bevy_transform | ||
bevy_ui | ||
bevy_utils | ||
bevy_window | ||
bevy_winit |