Skip to content

Commit

Permalink
Comment out a useAttrColor case that doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
slipher committed Nov 13, 2024
1 parent 76fbd75 commit 9ce4b22
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/engine/renderer/Material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1315,11 +1315,13 @@ void ProcessMaterialLightMapping( Material* material, shaderStage_t* pStage, dra

DAEMON_ASSERT( !( enableDeluxeMapping && enableGridDeluxeMapping ) );

colorGen_t rgbGen = SetRgbGen( pStage );
// useAttrColor has no effect since the lightMapping shader has ATTR_COLOR forced to be always
// on (_requiredVertexAttribs). If we removed ATTR_COLOR from there, we would need to detect
// implicit vertex lighting as well, not only rgbgen (see SetLightDeluxeMode).
/* colorGen_t rgbGen = SetRgbGen( pStage );
alphaGen_t alphaGen = SetAlphaGen( pStage );

material->useAttrColor = rgbGen == colorGen_t::CGEN_VERTEX || rgbGen == colorGen_t::CGEN_ONE_MINUS_VERTEX
|| alphaGen == alphaGen_t::AGEN_VERTEX || alphaGen == alphaGen_t::AGEN_ONE_MINUS_VERTEX;
|| alphaGen == alphaGen_t::AGEN_VERTEX || alphaGen == alphaGen_t::AGEN_ONE_MINUS_VERTEX; */

material->enableDeluxeMapping = enableDeluxeMapping;
material->enableGridLighting = enableGridLighting;
Expand Down

0 comments on commit 9ce4b22

Please sign in to comment.