Avoid using `tan` as identifier in shaders.
This conflicts with the tan() function, currently only on macOS.pull/252/merge
parent
f37881a2e3
commit
20a4a2b23f
|
@ -7,7 +7,7 @@ const float feather = 0.5;
|
||||||
|
|
||||||
attribute vec3 pos;
|
attribute vec3 pos;
|
||||||
attribute vec3 loc;
|
attribute vec3 loc;
|
||||||
attribute vec3 tan;
|
attribute vec3 tgt;
|
||||||
|
|
||||||
uniform mat4 modelview;
|
uniform mat4 modelview;
|
||||||
uniform mat4 projection;
|
uniform mat4 projection;
|
||||||
|
@ -21,7 +21,7 @@ void main() {
|
||||||
vec3 dir = vec3(modelview[0].z, modelview[1].z, modelview[2].z);
|
vec3 dir = vec3(modelview[0].z, modelview[1].z, modelview[2].z);
|
||||||
|
|
||||||
// calculate line contour extension basis for constant width and caps
|
// 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));
|
norm = normalize(norm - dir * dot(dir, norm));
|
||||||
vec3 perp = normalize(cross(dir, norm));
|
vec3 perp = normalize(cross(dir, norm));
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ const float feather = 0.5;
|
||||||
|
|
||||||
attribute vec3 pos;
|
attribute vec3 pos;
|
||||||
attribute vec4 loc;
|
attribute vec4 loc;
|
||||||
attribute vec3 tan;
|
attribute vec3 tgt;
|
||||||
attribute vec3 nol;
|
attribute vec3 nol;
|
||||||
attribute vec3 nor;
|
attribute vec3 nor;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ void main() {
|
||||||
(mode == EMPHASIZED_WITHOUT_CONTOUR && isTagged && !isOutline));
|
(mode == EMPHASIZED_WITHOUT_CONTOUR && isTagged && !isOutline));
|
||||||
|
|
||||||
// calculate line contour extension basis for constant width and caps
|
// 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));
|
norm = normalize(norm - dir * dot(dir, norm));
|
||||||
vec3 perp = normalize(cross(dir, norm));
|
vec3 perp = normalize(cross(dir, norm));
|
||||||
|
|
||||||
|
|
|
@ -453,7 +453,7 @@ void EdgeRenderer::Init(const StippleAtlas *a) {
|
||||||
{
|
{
|
||||||
{ ATTRIB_POS, "pos" },
|
{ ATTRIB_POS, "pos" },
|
||||||
{ ATTRIB_LOC, "loc" },
|
{ ATTRIB_LOC, "loc" },
|
||||||
{ ATTRIB_TAN, "tan" }
|
{ ATTRIB_TAN, "tgt" }
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -638,7 +638,7 @@ void OutlineRenderer::Init(const StippleAtlas *a) {
|
||||||
{
|
{
|
||||||
{ ATTRIB_POS, "pos" },
|
{ ATTRIB_POS, "pos" },
|
||||||
{ ATTRIB_LOC, "loc" },
|
{ ATTRIB_LOC, "loc" },
|
||||||
{ ATTRIB_TAN, "tan" },
|
{ ATTRIB_TAN, "tgt" },
|
||||||
{ ATTRIB_NOL, "nol" },
|
{ ATTRIB_NOL, "nol" },
|
||||||
{ ATTRIB_NOR, "nor" }
|
{ ATTRIB_NOR, "nor" }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue