mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- got rid of the RF_NPOTEmulation flag.
This can easily be controlled with the 2 main variables alone.
This commit is contained in:
parent
353e3eb1fa
commit
60d7f4f7c2
4 changed files with 8 additions and 15 deletions
|
@ -424,16 +424,16 @@ static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32
|
|||
int32_t size2;
|
||||
for (size2 = 1; size2 < size; size2 += size2) {}
|
||||
if (size == size2)
|
||||
GLInterface.SetNpotEmulation(false, 1.f, 0.f);
|
||||
GLInterface.SetNpotEmulation(0.f, 0.f);
|
||||
else
|
||||
{
|
||||
float xOffset = 1.f / tilesize.x;
|
||||
GLInterface.SetNpotEmulation(true, (1.f*size2) / size, xOffset);
|
||||
GLInterface.SetNpotEmulation((1.f*size2) / size, xOffset);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GLInterface.SetNpotEmulation(false, 1.f, 0.f);
|
||||
GLInterface.SetNpotEmulation(0.f, 0.f);
|
||||
}
|
||||
|
||||
vec2_t tsiz2 = tsiz;
|
||||
|
@ -491,7 +491,7 @@ static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32
|
|||
GLInterface.SetTinting(-1, 0xffffff, 0xffffff);
|
||||
GLInterface.UseDetailMapping(false);
|
||||
GLInterface.UseGlowMapping(false);
|
||||
GLInterface.SetNpotEmulation(false, 1.f, 0.f);
|
||||
GLInterface.SetNpotEmulation(0.f, 0.f);
|
||||
|
||||
if (skyzbufferhack && skyzbufferhack_pass == 0)
|
||||
{
|
||||
|
|
|
@ -407,15 +407,10 @@ public:
|
|||
else renderState.Flags &= ~RF_Brightmapping;
|
||||
}
|
||||
|
||||
void SetNpotEmulation(bool yes, float factor, float xOffset)
|
||||
void SetNpotEmulation(float factor, float xOffset)
|
||||
{
|
||||
if (yes)
|
||||
{
|
||||
renderState.Flags |= RF_NPOTEmulation;
|
||||
renderState.NPOTEmulationFactor = factor;
|
||||
renderState.NPOTEmulationXOffset = xOffset;
|
||||
}
|
||||
else renderState.Flags &= ~RF_NPOTEmulation;
|
||||
renderState.NPOTEmulationFactor = factor;
|
||||
renderState.NPOTEmulationXOffset = xOffset;
|
||||
}
|
||||
|
||||
void SetShadeInterpolate(int32_t yes)
|
||||
|
|
|
@ -21,7 +21,6 @@ enum PRSFlags
|
|||
RF_DetailMapping = 4,
|
||||
RF_GlowMapping = 8,
|
||||
RF_Brightmapping = 16,
|
||||
RF_NPOTEmulation = 32,
|
||||
RF_ShadeInterpolate = 64,
|
||||
RF_FogDisabled = 128,
|
||||
RF_MapFog = 256, // RRRA E2L1.
|
||||
|
|
|
@ -3,7 +3,6 @@ const int RF_UsePalette = 2;
|
|||
const int RF_DetailMapping = 4;
|
||||
const int RF_GlowMapping = 8;
|
||||
const int RF_Brightmapping = 16;
|
||||
const int RF_NPOTEmulation = 32;
|
||||
const int RF_ShadeInterpolate = 64;
|
||||
|
||||
|
||||
|
@ -163,7 +162,7 @@ void main()
|
|||
vec2 newCoord;
|
||||
|
||||
// Coordinate adjustment for NPOT textures (something must have gone very wrong to make this necessary...)
|
||||
if ((u_flags & RF_NPOTEmulation) != 0)
|
||||
if (u_npotEmulationFactor != 0.0)
|
||||
{
|
||||
float period = floor(coordY / u_npotEmulationFactor);
|
||||
coordX += u_npotEmulationXOffset * floor(mod(coordY, u_npotEmulationFactor));
|
||||
|
|
Loading…
Reference in a new issue