render parity unit G: 40250 tiling selection + verbatim STP terrain

- PythonApplication::Create mirrors 40250 :1196-1251 (SOFTWARE_TILING cfg,
  auto tiling IsFastTNL ? HTP : STP, MinLOD on !IsFastTNL)
- RecordingDevice caps: VertexShaderVersion 1.1 + CLIPTLVERTS (fast T&L -> HTP)
- MapOutdoorRenderSTP.cpp replaced by the full 40250 source (native gate only)
- native_render XYZRHW: fix inverted screen->NDC Y, negative rhw clip,
  no texture transform on TL vertices, specular-alpha vertex fog (capture v9)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-28 13:54:11 +09:00
co-authored by Claude Opus 5.5
parent 91ce13c3cf
commit 863f3771af
10 changed files with 864 additions and 66 deletions
@@ -17,6 +17,9 @@
#include "../EterLib/UIRenderCommands.h"
#include "../EterLib/RenderCommands3D.h"
#include "EterLib/GrpDevice.h"
#include "EterGrnLib/LODController.h"
#include "UserInterface/PythonBackground.h"
#include "UserInterface/PythonSystem.h"
#include "../ScriptLib/PythonBoot.h"
#include "ServerClock.h"
@@ -85,6 +88,12 @@ bool CPythonApplication::Create(PyObject*, const char*, int, int, int)
return false;
}
// 40250 PythonApplication.cpp:1196-1199.
extern bool GRAPHICS_CAPS_SOFTWARE_TILING;
if (!CPythonSystem::Instance().IsAutoTiling())
GRAPHICS_CAPS_SOFTWARE_TILING = CPythonSystem::Instance().IsSoftwareTiling();
// In 40250 m_grpDevice is a member created here (PythonApplication.cpp:909).
static CGraphicDevice s_grpDevice;
int iRet = s_grpDevice.Create(NULL, width, height, true, 32, 0);
@@ -117,6 +126,23 @@ bool CPythonApplication::Create(PyObject*, const char*, int, int, int)
return false;
}
// 40250 PythonApplication.cpp:1206-1220.
if (CPythonSystem::Instance().IsAutoTiling())
{
if (s_grpDevice.IsFastTNL())
{
CPythonBackground::Instance().ReserveSoftwareTilingEnable(false);
}
else
{
CPythonBackground::Instance().ReserveSoftwareTilingEnable(true);
}
}
else
{
CPythonBackground::Instance().ReserveSoftwareTilingEnable(CPythonSystem::Instance().IsSoftwareTiling());
}
// In 40250 m_netDevice is a member created here (PythonApplication.cpp:1242).
static CNetworkDevice s_netDevice;
if (!s_netDevice.Create())
@@ -126,6 +152,10 @@ bool CPythonApplication::Create(PyObject*, const char*, int, int, int)
return false;
}
// 40250 PythonApplication.cpp:1250-1251.
if (!s_grpDevice.IsFastTNL())
CGrannyLODController::SetMinLODMode(true);
// 40250 m_pyItem.Create() (PythonApplication.cpp:1253): registers dropitem.mse with CEffectManager.
CPythonItem::Instance().Create();