mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-30 14:47:57 +03:00
Properly use identity / identitylighting when cgen isn't explicitly specified
This commit is contained in:
parent
0b16d599d5
commit
51ba1e2951
1 changed files with 6 additions and 5 deletions
|
@ -1684,10 +1684,11 @@ static qboolean ParseStage(shaderStage_t* stage, char** text)
|
|||
// if cgen isn't explicitly specified, use either identity or identitylighting
|
||||
//
|
||||
if ( stage->rgbGen == CGEN_BAD ) {
|
||||
if ( (!cntBundle && !stage->bundle[0].isLightmap) ||
|
||||
blendSrcBits == 0 ||
|
||||
if (cntBundle || stage->bundle[0].isLightmap) {
|
||||
stage->rgbGen = CGEN_IDENTITY;
|
||||
} else if (blendSrcBits == 0 ||
|
||||
blendSrcBits == GLS_SRCBLEND_ONE ||
|
||||
blendSrcBits == GLS_SRCBLEND_SRC_ALPHA ) {
|
||||
blendSrcBits == GLS_SRCBLEND_SRC_ALPHA) {
|
||||
stage->rgbGen = CGEN_IDENTITY_LIGHTING;
|
||||
} else {
|
||||
stage->rgbGen = CGEN_IDENTITY;
|
||||
|
@ -1709,7 +1710,7 @@ static qboolean ParseStage(shaderStage_t* stage, char** text)
|
|||
}
|
||||
|
||||
// decide which agens we can skip
|
||||
if ( stage->alphaGen == CGEN_IDENTITY ) {
|
||||
if ( stage->alphaGen == AGEN_IDENTITY ) {
|
||||
if ( stage->rgbGen == CGEN_IDENTITY
|
||||
|| stage->rgbGen == CGEN_LIGHTING_GRID
|
||||
|| stage->rgbGen == CGEN_LIGHTING_SPHERICAL ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue