glslang/Test/spv.fragmentShaderBarycentric2.frag
Pankaj Mistry 559a5f1d82 Fix for bug #3019 : That incorrectly removed perVertexEXT qualifier as arrayed IO
This bug got introduced as part of EXT_mesh_shader changes 228c672
Also updated barycentric test cases to add coverage for multiple pervertexEXT array inputs
2022-09-26 12:47:12 -07:00

22 lines
609 B
GLSL

#version 320 es
#extension GL_NV_fragment_shader_barycentric : require
precision highp float;
layout(location = 0) pervertexNV in float vertexIDs[3];
layout(location = 1) pervertexNV in float vertexIDs2[3];
layout(location = 1) out float value;
void main () {
value = (gl_BaryCoordNoPerspNV.x * vertexIDs[0] +
gl_BaryCoordNoPerspNV.y * vertexIDs[1] +
gl_BaryCoordNoPerspNV.z * vertexIDs[2]);
value += (gl_BaryCoordNoPerspNV.x * vertexIDs2[0] +
gl_BaryCoordNoPerspNV.y * vertexIDs2[1] +
gl_BaryCoordNoPerspNV.z * vertexIDs2[2]);
}