OpenGL2: Fix hack for tcMod transform on merged lightmaps
When using merged lightmaps, only change tcMod transform for tcGen lightmap.
This commit is contained in:
parent
e3abcffeb0
commit
5d60f6035a
|
|
@ -2946,6 +2946,7 @@ static void FixFatLightmapTexCoords(void)
|
||||||
|
|
||||||
if ( pStage->bundle[0].isLightmap ) {
|
if ( pStage->bundle[0].isLightmap ) {
|
||||||
// fix tcMod transform for internal lightmaps, it may be used by q3map2 lightstyles
|
// fix tcMod transform for internal lightmaps, it may be used by q3map2 lightstyles
|
||||||
|
if ( pStage->bundle[0].tcGen == TCGEN_LIGHTMAP ) {
|
||||||
for ( i = 0; i < pStage->bundle[0].numTexMods; i++ ) {
|
for ( i = 0; i < pStage->bundle[0].numTexMods; i++ ) {
|
||||||
tmi = &pStage->bundle[0].texMods[i];
|
tmi = &pStage->bundle[0].texMods[i];
|
||||||
|
|
||||||
|
|
@ -2954,6 +2955,7 @@ static void FixFatLightmapTexCoords(void)
|
||||||
tmi->translate[1] /= (float)tr.fatLightmapRows;
|
tmi->translate[1] /= (float)tr.fatLightmapRows;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// fix tcGen environment for internal lightmaps to be limited to the sub-image of the atlas
|
// fix tcGen environment for internal lightmaps to be limited to the sub-image of the atlas
|
||||||
// this is done last so other tcMods are applied first in the 0.0 to 1.0 space
|
// this is done last so other tcMods are applied first in the 0.0 to 1.0 space
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user