Skip to content

Commit 0fafc55

Browse files
committed
Comment out a useAttrColor case that doesn't work
1 parent e30ab0e commit 0fafc55

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/engine/renderer/Material.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,8 +1318,11 @@ void ProcessMaterialLightMapping( Material* material, shaderStage_t* pStage, dra
13181318
colorGen_t rgbGen = SetRgbGen( pStage );
13191319
alphaGen_t alphaGen = SetAlphaGen( pStage );
13201320

1321-
material->useAttrColor = rgbGen == colorGen_t::CGEN_VERTEX || rgbGen == colorGen_t::CGEN_ONE_MINUS_VERTEX
1322-
|| alphaGen == alphaGen_t::AGEN_VERTEX || alphaGen == alphaGen_t::AGEN_ONE_MINUS_VERTEX;
1321+
// useAttrColor has no effect since the lightMapping shader has ATTR_COLOR forced to be always
1322+
// on (_requiredVertexAttribs). If we removed ATTR_COLOR from there, we would need to detect
1323+
// implicit vertex lighting as well, not only rgbgen (see SetLightDeluxeMode).
1324+
/* material->useAttrColor = rgbGen == colorGen_t::CGEN_VERTEX || rgbGen == colorGen_t::CGEN_ONE_MINUS_VERTEX
1325+
|| alphaGen == alphaGen_t::AGEN_VERTEX || alphaGen == alphaGen_t::AGEN_ONE_MINUS_VERTEX; */
13231326

13241327
material->enableDeluxeMapping = enableDeluxeMapping;
13251328
material->enableGridLighting = enableGridLighting;

0 commit comments

Comments
 (0)