Open splashdust opened 1 day ago
when I use bevy_voxel_world plugin with Bevy's SSAO,it crash too.(Windows platform)
2024-12-02T16:31:44.652852Z ERROR wgpu_core::device::global: Device::create_render_pipeline error: Error matching ShaderStages(VERTEX) shader requirements against the pipeline
2024-12-02T16:31:44.653235Z ERROR wgpu::backend::wgpu_core: Handling wgpu errors as fatal by default
thread 'Async Compute Task Pool (0)' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-23.0.1/src/backend/wgpu_core.rs:1102:18:
wgpu error: Validation Error
Caused by:
In Device::create_render_pipeline, label = 'pbr_prepass_pipeline'
Error matching ShaderStages(VERTEX) shader requirements against the pipeline
Location[3] Float32x3 interpolated as Some(Perspective) with sampling Some(Center) is not provided by the previous stage outputs
Input is not provided by the earlier stage in the pipeline
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_render::render_resource::pipeline_cache::PipelineCache::process_pipeline_queue_system`!
thread '<unnamed>' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.15.0/src/render_resource/pipeline_cache.rs:580:28:
index out of bounds: the len is 0 but the index is 11
Encountered a panic in system `bevy_render::renderer::render_system`!
I want read the vertex shader in the pbr_prepass_pipeline,but I don't know how to find it,Does anybody can teach me?
Bevy version
0.15
[Optional] Relevant system information
Rust version: 1.83
Problem
Since updating to Bevy 0.15, my plugin no longer runs on macOS. The plugin is using
ExtendedMaterial
with a custom shader and one extra vertex attribute.The application crashes immediately on startup with the following error:
It looks like some UVs are being supplied to the shader as vec3 instead of vec2, and I can't figure out why. When the mesh is created, I'm only inserting
[f32; 2]
UV entries.Other than that, I haven't been able to isolate the problem, but it goes away if I just remove the UV data from the mesh and buffer layout. Also, it seems to be related to
ExtendedMaterial
, because using a different material with the same meshes and layout works, so I think the issue is happening in the pbr pipeline.It's possible that the error is somewhere in my code, but the fact that it only happens on macOS (with metal backend) causes me to suspect that it's an upstream issue. I was not able to reproduce the issue in Bevys extended_material example though, so it's likely being caused by some combination of things.
Additional information
The issue can be reproduced by running the
noise_terrain
example (or any example exceptcustom_material
) in https://github.com/splashdust/bevy_voxel_worldThe
custom_material
example does not useExtendedMaterial
and does not cause the error to happen.