Skip to content

Commit

Permalink
Avoid transparencies on cut faces.
Browse files Browse the repository at this point in the history
  • Loading branch information
thehans committed Nov 19, 2015
1 parent da79f97 commit e3a7fe2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/OpenCSGRenderer.cc
Expand Up @@ -107,7 +107,7 @@ void OpenCSGRenderer::renderCSGChain(CSGChain *chain, GLint *shaderinfo,
colormode = COLORMODE_BACKGROUND;
}
} else if (j_obj.type == CSGTerm::TYPE_DIFFERENCE) {
if (j_obj.flag & CSGTerm::FLAG_HIGHLIGHT) {
if (highlight && j_obj.flag & CSGTerm::FLAG_HIGHLIGHT) {
colormode = COLORMODE_HIGHLIGHT;
}
else {
Expand Down
1 change: 1 addition & 0 deletions src/renderer.cc
Expand Up @@ -74,6 +74,7 @@ void Renderer::setColor(ColorMode colormode, const float color[4], GLint *shader
color[2] >= 0 ? color[2] : basecol[2],
color[3] >= 0 ? color[3] : basecol[3]);
}
if (colormode == COLORMODE_CUTOUT) basecol[3] = 1;
setColor(basecol.data(), shaderinfo);
}
}
Expand Down

0 comments on commit e3a7fe2

Please sign in to comment.