mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-05-01 07:07:58 +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,8 +1684,9 @@ static qboolean ParseStage(shaderStage_t* stage, char** text)
|
||||||
// if cgen isn't explicitly specified, use either identity or identitylighting
|
// if cgen isn't explicitly specified, use either identity or identitylighting
|
||||||
//
|
//
|
||||||
if ( stage->rgbGen == CGEN_BAD ) {
|
if ( stage->rgbGen == CGEN_BAD ) {
|
||||||
if ( (!cntBundle && !stage->bundle[0].isLightmap) ||
|
if (cntBundle || stage->bundle[0].isLightmap) {
|
||||||
blendSrcBits == 0 ||
|
stage->rgbGen = CGEN_IDENTITY;
|
||||||
|
} else if (blendSrcBits == 0 ||
|
||||||
blendSrcBits == GLS_SRCBLEND_ONE ||
|
blendSrcBits == GLS_SRCBLEND_ONE ||
|
||||||
blendSrcBits == GLS_SRCBLEND_SRC_ALPHA) {
|
blendSrcBits == GLS_SRCBLEND_SRC_ALPHA) {
|
||||||
stage->rgbGen = CGEN_IDENTITY_LIGHTING;
|
stage->rgbGen = CGEN_IDENTITY_LIGHTING;
|
||||||
|
@ -1709,7 +1710,7 @@ static qboolean ParseStage(shaderStage_t* stage, char** text)
|
||||||
}
|
}
|
||||||
|
|
||||||
// decide which agens we can skip
|
// decide which agens we can skip
|
||||||
if ( stage->alphaGen == CGEN_IDENTITY ) {
|
if ( stage->alphaGen == AGEN_IDENTITY ) {
|
||||||
if ( stage->rgbGen == CGEN_IDENTITY
|
if ( stage->rgbGen == CGEN_IDENTITY
|
||||||
|| stage->rgbGen == CGEN_LIGHTING_GRID
|
|| stage->rgbGen == CGEN_LIGHTING_GRID
|
||||||
|| stage->rgbGen == CGEN_LIGHTING_SPHERICAL ) {
|
|| stage->rgbGen == CGEN_LIGHTING_SPHERICAL ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue