Skip to content

compile fragment shader fail. #2

@yukunxie

Description

@yukunxie

The following code snippet comes from //github.com/austinEng/webgpu-samples.git, but when I compile it with glslang, it's failed with the error "Glslang.JS: Could not compile shader"

#version 450
layout(set = 0, binding = 1) uniform sampler mySampler;
layout(set = 0, binding = 2) uniform texture2D myTexture;

layout(location = 0) in vec2 fragUV;
layout(location = 1) in vec4 fragPosition;
layout(location = 0) out vec4 outColor;

void main() {
    outColor =  texture(sampler2D(myTexture, mySampler), fragUV) * fragPosition;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions