You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
356 B

#version 450
#extension GL_NV_fragment_shader_barycentric : require
layout(location = 0) pervertexNV in vertices {
float attrib;
} v[];
layout(location = 1) out float value;
void main () {
value = (gl_BaryCoordNV.x * v[0].attrib +
gl_BaryCoordNV.y * v[1].attrib +
gl_BaryCoordNV.z * v[2].attrib);
}