diff --git a/src/voxel_pipeline/compute/mod.rs b/src/voxel_pipeline/compute/mod.rs index 91b55da..5e52e39 100644 --- a/src/voxel_pipeline/compute/mod.rs +++ b/src/voxel_pipeline/compute/mod.rs @@ -22,11 +22,22 @@ pub struct ComputeResourcesPlugin; impl Plugin for ComputeResourcesPlugin { fn build(&self, app: &mut App) { - embedded_asset!(app, "src/", "animation.wgsl"); - embedded_asset!(app, "src/", "automata.wgsl"); - embedded_asset!(app, "src/", "clear.wgsl"); - embedded_asset!(app, "src/", "physics.wgsl"); - embedded_asset!(app, "src/", "rebuild.wgsl"); + #[cfg(any(not(target_family = "windows"), target_env = "gnu"))] + { + embedded_asset!(app, "src/", "animation.wgsl"); + embedded_asset!(app, "src/", "automata.wgsl"); + embedded_asset!(app, "src/", "clear.wgsl"); + embedded_asset!(app, "src/", "physics.wgsl"); + embedded_asset!(app, "src/", "rebuild.wgsl"); + } + #[cfg(all(target_family = "windows", not(target_env = "gnu")))] + { + embedded_asset!(app, "src\\", "animation.wgsl"); + embedded_asset!(app, "src\\", "automata.wgsl"); + embedded_asset!(app, "src\\", "clear.wgsl"); + embedded_asset!(app, "src\\", "physics.wgsl"); + embedded_asset!(app, "src\\", "rebuild.wgsl"); + } } fn finish(&self, app: &mut App) { diff --git a/src/voxel_pipeline/trace/mod.rs b/src/voxel_pipeline/trace/mod.rs index 211b0ac..f7f83f4 100644 --- a/src/voxel_pipeline/trace/mod.rs +++ b/src/voxel_pipeline/trace/mod.rs @@ -24,7 +24,14 @@ pub struct TracePlugin; impl Plugin for TracePlugin { fn build(&self, app: &mut App) { - embedded_asset!(app, "src/", "trace.wgsl"); + #[cfg(any(not(target_family = "windows"), target_env = "gnu"))] + { + embedded_asset!(app, "src/", "trace.wgsl"); + } + #[cfg(all(target_family = "windows", not(target_env = "gnu")))] + { + embedded_asset!(app, "src\\", "trace.wgsl"); + } load_internal_asset!(app, COMMON_HANDLE, "common.wgsl", Shader::from_wgsl); load_internal_asset!(app, BINDINGS_HANDLE, "bindings.wgsl", Shader::from_wgsl);