mapbase-source/source-sdk-2013

[VISUAL] Missing Code / Static Combo Value too high on VertexLitGeneric Bumped

WhiteRedDragons opened this issue · 0 comments

Describe the bug

SDK_vertexlit_and_unlit_generic_bump_ps2x.fxc Line 12 - DETAIL_BLEND_MODE set to 6 instead of 4
See SDK_vertexlit_and_unlit_generic_ps20b.fxc Line 439 for reference.
In order to use Blendmode 5 and 6 the shader needs to have TextureCombinePostLighting() after lighting calculations
right now this code is missing from the bumped shader so these combos don't do anything and only drag down compile times

Solution(s)

  1. Set 6 to 4 at Line 12 in SDK_vertexlit_and_unlit_generic_bump_ps2x.fxc
  2. Implement the same code that SDK_vertexlit_and_unlit_generic_ps20b.fxc already uses at a similar location

If 2 is implemented, the shader should probably restrict the detailblendmode to 4 before setting the static shader combo.
Otherwise any existing material that might have set it, without it actually working, will result in a missing shader combo error, turn invisible and/or go graphically haywire.