- cleanup of the revised y-clamping feature.
This integrates better with the existing features.
This commit is contained in:
parent
6e2aef617c
commit
da806b354d
9 changed files with 32 additions and 25 deletions
|
|
@ -287,7 +287,7 @@ void PolyRenderState::Apply()
|
|||
|
||||
PolyPushConstants constants;
|
||||
constants.uFogEnabled = fogset;
|
||||
constants.uTextureMode = (mTextureMode == TM_NORMAL && mTempTM == TM_OPAQUE ? TM_OPAQUE : mTextureMode);
|
||||
constants.uTextureMode = GetTextureModeAndFlags(mTempTM);
|
||||
constants.uLightDist = mLightParms[0];
|
||||
constants.uLightFactor = mLightParms[1];
|
||||
constants.uFogDensity = mLightParms[2];
|
||||
|
|
|
|||
|
|
@ -380,11 +380,7 @@ static void ProcessMaterial(int x0, int x1, PolyTriangleThreadData* thread)
|
|||
{
|
||||
auto constants = thread->PushConstants;
|
||||
|
||||
if (constants->uTextureMode == TM_CLAMPY)
|
||||
{
|
||||
FuncNormal_ClampY(x0, x1, thread);
|
||||
}
|
||||
else switch (constants->uTextureMode & 0xff)
|
||||
switch (constants->uTextureMode)
|
||||
{
|
||||
default:
|
||||
case TM_NORMAL:
|
||||
|
|
@ -393,6 +389,7 @@ static void ProcessMaterial(int x0, int x1, PolyTriangleThreadData* thread)
|
|||
case TM_OPAQUE: FuncNormal_Opaque(x0, x1, thread); break;
|
||||
case TM_INVERSE: FuncNormal_Inverse(x0, x1, thread); break;
|
||||
case TM_ALPHATEXTURE: FuncNormal_AlphaTexture(x0, x1, thread); break;
|
||||
case TM_CLAMPY: FuncNormal_ClampY(x0, x1, thread); break;
|
||||
case TM_INVERTOPAQUE: FuncNormal_InvertOpaque(x0, x1, thread); break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue