spv.fragmentShaderBarycentric2.frag 384 B

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