SPIRV-Cross/shaders/frag/barycentric-nv.frag
2021-06-30 16:27:46 +02:00

12 lines
444 B
GLSL

#version 450
#extension GL_NV_fragment_shader_barycentric : require
layout(location = 0) out vec2 value;
layout(location = 0) pervertexNV in vec2 vUV[3];
layout(location = 1) pervertexNV in vec2 vUV2[3];
void main () {
value = gl_BaryCoordNV.x * vUV[0] + gl_BaryCoordNV.y * vUV[1] + gl_BaryCoordNV.z * vUV[2];
value += gl_BaryCoordNoPerspNV.x * vUV2[0] + gl_BaryCoordNoPerspNV.y * vUV2[1] + gl_BaryCoordNoPerspNV.z * vUV2[2];
}