Avoid using `tan` as identifier in shaders.

This conflicts with the tan() function, currently only on macOS.
pull/252/merge
whitequark 2018-07-12 11:40:51 +00:00
parent f37881a2e3
commit 20a4a2b23f
3 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@ const float feather = 0.5;
attribute vec3 pos;
attribute vec3 loc;
attribute vec3 tan;
attribute vec3 tgt;
uniform mat4 modelview;
uniform mat4 projection;
@ -21,7 +21,7 @@ void main() {
vec3 dir = vec3(modelview[0].z, modelview[1].z, modelview[2].z);
// calculate line contour extension basis for constant width and caps
vec3 norm = normalize(cross(tan, dir));
vec3 norm = normalize(cross(tgt, dir));
norm = normalize(norm - dir * dot(dir, norm));
vec3 perp = normalize(cross(dir, norm));

View File

@ -11,7 +11,7 @@ const float feather = 0.5;
attribute vec3 pos;
attribute vec4 loc;
attribute vec3 tan;
attribute vec3 tgt;
attribute vec3 nol;
attribute vec3 nor;
@ -40,7 +40,7 @@ void main() {
(mode == EMPHASIZED_WITHOUT_CONTOUR && isTagged && !isOutline));
// calculate line contour extension basis for constant width and caps
vec3 norm = normalize(cross(tan, dir));
vec3 norm = normalize(cross(tgt, dir));
norm = normalize(norm - dir * dot(dir, norm));
vec3 perp = normalize(cross(dir, norm));

View File

@ -453,7 +453,7 @@ void EdgeRenderer::Init(const StippleAtlas *a) {
{
{ ATTRIB_POS, "pos" },
{ ATTRIB_LOC, "loc" },
{ ATTRIB_TAN, "tan" }
{ ATTRIB_TAN, "tgt" }
}
);
}
@ -638,7 +638,7 @@ void OutlineRenderer::Init(const StippleAtlas *a) {
{
{ ATTRIB_POS, "pos" },
{ ATTRIB_LOC, "loc" },
{ ATTRIB_TAN, "tan" },
{ ATTRIB_TAN, "tgt" },
{ ATTRIB_NOL, "nol" },
{ ATTRIB_NOR, "nor" }
}