Skip to content

Commit

Permalink
#5567: getBlendFunc() needs to return GL-compatible values. Since the…
Browse files Browse the repository at this point in the history
… blend func strings stored in the layer can also have the DBS shortcuts "specularmap" or "bumpmap", we need to handle those too. They are used as blend mode for the editor pass as well, so this fixes the roundtop windows being rendered as black in the non-lit render mode.
  • Loading branch information
codereader committed Apr 2, 2021
1 parent adf85c8 commit a04750f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion radiantcore/shaders/Doom3ShaderLayer.cpp
Expand Up @@ -51,7 +51,11 @@ GLenum glBlendFromString(const std::string& value)
BlendFunc blendFuncFromStrings(const StringPair& blendFunc)
{
// Handle predefined blend modes first: add, modulate, filter
if (blendFunc.first == "add")
if (blendFunc.first == "diffusemap" || blendFunc.first == "bumpmap" || blendFunc.first == "specularmap")
{
return BlendFunc(GL_ONE, GL_ZERO);
}
else if (blendFunc.first == "add")
{
return BlendFunc(GL_ONE, GL_ONE);
}
Expand Down

0 comments on commit a04750f

Please sign in to comment.