gfx-rs / naga

Universal shader translation in Rust

Home Page:https://github.com/gfx-rs/wgpu/tree/trunk/naga

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WGSL shader parsing error: wrong number of arguments: expected 3..5, found 5

FreddyFunk opened this issue · comments

commented

Here is the WGSL fragment shader using a textureSample on a 3D texture:

@group(0) @binding(0)
var t_diffuse: texture_3d<f32>;
@group(0)@binding(1)
var s_diffuse: sampler;

@fragment
fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
    return textureSample(t_diffuse, s_diffuse, 0.5, 0.5, 0.5);
}

Validating the shader using naga shader.wgsl fails like this:
Screenshot 2023-06-25 at 22 57 48