fragment.wgsl 283 B

1234567891011
  1. use bevy::prelude::*;
  2. struct FragmentInput {
  3. [[location(0)]] position: Vec2,
  4. [[location(1)]] color: Vec3,
  5. }
  6. #[stage(fragment)]
  7. fn main([[location(0)]] input: FragmentInput) -> [[location(0)]] Vec4 {
  8. return Vec4::new(input.color.x, input.color.y, input.color.z, 1.0);
  9. }