Open
Description
Bevy version
0.15.0
[Optional] Relevant system information
AdapterInfo { name: "AMD Radeon RX 6600 (RADV NAVI23)", vendor: 4098, device: 29695, device_type: DiscreteGpu, driver: "radv", driver_info: "Mesa 24.2.8", backend: Vulkan }
What you did
I tried to use the following shader:
#import bevy_pbr::forward_io::VertexOutput
@fragment
fn fragment(
mesh: VertexOutput
) -> @location(0) vec4<f32> {
let uv = mesh.uv * 40;
let u_fract = modf(uv.x).fract;
let v_fract = modf(uv.y).fract;
let u = step(0.99, u_fract);
let v = step(0.99, v_fract);
return vec4(0.0, 0.0, 0.0, max(u, v));
}
What went wrong
2024-12-29T07:41:28.067671Z ERROR bevy_render::render_resource::pipeline_cache: failed to process shader:
error: failed to build a valid final module: Entry point fragment at Fragment is invalid
┌─ grid_material.wgsl:9:19
│
9 │ let v_fract = modf(uv.y).fract;
│ ^^^^ naga::Expression [7]
│
= Expression [7] is invalid
= Type resolution failed
= Special type is not registered within the module