alphastrata/shadplay

[BUG] `shaders/myshader_2d.wgsl` does not compile

virtualritz opened this issue · 2 comments

What happened

git clone https://github.com/alphastrata/shadplay.git
cd shadplay
cargo run

** RUSTC **
rustc 1.75.0-nightly (0f44eb32f 2023-11-09)

ERROR

    Finished dev [optimized + debuginfo] target(s) in 3m 26s
     Running `target/debug/shadplay`
2023-11-10T15:07:33.706151Z  WARN bevy_asset::io::source: AssetSourceId::Name(embedded) does not have an AssetWatcher configured. Consider enabling the `file_watcher` feature. Note that Web and Android do not currently support watching assets.
2023-11-10T15:07:33.744283Z  INFO bevy_winit::system: Creating new window "shadplay" (0v0)
2023-11-10T15:07:33.745662Z  INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1.5    
2023-11-10T15:07:34.249962Z  INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 2050", vendor: 4318, device: 9641, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "535.129.03", backend: Vulkan }
2023-11-10T15:07:34.554700Z  WARN naga_oil::compose::parse_imports: item list imports are deprecated, please use `rust::style::item_imports` (or use feature `allow_deprecated`)`
| #import bevy_pbr::utils PI

2023-11-10T15:07:34.554732Z  WARN naga_oil::compose::parse_imports: item list imports are deprecated, please use `rust::style::item_imports` (or use feature `allow_deprecated`)`
| #import bevy_sprite::mesh2d_view_bindings globals 

2023-11-10T15:07:34.554745Z  WARN naga_oil::compose::parse_imports: item list imports are deprecated, please use `rust::style::item_imports` (or use feature `allow_deprecated`)`
| #import shadplay::shader_utils::common NEG_HALF_PI, shader_toy_default, rotate2D

2023-11-10T15:07:34.554761Z  WARN naga_oil::compose::parse_imports: item list imports are deprecated, please use `rust::style::item_imports` (or use feature `allow_deprecated`)`
| #import bevy_render::view  View

2023-11-10T15:07:34.580570Z  INFO shadplay::system::config: Config directory is: /home/moritz/.config/shadplay/config.toml
2023-11-10T15:07:34.580884Z  INFO shadplay::system::config: User's config.toml's screen dims were updated.
2023-11-10T15:07:34.761042Z ERROR bevy_render::render_resource::pipeline_cache: failed to process shader:
error: unknown type: 'MeshVertexOutput'
   ┌─ shaders/myshader_2d.wgsl:16:17
   │
16 │ fn fragment(in: MeshVertexOutput) -> @location(0) vec4<f32> {
   │                 ^^^^^^^^^^^^^^^^ unknown type
   │
   = unknown type: 'MeshVertexOutput'

optional
WGSL

Your shader/example shader code here that causes the issue.

Any files?

fn fragment(in: VertexOutput) -> @location(0) vec4<f32> { just ditch the mesh in that error

pushed a fix for this -- should be good