SPIRV-Cross/reference/opt/shaders/frag/barycentric-nv.frag

14 lines
456 B
GLSL
Raw Normal View History

2019-06-13 09:33:19 +00:00
#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];
2019-06-13 09:33:19 +00:00
void main()
{
value = ((vUV[0] * gl_BaryCoordNV.x) + (vUV[1] * gl_BaryCoordNV.y)) + (vUV[2] * gl_BaryCoordNV.z);
value += (((vUV2[0] * gl_BaryCoordNoPerspNV.x) + (vUV2[1] * gl_BaryCoordNoPerspNV.y)) + (vUV2[2] * gl_BaryCoordNoPerspNV.z));
2019-06-13 09:33:19 +00:00
}