mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
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
1 changed files with 7 additions and 5 deletions
|
@ -2946,12 +2946,14 @@ static void FixFatLightmapTexCoords(void)
|
|||
|
||||
if ( pStage->bundle[0].isLightmap ) {
|
||||
// fix tcMod transform for internal lightmaps, it may be used by q3map2 lightstyles
|
||||
for ( i = 0; i < pStage->bundle[0].numTexMods; i++ ) {
|
||||
tmi = &pStage->bundle[0].texMods[i];
|
||||
if ( pStage->bundle[0].tcGen == TCGEN_LIGHTMAP ) {
|
||||
for ( i = 0; i < pStage->bundle[0].numTexMods; i++ ) {
|
||||
tmi = &pStage->bundle[0].texMods[i];
|
||||
|
||||
if ( tmi->type == TMOD_TRANSFORM ) {
|
||||
tmi->translate[0] /= (float)tr.fatLightmapCols;
|
||||
tmi->translate[1] /= (float)tr.fatLightmapRows;
|
||||
if ( tmi->type == TMOD_TRANSFORM ) {
|
||||
tmi->translate[0] /= (float)tr.fatLightmapCols;
|
||||
tmi->translate[1] /= (float)tr.fatLightmapRows;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue