 #define TangentMatrix getTangentMatrix()
 
 mat3 getTangentMatrix() {
-  if (useVertexTangents) {
+  if (flag_vertexTangents) {
     vec3 N = normalize(Normal);
     vec3 T = normalize(Tangent);
     vec3 B = cross(N, T);

void main() {
  PositionWorld = vec3(WorldFromLocal * VertexPosition);
  Normal = NormalMatrix * VertexNormal;
  Color = VertexColor * Material.color * PassColor;
  UV = VertexUV;

  if (enableNormalMap && useVertexTangents) {
    Tangent = NormalMatrix * VertexTangent;
  }

  PointSize = defaultPointSize;
  Position = lovrmain();

  if (enableUVTransform) {
    UV *= Material.uvScale;
    UV += Material.uvShift;
  }

void main() {
  PixelColor[0] = lovrmain();

  if (flag_glow) {
    if (flag_glowTexture) {
      PixelColor[0].rgb += getPixel(GlowTexture, UV).rgb * Material.glow.rgb * Material.glow.a;
    } else {
      PixelColor[0].rgb += Material.glow.rgb * Material.glow.a;
    }
  }

  if (flag_alphaCutoff && PixelColor[0].a <= Material.alphaCutoff) {
    discard;
  }
}
