GLSL: Add missing KHR barycentric references.
This commit is contained in:
parent
50b4d5389b
commit
533aab00b6
13
reference/opt/shaders/frag/barycentric-khr.frag
Normal file
13
reference/opt/shaders/frag/barycentric-khr.frag
Normal file
@ -0,0 +1,13 @@
|
||||
#version 450
|
||||
#extension GL_EXT_fragment_shader_barycentric : require
|
||||
|
||||
layout(location = 0) out vec2 value;
|
||||
layout(location = 0) pervertexEXT in vec2 vUV[3];
|
||||
layout(location = 1) pervertexEXT in vec2 vUV2[3];
|
||||
|
||||
void main()
|
||||
{
|
||||
value = ((vUV[0] * gl_BaryCoordEXT.x) + (vUV[1] * gl_BaryCoordEXT.y)) + (vUV[2] * gl_BaryCoordEXT.z);
|
||||
value += (((vUV2[0] * gl_BaryCoordNoPerspEXT.x) + (vUV2[1] * gl_BaryCoordNoPerspEXT.y)) + (vUV2[2] * gl_BaryCoordNoPerspEXT.z));
|
||||
}
|
||||
|
13
reference/shaders/frag/barycentric-khr.frag
Normal file
13
reference/shaders/frag/barycentric-khr.frag
Normal file
@ -0,0 +1,13 @@
|
||||
#version 450
|
||||
#extension GL_EXT_fragment_shader_barycentric : require
|
||||
|
||||
layout(location = 0) out vec2 value;
|
||||
layout(location = 0) pervertexEXT in vec2 vUV[3];
|
||||
layout(location = 1) pervertexEXT in vec2 vUV2[3];
|
||||
|
||||
void main()
|
||||
{
|
||||
value = ((vUV[0] * gl_BaryCoordEXT.x) + (vUV[1] * gl_BaryCoordEXT.y)) + (vUV[2] * gl_BaryCoordEXT.z);
|
||||
value += (((vUV2[0] * gl_BaryCoordNoPerspEXT.x) + (vUV2[1] * gl_BaryCoordNoPerspEXT.y)) + (vUV2[2] * gl_BaryCoordNoPerspEXT.z));
|
||||
}
|
||||
|
11
shaders/frag/barycentric-khr.frag
Normal file
11
shaders/frag/barycentric-khr.frag
Normal file
@ -0,0 +1,11 @@
|
||||
#version 450
|
||||
#extension GL_EXT_fragment_shader_barycentric : require
|
||||
|
||||
layout(location = 0) out vec2 value;
|
||||
layout(location = 0) pervertexEXT in vec2 vUV[3];
|
||||
layout(location = 1) pervertexEXT in vec2 vUV2[3];
|
||||
|
||||
void main () {
|
||||
value = gl_BaryCoordEXT.x * vUV[0] + gl_BaryCoordEXT.y * vUV[1] + gl_BaryCoordEXT.z * vUV[2];
|
||||
value += gl_BaryCoordNoPerspEXT.x * vUV2[0] + gl_BaryCoordNoPerspEXT.y * vUV2[1] + gl_BaryCoordNoPerspEXT.z * vUV2[2];
|
||||
}
|
Loading…
Reference in New Issue
Block a user