Skip to content

Commit

Permalink
#6081: Evaluate the diffuse stage registers once before checking the …
Browse files Browse the repository at this point in the history
…alpha test value
  • Loading branch information
codereader committed Sep 4, 2022
1 parent 9656683 commit 263514a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions radiantcore/rendersystem/backend/OpenGLShader.cpp
Expand Up @@ -518,6 +518,12 @@ void OpenGLShader::constructEditorPreviewPassFromMaterial()
// settings like scale and translate
previewPass.stage0 = findFirstLayerOfType(_material, IShaderLayer::DIFFUSE);

// Evaluate the expressions of the diffuse stage once to be able to get a meaningful alphatest value
if (previewPass.stage0)
{
previewPass.stage0->evaluateExpressions(0);
}

previewPass.setRenderFlag(RENDER_FILL);
previewPass.setRenderFlag(RENDER_TEXTURE_2D);
previewPass.setRenderFlag(RENDER_DEPTHTEST);
Expand Down

0 comments on commit 263514a

Please sign in to comment.