Files
Eclipse-Shader/shaders/dimensions/all_solid.tes
T

76 lines
2.0 KiB
Plaintext

layout (triangles, fractional_odd_spacing, ccw) in;
#include "/lib/settings.glsl"
in vec4 color[];
in float VanillaAO[];
in vec4 lmtexcoord[];
in vec4 normalMat[];
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
in vec4 texcoordam[]; // .st for add, .pq for mul
in vec2 texcoord[];
out vec4 vtexcoordam; // .st for add, .pq for mul
out vec2 vtexcoord;
#endif
#ifdef MC_NORMAL_MAP
in vec4 tangent[];
#endif
flat in float blockID[];
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES && defined WORLD
in vec4 grassSideCheck[];
out vec4 vgrassSideCheck;
in vec3 centerPosition[];
out vec3 vcenterPosition;
#endif
out vec4 vcolor;
out float vVanillaAO;
out vec4 vlmtexcoord;
out vec4 vnormalMat;
#ifdef MC_NORMAL_MAP
out vec4 vtangent;
#endif
flat out float vblockID;
#define calcTessellation(u, v, w) (gl_TessCoord.x * u + gl_TessCoord.y * v + gl_TessCoord.z * w)
void main() {
gl_Position = calcTessellation(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_in[2].gl_Position);
vcolor = color[0];
vVanillaAO = calcTessellation(VanillaAO[0], VanillaAO[1], VanillaAO[2]);
vlmtexcoord = calcTessellation(lmtexcoord[0], lmtexcoord[1], lmtexcoord[2]);
vnormalMat.rgb = calcTessellation(normalMat[0].rgb, normalMat[1].rgb, normalMat[2].rgb);
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
vtexcoordam = calcTessellation(texcoordam[0], texcoordam[1], texcoordam[2]);
vtexcoord = calcTessellation(texcoord[0], texcoord[1], texcoord[2]);
#endif
#ifdef MC_NORMAL_MAP
vtangent = calcTessellation(tangent[0], tangent[1], tangent[2]);
#endif
vnormalMat.a = normalMat[0].a;
vblockID = blockID[0];
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES && defined WORLD
vgrassSideCheck = grassSideCheck[0];
vcenterPosition = centerPosition[0];
#endif
}