Skip to content

Shader compilation issue when vertex output and fragment input are mismatched #1549

@bghgary

Description

@bghgary

Before BabylonJS/Babylon.js#17161 was merged, the vertex output of the particle shader had an extra vPositionW varying that is not used by the fragment shader. For some strange reason, glslang and SPIRV-Cross in the D3D11 shader compiler code will create structs for the vertex output and pixel input that are mismatched. The vUV will be mapped to TEXCOORD2 for the output of the vertex shader while being mapped to TEXCOORD1 for the input of the pixel shader. This is mitigated by the changes in the PR to remove the unused varying on the JS side which is bad anyways, but there is a problem here that might be worth investigating at some point.

Related: #1041 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions