From 50ad9ef6bcb496693e79be89abac28fc3f46a1ba Mon Sep 17 00:00:00 2001 From: Arkitu <85173315+Arkitu@users.noreply.github.com> Date: Sun, 20 Jul 2025 11:54:19 +0200 Subject: [PATCH] fix things --- crates/bevy_mikktspace/src/generated.rs | 2 +- crates/bevy_pbr/src/pbr_material.rs | 11 +++++------ rust-toolchain.toml | 2 ++ 3 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/crates/bevy_mikktspace/src/generated.rs b/crates/bevy_mikktspace/src/generated.rs index a726eb5bc8..b246b9668d 100644 --- a/crates/bevy_mikktspace/src/generated.rs +++ b/crates/bevy_mikktspace/src/generated.rs @@ -756,7 +756,7 @@ unsafe fn CompareSubGroups(mut pg1: *const SSubGroup, mut pg2: *const SSubGroup) return false; } while i < (*pg1).iNrFaces as usize && bStillSame { - bStillSame = if (*pg1).pTriMembers[i] == (*pg2).pTriMembers[i] { + bStillSame = if (&(*pg1).pTriMembers)[i] == (&(*pg2).pTriMembers)[i] { true } else { false diff --git a/crates/bevy_pbr/src/pbr_material.rs b/crates/bevy_pbr/src/pbr_material.rs index c3867c9890..3a57779a90 100644 --- a/crates/bevy_pbr/src/pbr_material.rs +++ b/crates/bevy_pbr/src/pbr_material.rs @@ -1205,8 +1205,7 @@ impl AsBindGroupShaderType for StandardMaterial { bitflags! { /// The pipeline key for `StandardMaterial`, packed into 64 bits. - #[repr(C)] - #[derive(Clone, Copy, PartialEq, Eq, Hash, bytemuck::Pod, bytemuck::Zeroable)] + #[derive(Clone, Copy, PartialEq, Eq, Hash)] pub struct StandardMaterialKey: u64 { const CULL_FRONT = 0x000001; const CULL_BACK = 0x000002; @@ -1373,7 +1372,7 @@ impl From<&StandardMaterial> for StandardMaterialKey { impl Material for StandardMaterial { fn fragment_shader() -> ShaderRef { - shader_ref(bevy_asset::embedded_path!("render/pbr.wgsl")) + PBR_SHADER_HANDLE.into() } #[inline] @@ -1409,11 +1408,11 @@ impl Material for StandardMaterial { } fn prepass_fragment_shader() -> ShaderRef { - shader_ref(bevy_asset::embedded_path!("render/pbr_prepass.wgsl")) + PBR_PREPASS_SHADER_HANDLE.into() } fn deferred_fragment_shader() -> ShaderRef { - shader_ref(bevy_asset::embedded_path!("render/pbr.wgsl")) + PBR_SHADER_HANDLE.into() } #[cfg(feature = "meshlet")] @@ -1432,7 +1431,7 @@ impl Material for StandardMaterial { } fn specialize( - _pipeline: &MaterialPipeline, + _pipeline: &MaterialPipeline, descriptor: &mut RenderPipelineDescriptor, _layout: &MeshVertexBufferLayoutRef, key: MaterialPipelineKey, diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000000..271800cb2f --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "nightly" \ No newline at end of file