Permalink
Browse files

Fix z-fighting of particle quads in preview mode.

  • Loading branch information...
codereader committed Aug 18, 2011
1 parent 706cad1 commit 6796c7c27208e79fd073caad25a7b1fb39ee87b1
Showing with 6 additions and 1 deletion.
  1. +6 −1 radiant/render/backend/OpenGLShader.cpp
@@ -408,11 +408,16 @@ void OpenGLShader::constructEditorPreviewPassFromMaterial()
previewPass.renderFlags = RENDER_FILL
| RENDER_TEXTURE_2D
| RENDER_DEPTHTEST
| RENDER_DEPTHWRITE
| RENDER_COLOURWRITE
| RENDER_LIGHTING
| RENDER_SMOOTH;
// Don't let translucent materials write to the depth buffer
if ((_material->getMaterialFlags() & Material::FLAG_TRANSLUCENT) == 0)
{
previewPass.renderFlags |= RENDER_DEPTHWRITE;
}
// Handle certain shader flags
if (_material->getCullType() != Material::CULL_NONE)
{

0 comments on commit 6796c7c

Please sign in to comment.