mirror of https://github.com/AxioDL/metaforce.git
Graphics debug groups and bug fixes
This commit is contained in:
parent
b4fe474de3
commit
5acf9ecbcf
|
@ -17,6 +17,7 @@
|
|||
<mapping directory="$PROJECT_DIR$/hecl/extern/boo/lib/graphicsdev/nx/libdrm_nouveau" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/hecl/extern/boo/lib/graphicsdev/nx/mesa" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/hecl/extern/boo/logvisor" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/hecl/extern/boo/logvisor/fmt" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/hecl/extern/libSquish" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/hecl/extern/libjpeg-turbo" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/jbus" vcs="Git" />
|
||||
|
|
|
@ -1293,6 +1293,7 @@ void CAutoMapper::Update(float dt, const CStateManager& mgr) {
|
|||
}
|
||||
|
||||
void CAutoMapper::Draw(const CStateManager& mgr, const zeus::CTransform& xf, float alpha) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CAutoMapper::Draw", zeus::skPurple);
|
||||
alpha *= g_GameState->GameOptions().GetHUDAlpha() / 255.f;
|
||||
// Blend mode alpha
|
||||
// Backface cull
|
||||
|
|
|
@ -41,6 +41,7 @@ CMapUniverse::CMapWorldData::CMapWorldData(CInputStream& in, u32 version)
|
|||
void CMapUniverse::Draw(const CMapUniverseDrawParms& parms, const zeus::CVector3f&, float, float) const {
|
||||
if (!x4_hexagonToken.IsLoaded())
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CMapUniverse::Draw", zeus::skBlue);
|
||||
|
||||
u32 totalSurfaceCount = 0;
|
||||
for (const CMapWorldData& data : x10_worldDatas)
|
||||
|
|
|
@ -121,6 +121,7 @@ void CMapWorld::Draw(const CMapWorld::CMapWorldDrawParms& parms, int curArea, in
|
|||
bool inMapScreen) const {
|
||||
if (depth1 == 0.f && depth2 == 0.f)
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CMapWorld::Draw", zeus::skBlue);
|
||||
|
||||
ClearTraversedFlags();
|
||||
int areaDepth = std::ceil(std::max(depth1, depth2));
|
||||
|
|
|
@ -105,6 +105,7 @@ std::pair<zeus::CColor, zeus::CColor> CMappableObject::GetDoorColors(int curArea
|
|||
void CMappableObject::PostConstruct(const void*) { x10_transform = AdjustTransformForType(); }
|
||||
|
||||
void CMappableObject::Draw(int curArea, const CMapWorldInfo& mwInfo, float alpha, bool needsVtxLoad) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CMappableObject::Draw", zeus::skCyan);
|
||||
if (IsDoorType(x0_type)) {
|
||||
std::pair<zeus::CColor, zeus::CColor> colors = GetDoorColors(curArea, mwInfo, alpha);
|
||||
for (int s = 0; s < 6; ++s) {
|
||||
|
|
|
@ -638,6 +638,7 @@ void CStateManager::ResetViewAfterDraw(const SViewport& backupViewport,
|
|||
}
|
||||
|
||||
void CStateManager::DrawWorld() const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CStateManager::DrawWorld", zeus::skBlue);
|
||||
CTimeProvider timeProvider(xf14_curTimeMod900);
|
||||
SViewport backupViewport = g_Viewport;
|
||||
|
||||
|
@ -894,6 +895,8 @@ void CStateManager::DrawActorCubeFaces(CActor& actor, int& cubeInst) const {
|
|||
}
|
||||
|
||||
for (int f = 0; f < 6; ++f) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CStateManager::DrawActorCubeFaces [{}] {} {} {}"),
|
||||
f, actor.GetUniqueId(), actor.GetEditorId(), actor.GetName()).c_str(), zeus::skOrange);
|
||||
CGraphics::g_BooMainCommandQueue->setRenderTarget(actor.m_reflectionCube, f);
|
||||
SetupViewForCubeFaceDraw(actor.GetRenderBounds().center(), f);
|
||||
CGraphics::g_BooMainCommandQueue->clearTarget();
|
||||
|
@ -1036,6 +1039,7 @@ bool CStateManager::SetupFogForDraw() const {
|
|||
|
||||
void CStateManager::PreRender() {
|
||||
if (xf94_24_readyToRender) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CStateManager::PreRender", zeus::skBlue);
|
||||
zeus::CFrustum frustum = SetupDrawFrustum(g_Viewport);
|
||||
x86c_stateManagerContainer->xf370_.clear();
|
||||
x86c_stateManagerContainer->xf39c_renderLast.clear();
|
||||
|
|
|
@ -430,6 +430,7 @@ void CBooRenderer::SetupRendererStates() const {
|
|||
|
||||
void CBooRenderer::ReallyRenderFogVolume(const zeus::CColor& color, const zeus::CAABox& aabb, const CModel* model,
|
||||
const CSkinnedModel* sModel) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::ReallyRenderFogVolume", zeus::skPurple);
|
||||
zeus::CMatrix4f proj = CGraphics::GetPerspectiveProjectionMatrix(false);
|
||||
zeus::CVector4f points[8];
|
||||
|
||||
|
@ -755,6 +756,7 @@ void CBooRenderer::RemoveStaticGeometry(const std::vector<CMetroidModelInstance>
|
|||
}
|
||||
|
||||
void CBooRenderer::DrawAreaGeometry(int areaIdx, int mask, int targetMask) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::DrawAreaGeometry", zeus::skPurple);
|
||||
x318_30_inAreaDraw = true;
|
||||
// SetupRendererStates();
|
||||
CModelFlags flags;
|
||||
|
@ -789,6 +791,7 @@ void CBooRenderer::DrawAreaGeometry(int areaIdx, int mask, int targetMask) {
|
|||
}
|
||||
|
||||
void CBooRenderer::DrawUnsortedGeometry(int areaIdx, int mask, int targetMask, bool shadowRender) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::DrawUnsortedGeometry", zeus::skPurple);
|
||||
// SetupRendererStates();
|
||||
CModelFlags flags;
|
||||
flags.m_extendedShader = shadowRender ? EExtendedShader::SolidColor : EExtendedShader::Lighting;
|
||||
|
@ -858,6 +861,7 @@ void CBooRenderer::DrawUnsortedGeometry(int areaIdx, int mask, int targetMask, b
|
|||
}
|
||||
|
||||
void CBooRenderer::DrawSortedGeometry(int areaIdx, int mask, int targetMask) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::DrawSortedGeometry", zeus::skPurple);
|
||||
// SetupRendererStates();
|
||||
|
||||
CAreaListItem* lastOctreeItem = nullptr;
|
||||
|
@ -1035,6 +1039,7 @@ void CBooRenderer::DrawString(const char*, int, int) {}
|
|||
u32 CBooRenderer::GetFPS() { return 0; }
|
||||
|
||||
void CBooRenderer::CacheReflection(TReflectionCallback cb, void* ctx, bool clearAfter) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::CacheReflection", zeus::skPurple);
|
||||
if (!x318_24_refectionDirty)
|
||||
return;
|
||||
x318_24_refectionDirty = false;
|
||||
|
@ -1052,11 +1057,13 @@ void CBooRenderer::CacheReflection(TReflectionCallback cb, void* ctx, bool clear
|
|||
}
|
||||
|
||||
void CBooRenderer::DrawSpaceWarp(const zeus::CVector3f& pt, float strength) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::DrawSpaceWarp", zeus::skPurple);
|
||||
m_spaceWarpFilter.setStrength(strength);
|
||||
m_spaceWarpFilter.draw(pt);
|
||||
}
|
||||
|
||||
void CBooRenderer::DrawThermalModel(const CModel& model, const zeus::CColor& mulCol, const zeus::CColor& addCol) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::DrawThermalModel", zeus::skPurple);
|
||||
CModelFlags flags;
|
||||
flags.m_extendedShader = EExtendedShader::Thermal;
|
||||
flags.x4_color = mulCol;
|
||||
|
@ -1066,6 +1073,7 @@ void CBooRenderer::DrawThermalModel(const CModel& model, const zeus::CColor& mul
|
|||
}
|
||||
|
||||
void CBooRenderer::DrawXRayOutline(const zeus::CAABox& aabb) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::DrawXRayOutline", zeus::skPurple);
|
||||
CModelFlags flags;
|
||||
flags.m_extendedShader = EExtendedShader::ForcedAlpha;
|
||||
|
||||
|
@ -1117,6 +1125,7 @@ void CBooRenderer::SetThermal(bool thermal, float level, const zeus::CColor& col
|
|||
void CBooRenderer::SetThermalColdScale(float scale) { x2f8_thermColdScale = zeus::clamp(0.f, scale, 1.f); }
|
||||
|
||||
void CBooRenderer::DoThermalBlendCold() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::DoThermalBlendCold", zeus::skMagenta);
|
||||
zeus::CColor a = zeus::CColor::lerp(x2f4_thermColor, zeus::skWhite, x2f8_thermColdScale);
|
||||
m_thermColdFilter->setColorA(a);
|
||||
float bAlpha = 1.f;
|
||||
|
@ -1143,6 +1152,7 @@ void CBooRenderer::DoThermalBlendCold() {
|
|||
}
|
||||
|
||||
void CBooRenderer::DoThermalBlendHot() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::DoThermalBlendHot", zeus::skMagenta);
|
||||
m_thermHotFilter->draw();
|
||||
m_thermalHotPass = false;
|
||||
}
|
||||
|
@ -1175,22 +1185,26 @@ void CBooRenderer::SetWorldLightFadeLevel(float level) { x2fc_tevReg1Color = zeu
|
|||
void CBooRenderer::ReallyDrawPhazonSuitIndirectEffect(const zeus::CColor& vertColor, /*const CTexture& maskTex,*/
|
||||
const CTexture& indTex, const zeus::CColor& modColor, float scale,
|
||||
float offX, float offY) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::ReallyDrawPhazonSuitIndirectEffect", zeus::skMagenta);
|
||||
float qScale = scale / 8.f; // Adjustment for URDE
|
||||
m_phazonSuitFilter.draw(modColor, scale, offX * qScale, offY * qScale);
|
||||
}
|
||||
|
||||
void CBooRenderer::ReallyDrawPhazonSuitEffect(const zeus::CColor& modColor /*, const CTexture& maskTex*/) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::ReallyDrawPhazonSuitEffect", zeus::skMagenta);
|
||||
m_phazonSuitFilter.draw(modColor, 0.f, 0.f, 0.f);
|
||||
}
|
||||
|
||||
void CBooRenderer::DoPhazonSuitIndirectAlphaBlur(float blurRadius /*, float f2*/,
|
||||
const TLockedToken<CTexture>& indTex) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::DoPhazonSuitIndirectAlphaBlur", zeus::skMagenta);
|
||||
m_phazonSuitFilter.drawBlurPasses(blurRadius, indTex.IsLoaded() ? indTex.GetObj() : nullptr);
|
||||
}
|
||||
|
||||
void CBooRenderer::DrawPhazonSuitIndirectEffect(const zeus::CColor& nonIndirectMod,
|
||||
const TLockedToken<CTexture>& indTex, const zeus::CColor& indirectMod,
|
||||
float blurRadius, float scale, float offX, float offY) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::DrawPhazonSuitIndirectEffect", zeus::skPurple);
|
||||
/* Indirect background already in binding 0 */
|
||||
|
||||
/* Resolve alpha channel of just-drawn phazon suit into binding 1 */
|
||||
|
@ -1253,6 +1267,7 @@ void CBooRenderer::FindOverlappingWorldModels(std::vector<u32>& modelBits, const
|
|||
|
||||
int CBooRenderer::DrawOverlappingWorldModelIDs(int alphaVal, const std::vector<u32>& modelBits,
|
||||
const zeus::CAABox& aabb) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::DrawOverlappingWorldModelIDs", zeus::skGrey);
|
||||
SetupRendererStates();
|
||||
UpdateAreaUniforms(-1, EWorldShadowMode::BallOnWorldIds, false);
|
||||
|
||||
|
@ -1294,6 +1309,7 @@ int CBooRenderer::DrawOverlappingWorldModelIDs(int alphaVal, const std::vector<u
|
|||
|
||||
void CBooRenderer::DrawOverlappingWorldModelShadows(int alphaVal, const std::vector<u32>& modelBits,
|
||||
const zeus::CAABox& aabb, float alpha) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CBooRenderer::DrawOverlappingWorldModelShadows", zeus::skGrey);
|
||||
CModelFlags flags;
|
||||
flags.x4_color.a() = alpha;
|
||||
flags.m_extendedShader = EExtendedShader::MorphBallShadow; // Do shadow draw
|
||||
|
|
|
@ -344,4 +344,25 @@ public:
|
|||
void Draw() const { CGraphics::DrawArray(m_start, m_vec.size() - m_start); }
|
||||
};
|
||||
|
||||
#ifdef BOO_GRAPHICS_DEBUG_GROUPS
|
||||
class GraphicsDebugGroup {
|
||||
/* Stack only */
|
||||
void* operator new(size_t);
|
||||
void operator delete(void*);
|
||||
void* operator new[](size_t);
|
||||
void operator delete[](void*);
|
||||
public:
|
||||
explicit GraphicsDebugGroup(const char* name, const zeus::CColor& color = zeus::skWhite) {
|
||||
zeus::simd_floats f(color.mSimd);
|
||||
CGraphics::g_BooMainCommandQueue->pushDebugGroup(name, f.array());
|
||||
}
|
||||
~GraphicsDebugGroup() {
|
||||
CGraphics::g_BooMainCommandQueue->popDebugGroup();
|
||||
}
|
||||
};
|
||||
#define SCOPED_GRAPHICS_DEBUG_GROUP(...) GraphicsDebugGroup _GfxDbg_(__VA_ARGS__);
|
||||
#else
|
||||
#define SCOPED_GRAPHICS_DEBUG_GROUP(...)
|
||||
#endif
|
||||
|
||||
} // namespace urde
|
||||
|
|
|
@ -238,6 +238,8 @@ void CLineRenderer::AddVertex(const zeus::CVector3f& position, const zeus::CColo
|
|||
}
|
||||
|
||||
void CLineRenderer::Render(bool alphaWrite, const zeus::CColor& moduColor) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CLineRenderer::Render", zeus::skGrey);
|
||||
|
||||
if (!m_final && m_nextVert > 1) {
|
||||
if (m_mode == EPrimitiveMode::LineLoop) {
|
||||
{
|
||||
|
|
|
@ -406,6 +406,7 @@ void CMoviePlayer::SetFrame(const zeus::CVector3f& a, const zeus::CVector3f& b,
|
|||
void CMoviePlayer::DrawFrame() {
|
||||
if (xd0_drawTexSlot == UINT32_MAX)
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CMoviePlayer::DrawFrame", zeus::skYellow);
|
||||
|
||||
/* draw appropriate field */
|
||||
CTHPTextureSet& tex = x80_textures[xd0_drawTexSlot];
|
||||
|
|
|
@ -44,6 +44,7 @@ void CRainSplashGenerator::SRainSplash::Draw(float alpha, float dt, const zeus::
|
|||
}
|
||||
|
||||
void CRainSplashGenerator::DoDraw(const zeus::CTransform& xf) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CRainSplashGenerator::DoDraw", zeus::skYellow);
|
||||
CGraphics::SetModelMatrix(xf);
|
||||
if (x40_queueSize > 0) {
|
||||
if (x38_queueTail <= x3c_queueHead) {
|
||||
|
|
|
@ -29,6 +29,7 @@ zeus::CAABox CSimpleShadow::GetBounds() const {
|
|||
void CSimpleShadow::Render(const TLockedToken<CTexture>& tex) const {
|
||||
if (!x48_24_collision)
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CSimpleShadow::Render", zeus::skGrey);
|
||||
|
||||
CGraphics::DisableAllLights();
|
||||
CGraphics::SetModelMatrix(x0_xf);
|
||||
|
|
|
@ -60,6 +60,8 @@ void CAABoxShader::setAABB(const zeus::CAABox& aabb) {
|
|||
}
|
||||
|
||||
void CAABoxShader::draw(const zeus::CColor& color) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CAABoxShader::draw", zeus::skMagenta);
|
||||
|
||||
m_uniform.m_xf = CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f();
|
||||
m_uniform.m_color = color;
|
||||
m_uniBuf->load(&m_uniform, sizeof(Uniform));
|
||||
|
|
|
@ -26,6 +26,7 @@ CCameraBlurFilter::CCameraBlurFilter() {
|
|||
void CCameraBlurFilter::draw(float amount, bool clearDepth) {
|
||||
if (amount <= 0.f)
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CCameraBlurFilter::draw", zeus::skMagenta);
|
||||
|
||||
SClipScreenRect clipRect(g_Viewport);
|
||||
CGraphics::ResolveSpareTexture(clipRect, 0, clearDepth);
|
||||
|
|
|
@ -54,6 +54,8 @@ CColoredQuadFilter::CColoredQuadFilter(EFilterType type) {
|
|||
}
|
||||
|
||||
void CColoredQuadFilter::draw(const zeus::CColor& color, const zeus::CRectangle& rect) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CColoredQuadFilter::draw", zeus::skMagenta);
|
||||
|
||||
m_uniform.m_matrix[0][0] = rect.size.x() * 2.f;
|
||||
m_uniform.m_matrix[1][1] = rect.size.y() * 2.f;
|
||||
m_uniform.m_matrix[3][0] = rect.position.x() * 2.f - 1.f;
|
||||
|
|
|
@ -67,6 +67,8 @@ CColoredStripShader::CColoredStripShader(boo::IGraphicsDataFactory::Context& ctx
|
|||
}
|
||||
|
||||
void CColoredStripShader::draw(const zeus::CColor& color, size_t numVerts, const Vert* verts) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CColoredStripShader::draw", zeus::skMagenta);
|
||||
|
||||
m_vbo->load(verts, sizeof(Vert) * numVerts);
|
||||
|
||||
m_uniform.m_matrix = CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f();
|
||||
|
|
|
@ -18,6 +18,8 @@ void CEnergyBarShader::updateModelMatrix() {
|
|||
void CEnergyBarShader::draw(const zeus::CColor& color0, const std::vector<Vertex>& verts0, const zeus::CColor& color1,
|
||||
const std::vector<Vertex>& verts1, const zeus::CColor& color2,
|
||||
const std::vector<Vertex>& verts2, const CTexture* tex) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CEnergyBarShader::draw", zeus::skMagenta);
|
||||
|
||||
size_t totalVerts = verts0.size() + verts1.size() + verts2.size();
|
||||
if (!totalVerts)
|
||||
return;
|
||||
|
|
|
@ -47,12 +47,16 @@ CFogVolumeFilter::CFogVolumeFilter() {
|
|||
}
|
||||
|
||||
void CFogVolumeFilter::draw2WayPass(const zeus::CColor& color) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CFogVolumeFilter::draw2WayPass", zeus::skMagenta);
|
||||
|
||||
m_uniBuf->load(&color, sizeof(zeus::CColor));
|
||||
CGraphics::SetShaderDataBinding(m_dataBind2Way);
|
||||
CGraphics::DrawArray(0, 4);
|
||||
}
|
||||
|
||||
void CFogVolumeFilter::draw1WayPass(const zeus::CColor& color) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CFogVolumeFilter::draw1WayPass", zeus::skMagenta);
|
||||
|
||||
m_uniBuf->load(&color, sizeof(zeus::CColor));
|
||||
CGraphics::SetShaderDataBinding(m_dataBind1Way);
|
||||
CGraphics::DrawArray(0, 4);
|
||||
|
|
|
@ -49,6 +49,7 @@ void CFogVolumePlaneShader::addFan(const zeus::CVector3f* verts, int numVerts) {
|
|||
void CFogVolumePlaneShader::draw(int pass) {
|
||||
if (m_verts.empty())
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CFogVolumePlaneShader::draw", zeus::skMagenta);
|
||||
if (pass == 0) {
|
||||
if (m_vertCapacity < m_verts.size())
|
||||
CommitResources(m_verts.size());
|
||||
|
|
|
@ -22,6 +22,7 @@ CMapSurfaceShader::CMapSurfaceShader(boo::IGraphicsDataFactory::Context& ctx,
|
|||
}
|
||||
|
||||
void CMapSurfaceShader::draw(const zeus::CColor& color, u32 start, u32 count) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CMapSurfaceShader::draw", zeus::skMagenta);
|
||||
Uniform uniform = {CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f(), color};
|
||||
m_uniBuf->load(&uniform, sizeof(Uniform));
|
||||
CGraphics::SetShaderDataBinding(m_dataBind);
|
||||
|
|
|
@ -24,6 +24,7 @@ void CPhazonSuitFilter::Shutdown() {
|
|||
#define BLUR_SCALE (1.f / 128.f)
|
||||
|
||||
void CPhazonSuitFilter::drawBlurPasses(float radius, const CTexture* indTex) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CPhazonSuitFilter::drawBlurPasses", zeus::skMagenta);
|
||||
if (!m_dataBind || indTex != m_indTex) {
|
||||
m_indTex = indTex;
|
||||
CGraphics::CommitResources([this](boo::IGraphicsDataFactory::Context& ctx) {
|
||||
|
@ -120,6 +121,7 @@ void CPhazonSuitFilter::drawBlurPasses(float radius, const CTexture* indTex) {
|
|||
}
|
||||
|
||||
void CPhazonSuitFilter::draw(const zeus::CColor& color, float indScale, float indOffX, float indOffY) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CPhazonSuitFilter::draw", zeus::skMagenta);
|
||||
struct Uniform {
|
||||
zeus::CColor color;
|
||||
zeus::CVector4f indScaleOff;
|
||||
|
|
|
@ -14,6 +14,7 @@ void CRadarPaintShader::Shutdown() { s_Pipeline.reset(); }
|
|||
void CRadarPaintShader::draw(const std::vector<Instance>& instances, const CTexture* tex) {
|
||||
if (!instances.size())
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CRadarPaintShader::draw", zeus::skMagenta);
|
||||
|
||||
if (instances.size() > m_maxInsts) {
|
||||
m_maxInsts = instances.size();
|
||||
|
|
|
@ -62,6 +62,8 @@ CRandomStaticFilter::CRandomStaticFilter(EFilterType type, bool cookieCutter) :
|
|||
}
|
||||
|
||||
void CRandomStaticFilter::draw(const zeus::CColor& color, float t) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CRandomStaticFilter::draw", zeus::skMagenta);
|
||||
|
||||
m_uniform.color = color;
|
||||
m_uniform.randOff = ROUND_UP_32(int64_t(rand()) * 32767 / RAND_MAX);
|
||||
m_uniform.discardThres = 1.f - t;
|
||||
|
|
|
@ -49,6 +49,8 @@ CScanLinesFilter::CScanLinesFilter(EFilterType type, bool even) : m_even(even) {
|
|||
}
|
||||
|
||||
void CScanLinesFilter::draw(const zeus::CColor& color) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CScanLinesFilter::draw", zeus::skMagenta);
|
||||
|
||||
m_uniform.color = color;
|
||||
m_uniBuf->load(&m_uniform, sizeof(Uniform));
|
||||
|
||||
|
|
|
@ -59,6 +59,8 @@ CSpaceWarpFilter::CSpaceWarpFilter() {
|
|||
}
|
||||
|
||||
void CSpaceWarpFilter::draw(const zeus::CVector3f& pt) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CSpaceWarpFilter::draw", zeus::skMagenta);
|
||||
|
||||
/* Indirect coords are full-texture sampling when warp is completely in viewport */
|
||||
m_uniform.m_indXf[1][1] = 1.f;
|
||||
m_uniform.m_indXf[0][0] = 1.f;
|
||||
|
|
|
@ -200,6 +200,8 @@ CTexturedQuadFilter::CTexturedQuadFilter(EFilterType type, TLockedToken<CTexture
|
|||
}
|
||||
|
||||
void CTexturedQuadFilter::draw(const zeus::CColor& color, float uvScale, const zeus::CRectangle& rect, float z) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CTexturedQuadFilter::draw", zeus::skMagenta);
|
||||
|
||||
Vert verts[4] = {
|
||||
{{0.f, 0.f, z}, {0.f, 0.f}},
|
||||
{{0.f, 1.f, z}, {0.f, uvScale}},
|
||||
|
@ -227,6 +229,8 @@ void CTexturedQuadFilter::draw(const zeus::CColor& color, float uvScale, const z
|
|||
}
|
||||
|
||||
void CTexturedQuadFilter::drawCropped(const zeus::CColor& color, float uvScale) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CTexturedQuadFilter::drawCropped", zeus::skMagenta);
|
||||
|
||||
float xFac = CGraphics::g_CroppedViewport.xc_width / float(g_Viewport.x8_width);
|
||||
float yFac = CGraphics::g_CroppedViewport.x10_height / float(g_Viewport.xc_height);
|
||||
float xBias = CGraphics::g_CroppedViewport.x4_left / float(g_Viewport.x8_width);
|
||||
|
@ -248,6 +252,8 @@ void CTexturedQuadFilter::drawCropped(const zeus::CColor& color, float uvScale)
|
|||
}
|
||||
|
||||
void CTexturedQuadFilter::drawVerts(const zeus::CColor& color, const Vert verts[4], float lod) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CTexturedQuadFilter::drawVerts", zeus::skMagenta);
|
||||
|
||||
m_vbo->load(verts, sizeof(Vert) * 4);
|
||||
|
||||
m_uniform.m_matrix = CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f();
|
||||
|
@ -260,6 +266,8 @@ void CTexturedQuadFilter::drawVerts(const zeus::CColor& color, const Vert verts[
|
|||
}
|
||||
|
||||
void CTexturedQuadFilter::DrawFilter(EFilterShape shape, const zeus::CColor& color, float t) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CTexturedQuadFilter::DrawFilter", zeus::skMagenta);
|
||||
|
||||
m_uniform.m_matrix = zeus::CMatrix4f();
|
||||
m_uniform.m_lod = 0.f;
|
||||
m_uniform.m_color = color;
|
||||
|
|
|
@ -40,6 +40,8 @@ CThermalColdFilter::CThermalColdFilter() {
|
|||
}
|
||||
|
||||
void CThermalColdFilter::draw() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CThermalColdFilter::draw", zeus::skMagenta);
|
||||
|
||||
CGraphics::ResolveSpareTexture(CGraphics::g_CroppedViewport);
|
||||
m_uniBuf->load(&m_uniform, sizeof(m_uniform));
|
||||
CGraphics::SetShaderDataBinding(m_dataBind);
|
||||
|
|
|
@ -35,6 +35,8 @@ CThermalHotFilter::CThermalHotFilter() {
|
|||
}
|
||||
|
||||
void CThermalHotFilter::draw() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CThermalHotFilter::draw", zeus::skMagenta);
|
||||
|
||||
CGraphics::ResolveSpareTexture(CGraphics::g_CroppedViewport);
|
||||
|
||||
// m_uniBuf->load(&m_uniform, sizeof(m_uniform));
|
||||
|
|
|
@ -35,6 +35,8 @@ CWorldShadowShader::CWorldShadowShader(u32 w, u32 h) : m_w(w), m_h(h) {
|
|||
void CWorldShadowShader::bindRenderTarget() { CGraphics::g_BooMainCommandQueue->setRenderTarget(m_tex); }
|
||||
|
||||
void CWorldShadowShader::drawBase(float extent) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CWorldShadowShader::drawBase", zeus::skMagenta);
|
||||
|
||||
zeus::CVector3f verts[] = {
|
||||
{-extent, 0.f, extent}, {extent, 0.f, extent}, {-extent, 0.f, -extent}, {extent, 0.f, -extent}};
|
||||
m_vbo->load(verts, sizeof(zeus::CVector3f) * 4);
|
||||
|
@ -48,6 +50,8 @@ void CWorldShadowShader::drawBase(float extent) {
|
|||
}
|
||||
|
||||
void CWorldShadowShader::lightenShadow() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CWorldShadowShader::lightenShadow", zeus::skMagenta);
|
||||
|
||||
m_uniform.m_color = zeus::CColor(1.f, 0.25f);
|
||||
m_uniBuf->load(&m_uniform, sizeof(m_uniform));
|
||||
|
||||
|
@ -56,6 +60,8 @@ void CWorldShadowShader::lightenShadow() {
|
|||
}
|
||||
|
||||
void CWorldShadowShader::blendPreviousShadow() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CWorldShadowShader::blendPreviousShadow", zeus::skMagenta);
|
||||
|
||||
if (!m_prevQuad)
|
||||
m_prevQuad.emplace(EFilterType::Blend, m_tex.get());
|
||||
zeus::CRectangle rect(0.f, 1.f, 1.f, -1.f);
|
||||
|
|
|
@ -35,6 +35,8 @@ CXRayBlurFilter::CXRayBlurFilter(TLockedToken<CTexture>& tex) : m_paletteTex(tex
|
|||
}
|
||||
|
||||
void CXRayBlurFilter::draw(float amount) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CXRayBlurFilter::draw", zeus::skMagenta);
|
||||
|
||||
CGraphics::ResolveSpareTexture(CGraphics::g_CroppedViewport);
|
||||
|
||||
float blurL = amount * g_tweakGui->GetXrayBlurScaleLinear() * 0.25f;
|
||||
|
|
|
@ -55,6 +55,7 @@ void CAuiEnergyBarT01::Update(float dt) {
|
|||
void CAuiEnergyBarT01::Draw(const CGuiWidgetDrawParms& drawParms) const {
|
||||
if (!xbc_tex || !xbc_tex.IsLoaded() || !xd8_coordFunc)
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CAuiEnergyBarT01::Draw {}"), m_name).c_str(), zeus::skCyan);
|
||||
|
||||
CGraphics::SetModelMatrix(x34_worldXF);
|
||||
const_cast<CEnergyBarShader&>(m_energyBarShader).updateModelMatrix();
|
||||
|
|
|
@ -101,6 +101,7 @@ void CAuiImagePane::Draw(const CGuiWidgetDrawParms& params) const {
|
|||
CGraphics::SetModelMatrix(x34_worldXF);
|
||||
if (!GetIsVisible() || !xb8_tex0Tok.IsLoaded())
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CAuiImagePane::Draw {}"), m_name).c_str(), zeus::skCyan);
|
||||
GetIsFinishedLoadingWidgetSpecific();
|
||||
if (!m_filters || m_filters->m_texId != xb8_tex0Tok.GetObjectTag()->id)
|
||||
const_cast<CAuiImagePane*>(this)->m_filters.emplace(const_cast<CAuiImagePane*>(this)->xb8_tex0Tok);
|
||||
|
|
|
@ -412,6 +412,7 @@ void CCompoundTargetReticle::UpdateOrbitZoneGroup(float dt, const CStateManager&
|
|||
void CCompoundTargetReticle::Draw(const CStateManager& mgr, bool hideLockon) const {
|
||||
if (mgr.GetPlayer().GetMorphballTransitionState() == CPlayer::EPlayerMorphBallState::Unmorphed &&
|
||||
!mgr.GetCameraManager()->IsInCinematicCamera()) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CCompoundTargetReticle::Draw", zeus::skCyan);
|
||||
zeus::CTransform camXf = mgr.GetCameraManager()->GetCurrentCameraTransform(mgr);
|
||||
CGraphics::SetViewPointMatrix(camXf);
|
||||
if (!hideLockon) {
|
||||
|
|
|
@ -9,6 +9,8 @@ CIOWin::EMessageReturn CConsoleOutputWindow::OnMessage(const CArchitectureMessag
|
|||
return EMessageReturn::Normal;
|
||||
}
|
||||
|
||||
void CConsoleOutputWindow::Draw() const {}
|
||||
void CConsoleOutputWindow::Draw() const {
|
||||
//SCOPED_GRAPHICS_DEBUG_GROUP("CConsoleOutputWindow::Draw", zeus::skGreen);
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "CErrorOutputWindow.hpp"
|
||||
#include "Graphics/CGraphics.hpp"
|
||||
|
||||
namespace urde {
|
||||
|
||||
|
@ -13,6 +14,8 @@ CIOWin::EMessageReturn CErrorOutputWindow::OnMessage(const CArchitectureMessage&
|
|||
return EMessageReturn::Normal;
|
||||
}
|
||||
|
||||
void CErrorOutputWindow::Draw() const {}
|
||||
void CErrorOutputWindow::Draw() const {
|
||||
//SCOPED_GRAPHICS_DEBUG_GROUP("CErrorOutputWindow::Draw", zeus::skGreen);
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
|
|
|
@ -20,7 +20,7 @@ CGuiFrame::CGuiFrame(CAssetId id, CGuiSys& sys, int a, int b, int c, CSimplePool
|
|||
m_indexedLights.reserve(8);
|
||||
x10_rootWidget.reset(new CGuiWidget(CGuiWidget::CGuiWidgetParms(
|
||||
this, false, 0, 0, false, false, false, zeus::skWhite, CGuiWidget::EGuiModelDrawFlags::Alpha, false,
|
||||
x8_guiSys.x8_mode != CGuiSys::EUsageMode::Zero)));
|
||||
x8_guiSys.x8_mode != CGuiSys::EUsageMode::Zero, "<root>"s)));
|
||||
x8_guiSys.m_registeredFrames.insert(this);
|
||||
}
|
||||
|
||||
|
@ -131,6 +131,7 @@ void CGuiFrame::Reset() {
|
|||
void CGuiFrame::Update(float dt) { xc_headWidget->Update(dt); }
|
||||
|
||||
void CGuiFrame::Draw(const CGuiWidgetDrawParms& parms) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CGuiFrame::Draw FRME_{}"), x0_id).c_str(), zeus::skMagenta);
|
||||
CGraphics::SetCullMode(ERglCullMode::None);
|
||||
CGraphics::SetAmbientColor(zeus::skWhite);
|
||||
DisableLights();
|
||||
|
|
|
@ -41,6 +41,7 @@ void CGuiModel::Draw(const CGuiWidgetDrawParms& parms) const {
|
|||
return;
|
||||
|
||||
if (GetIsVisible()) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CGuiModel::Draw {}"), m_name).c_str(), zeus::skCyan);
|
||||
zeus::CColor moduCol = xa8_color2;
|
||||
moduCol.a() *= parms.x0_alphaMod;
|
||||
xb0_frame->EnableLights(xcc_lightMask, const_cast<CBooModel&>(model->GetInstance()));
|
||||
|
|
|
@ -34,6 +34,7 @@ void CGuiTextPane::ScaleDimensions(const zeus::CVector3f& scale) {}
|
|||
void CGuiTextPane::Draw(const CGuiWidgetDrawParms& parms) const {
|
||||
if (!GetIsVisible())
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CGuiTextPane::Draw {}"), m_name).c_str(), zeus::skCyan);
|
||||
|
||||
zeus::CVector2f dims = GetDimensions();
|
||||
|
||||
|
|
|
@ -188,6 +188,7 @@ void CGuiTextSupport::AutoSetExtent() {
|
|||
void CGuiTextSupport::Render() const {
|
||||
const_cast<CGuiTextSupport*>(this)->CheckAndRebuildRenderBuffer();
|
||||
if (CTextRenderBuffer* buf = GetCurrentPageRenderBuffer()) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CGuiTextSupport::Draw", zeus::skBlue);
|
||||
zeus::CTransform oldModel = CGraphics::g_GXModelMatrix;
|
||||
CGraphics::SetModelMatrix(oldModel * zeus::CTransform::Scale(1.f, 1.f, -1.f));
|
||||
buf->Render(x2c_geometryColor, x10_curTimeMod900);
|
||||
|
|
|
@ -11,7 +11,8 @@ CGuiWidget::CGuiWidget(const CGuiWidgetParms& parms)
|
|||
, xa4_color(parms.x10_color)
|
||||
, xa8_color2(parms.x10_color)
|
||||
, xac_drawFlags(parms.x14_drawFlags)
|
||||
, xb0_frame(parms.x0_frame) {
|
||||
, xb0_frame(parms.x0_frame)
|
||||
, m_name(parms.m_name) {
|
||||
xb6_24_pg = parms.xd_g;
|
||||
xb6_25_isVisible = parms.xa_defaultVisible;
|
||||
xb6_26_isActive = parms.xb_defaultActive;
|
||||
|
@ -41,7 +42,7 @@ CGuiWidget::CGuiWidgetParms CGuiWidget::ReadWidgetHeader(CGuiFrame* frame, CInpu
|
|||
EGuiModelDrawFlags df = EGuiModelDrawFlags(in.readUint32Big());
|
||||
|
||||
return CGuiWidget::CGuiWidgetParms(frame, useAnimController, selfId, parentId, defaultVis, defaultActive, cullFaces,
|
||||
color, df, true, false);
|
||||
color, df, true, false, std::move(name));
|
||||
}
|
||||
|
||||
std::shared_ptr<CGuiWidget> CGuiWidget::Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp) {
|
||||
|
|
|
@ -34,9 +34,10 @@ public:
|
|||
bool xe_h;
|
||||
zeus::CColor x10_color;
|
||||
EGuiModelDrawFlags x14_drawFlags;
|
||||
std::string m_name;
|
||||
CGuiWidgetParms(CGuiFrame* frame, bool useAnimController, s16 selfId, s16 parentId, bool defaultVisible,
|
||||
bool defaultActive, bool cullFaces, const zeus::CColor& color, EGuiModelDrawFlags drawFlags, bool g,
|
||||
bool h)
|
||||
bool h, std::string&& name)
|
||||
: x0_frame(frame)
|
||||
, x4_useAnimController(useAnimController)
|
||||
, x6_selfId(selfId)
|
||||
|
@ -47,7 +48,8 @@ public:
|
|||
, xd_g(g)
|
||||
, xe_h(h)
|
||||
, x10_color(color)
|
||||
, x14_drawFlags(drawFlags) {}
|
||||
, x14_drawFlags(drawFlags)
|
||||
, m_name(std::move(name)) {}
|
||||
};
|
||||
|
||||
protected:
|
||||
|
@ -76,6 +78,8 @@ protected:
|
|||
std::optional<boo::SScrollDelta> m_lastScroll;
|
||||
boo::SScrollDelta m_integerScroll;
|
||||
|
||||
std::string m_name;
|
||||
|
||||
public:
|
||||
CGuiWidget(const CGuiWidgetParms& parms);
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ void COrbitPointMarker::Update(float dt, const CStateManager& mgr) {
|
|||
void COrbitPointMarker::Draw(const CStateManager& mgr) const {
|
||||
if ((x1c_lastFreeOrbit || x20_interpTimer > 0.f) && g_tweakTargeting->DrawOrbitPoint() &&
|
||||
x28_orbitPointModel.IsLoaded()) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("COrbitPointMarker::Draw", zeus::skCyan);
|
||||
const CGameCamera* curCam = mgr.GetCameraManager()->GetCurrentCamera(mgr);
|
||||
zeus::CTransform camXf = mgr.GetCameraManager()->GetCurrentCameraTransform(mgr);
|
||||
CGraphics::SetViewPointMatrix(camXf);
|
||||
|
|
|
@ -49,6 +49,7 @@ CIOWin::EMessageReturn CSplashScreen::OnMessage(const CArchitectureMessage& msg,
|
|||
void CSplashScreen::Draw() const {
|
||||
if (!x25_textureLoaded)
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CSplashScreen::Draw", zeus::skGreen);
|
||||
|
||||
zeus::CColor color;
|
||||
if (x14_which == ESplashScreen::Nintendo)
|
||||
|
|
|
@ -77,6 +77,7 @@ void CArtifactDoll::CompleteArtifactHeadScan(const CStateManager& mgr) { UpdateA
|
|||
void CArtifactDoll::Draw(float alpha, const CStateManager& mgr, bool inArtifactCategory, int selectedArtifact) {
|
||||
if (!IsLoaded())
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CArtifactDoll::Draw", zeus::skPurple);
|
||||
|
||||
alpha *= x24_fader;
|
||||
g_Renderer->SetPerspective(55.f, g_Viewport.x8_width, g_Viewport.xc_height, 0.2f, 4096.f);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "CCredits.hpp"
|
||||
#include "Graphics/CGraphics.hpp"
|
||||
|
||||
namespace urde::MP1 {
|
||||
|
||||
|
@ -8,6 +9,8 @@ CIOWin::EMessageReturn CCredits::OnMessage(const CArchitectureMessage& msg, CArc
|
|||
return EMessageReturn::Normal;
|
||||
}
|
||||
|
||||
void CCredits::Draw() const {}
|
||||
void CCredits::Draw() const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CCredits::Draw", zeus::skGreen);
|
||||
}
|
||||
|
||||
} // namespace urde::MP1
|
||||
|
|
|
@ -35,6 +35,7 @@ void CFaceplateDecoration::Update(float dt, CStateManager& stateMgr) {
|
|||
|
||||
void CFaceplateDecoration::Draw(CStateManager& stateMgr) {
|
||||
if (xc_ready && m_texFilter) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CFaceplateDecoration::Draw", zeus::skPurple);
|
||||
zeus::CColor color = zeus::skWhite;
|
||||
color.a() = stateMgr.GetPlayer().GetVisorSteam().GetAlpha();
|
||||
m_texFilter->DrawFilter(EFilterShape::FullscreenQuarters, color, 1.f);
|
||||
|
|
|
@ -1884,6 +1884,7 @@ void CFrontEndUI::HandleDebugMenuReturnValue(CGameDebug::EReturnValue val, CArch
|
|||
void CFrontEndUI::Draw() const {
|
||||
if (x14_phase < EPhase::DisplayFrontEnd)
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CFrontEndUI::Draw", zeus::skGreen);
|
||||
|
||||
if (xec_emuFrme) {
|
||||
xec_emuFrme->Draw(xdc_saveUI.get());
|
||||
|
|
|
@ -29,6 +29,7 @@ void CGameCubeDoll::Update(float dt) {
|
|||
void CGameCubeDoll::Draw(float alpha) {
|
||||
if (!IsLoaded())
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CGameCubeDoll::Draw", zeus::skPurple);
|
||||
|
||||
g_Renderer->SetPerspective(55.f, g_Viewport.x8_width, g_Viewport.xc_height, 0.2f, 4096.f);
|
||||
CGraphics::SetViewPointMatrix(zeus::CTransform::Translate(0.f, -2.f, 0.f));
|
||||
|
|
|
@ -461,6 +461,7 @@ void CInGameGuiManager::PreDraw(CStateManager& stateMgr, bool cameraActive) {
|
|||
}
|
||||
|
||||
void CInGameGuiManager::Draw(CStateManager& stateMgr) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CInGameGuiManager::Draw", zeus::skBlue);
|
||||
// if (!GetIsGameDraw())
|
||||
// g_Renderer->x318_26_requestRGBA6 = true;
|
||||
if (x1d8_onScreenTexAlpha > 0.f && x1dc_onScreenTexTok.IsLoaded()) {
|
||||
|
|
|
@ -240,6 +240,7 @@ void CInventoryScreen::ProcessControllerInput(const CFinalInput& input) {
|
|||
}
|
||||
|
||||
void CInventoryScreen::Draw(float transInterp, float totalAlpha, float yOff) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CInventoryScreen::Draw", zeus::skPurple);
|
||||
CPauseScreenBase::Draw(transInterp, totalAlpha, std::fabs(x19c_samusDoll->GetViewInterpolation()));
|
||||
x19c_samusDoll->Draw(x4_mgr, transInterp * (1.f - x1a4_textBodyAlpha));
|
||||
}
|
||||
|
|
|
@ -331,6 +331,7 @@ void CLogBookScreen::ProcessControllerInput(const CFinalInput& input) {
|
|||
}
|
||||
|
||||
void CLogBookScreen::Draw(float transInterp, float totalAlpha, float yOff) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CInventoryScreen::Draw", zeus::skPurple);
|
||||
CPauseScreenBase::Draw(transInterp, totalAlpha, yOff);
|
||||
bool artifactSel = x10_mode == EMode::RightTable && IsArtifactCategorySelected();
|
||||
x258_artifactDoll->Draw(transInterp * (1.f - x254_viewInterp), x4_mgr, artifactSel,
|
||||
|
|
|
@ -194,6 +194,7 @@ void CMFGame::Touch() {
|
|||
void CMFGame::Draw() const {
|
||||
if (!x2a_24_initialized)
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CMFGame::Draw", zeus::skGreen);
|
||||
|
||||
const_cast<CMFGame&>(*this).Touch();
|
||||
if (x18_guiManager->GetIsGameDraw()) {
|
||||
|
@ -360,6 +361,9 @@ CIOWin::EMessageReturn CMFGameLoader::OnMessage(const CArchitectureMessage& msg,
|
|||
return EMessageReturn::Exit;
|
||||
}
|
||||
|
||||
void CMFGameLoader::Draw() const { g_GameState->GetWorldTransitionManager()->Draw(); }
|
||||
void CMFGameLoader::Draw() const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CMFGameLoader::Draw", zeus::skGreen);
|
||||
g_GameState->GetWorldTransitionManager()->Draw();
|
||||
}
|
||||
|
||||
} // namespace urde::MP1
|
||||
|
|
|
@ -127,6 +127,7 @@ bool CMessageScreen::Update(float dt, float blurAmt) {
|
|||
void CMessageScreen::Draw() const {
|
||||
if (!x18_loadedMsgScreen)
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CMessageScreen::Draw", zeus::skPurple);
|
||||
|
||||
x18_loadedMsgScreen->Draw(CGuiWidgetDrawParms(x70_blurAmt, zeus::skZero3f));
|
||||
}
|
||||
|
|
|
@ -163,6 +163,7 @@ void COptionsScreen::ProcessControllerInput(const CFinalInput& input) {
|
|||
}
|
||||
|
||||
void COptionsScreen::Draw(float transInterp, float totalAlpha, float yOff) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("COptionsScreen::Draw", zeus::skPurple);
|
||||
CPauseScreenBase::Draw(transInterp, totalAlpha, yOff);
|
||||
x1a0_gameCube->Draw(transInterp * (1.f - x29c_optionAlpha));
|
||||
if (x19c_quitGame) {
|
||||
|
|
|
@ -320,6 +320,7 @@ void CPauseScreen::PreDraw() {
|
|||
void CPauseScreen::Draw() {
|
||||
if (!IsLoaded())
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CPauseScreen::Draw", zeus::skPurple);
|
||||
|
||||
float totalAlpha = 0.f;
|
||||
float yOff = 0.f;
|
||||
|
|
|
@ -344,6 +344,8 @@ void CPauseScreenBase::ResetMouseState() {
|
|||
}
|
||||
|
||||
void CPauseScreenBase::Draw(float mainAlpha, float frameAlpha, float yOff) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CPauseScreenBase::Draw", zeus::skBlue);
|
||||
|
||||
zeus::CColor color = zeus::skWhite;
|
||||
color.a() = mainAlpha * x14_alpha;
|
||||
x60_basewidget_pivot->SetColor(color);
|
||||
|
|
|
@ -84,6 +84,7 @@ void CPauseScreenBlur::Update(float dt, const CStateManager& stateMgr, bool b) {
|
|||
}
|
||||
|
||||
void CPauseScreenBlur::Draw(const CStateManager&) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CPauseScreenBlur::Draw", zeus::skPurple);
|
||||
const_cast<CCameraBlurPass&>(x1c_camBlur).Draw(true);
|
||||
float t = std::fabs(x18_blurAmt);
|
||||
if (x1c_camBlur.GetCurrType() != EBlurType::NoBlur) {
|
||||
|
|
|
@ -320,6 +320,8 @@ void CPlayerVisor::LockUnlockAssets() {
|
|||
}
|
||||
|
||||
void CPlayerVisor::DrawScanEffect(const CStateManager& mgr, const CTargetingManager* tgtMgr) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CPlayerVisor::DrawScanEffect", zeus::skMagenta);
|
||||
|
||||
bool indicatorsDrawn = DrawScanObjectIndicators(mgr);
|
||||
if (tgtMgr && indicatorsDrawn) {
|
||||
CGraphics::SetDepthRange(DEPTH_TARGET_MANAGER, DEPTH_TARGET_MANAGER);
|
||||
|
@ -454,7 +456,10 @@ void CPlayerVisor::DrawScanEffect(const CStateManager& mgr, const CTargetingMana
|
|||
// cull faces
|
||||
}
|
||||
|
||||
void CPlayerVisor::DrawXRayEffect(const CStateManager&) const { const_cast<CCameraBlurPass&>(x90_xrayBlur).Draw(); }
|
||||
void CPlayerVisor::DrawXRayEffect(const CStateManager&) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CPlayerVisor::DrawXRayEffect", zeus::skMagenta);
|
||||
const_cast<CCameraBlurPass&>(x90_xrayBlur).Draw();
|
||||
}
|
||||
|
||||
void CPlayerVisor::DrawThermalEffect(const CStateManager&) const {
|
||||
// Empty
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "GuiSys/CStringTable.hpp"
|
||||
#include "GuiSys/CGuiWidgetDrawParms.hpp"
|
||||
#include "Audio/CSfxManager.hpp"
|
||||
#include "Graphics/CGraphics.hpp"
|
||||
|
||||
namespace urde::MP1 {
|
||||
|
||||
|
@ -80,6 +81,7 @@ EQuitAction CQuitGameScreen::Update(float dt) {
|
|||
}
|
||||
|
||||
void CQuitGameScreen::Draw() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CQuitGameScreen::Draw", zeus::skPurple);
|
||||
if (x0_type == EQuitType::QuitGame)
|
||||
m_blackScreen->draw(zeus::CColor(0.f, 0.5f));
|
||||
|
||||
|
|
|
@ -267,6 +267,7 @@ void CSamusDoll::Update(float dt, CRandom16& rand) {
|
|||
void CSamusDoll::Draw(const CStateManager& mgr, float alpha) {
|
||||
if (!IsLoaded())
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CSamusDoll::Draw", zeus::skPurple);
|
||||
|
||||
alpha *= x40_alphaIn;
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ void CSamusFaceReflection::Draw(const CStateManager& mgr) const {
|
|||
return;
|
||||
|
||||
if (TCastToConstPtr<CFirstPersonCamera> fpCam = (mgr.GetCameraManager()->GetCurrentCamera(mgr))) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CSamusFaceReflection::Draw", zeus::skBlue);
|
||||
zeus::CQuaternion camRot(fpCam->GetTransform().basis);
|
||||
float dist = ITweakGui::FaceReflectionDistanceDebugValueToActualValue(g_tweakGui->GetFaceReflectionDistance());
|
||||
float height = ITweakGui::FaceReflectionHeightDebugValueToActualValue(g_tweakGui->GetFaceReflectionHeight());
|
||||
|
|
|
@ -291,7 +291,7 @@ void CSamusHud::InitializeDamageLight() {
|
|||
s16 parentId = x288_loadedSelectedHud->FindWidget("basewidget_pivot")->GetSelfId();
|
||||
CGuiWidget::CGuiWidgetParms parms(x288_loadedSelectedHud, false, lightId, parentId, true, true, false,
|
||||
g_tweakGuiColors->GetHudDamageLightColor(), CGuiWidget::EGuiModelDrawFlags::Alpha,
|
||||
false, false);
|
||||
false, false, "DamageSpotLight"s);
|
||||
|
||||
std::shared_ptr<CGuiLight> light = std::make_shared<CGuiLight>(
|
||||
parms, CLight::BuildSpot(zeus::skZero3f, zeus::skForward, zeus::skWhite,
|
||||
|
@ -1382,6 +1382,7 @@ void CSamusHud::Draw(const CStateManager& mgr, float alpha, CInGameGuiManager::E
|
|||
bool targetingManager) const {
|
||||
if (x2bc_nextState == EHudState::None)
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CSamusHud::Draw", zeus::skBlue);
|
||||
x3a8_camFilter.Draw();
|
||||
if (mgr.GetPlayer().GetMorphballTransitionState() == CPlayer::EPlayerMorphBallState::Unmorphed) {
|
||||
DrawAttachedEnemyEffect(mgr);
|
||||
|
|
|
@ -319,6 +319,7 @@ void CSaveGameScreen::SetUIColors() {
|
|||
}
|
||||
|
||||
void CSaveGameScreen::Draw() const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CSaveGameScreen::Draw", zeus::skPurple);
|
||||
if (x50_loadedFrame)
|
||||
x50_loadedFrame->Draw(CGuiWidgetDrawParms::Default);
|
||||
}
|
||||
|
|
|
@ -134,6 +134,7 @@ void CSlideShow::SSlideData::Draw() const {
|
|||
}
|
||||
|
||||
void CSlideShow::Draw() const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CSlideShow::Draw", zeus::skGreen);
|
||||
if (x14_phase == Phase::Five) {
|
||||
x5c_slideA.Draw();
|
||||
x90_slideB.Draw();
|
||||
|
|
|
@ -233,6 +233,7 @@ void CDecal::RenderMdl() const {
|
|||
}
|
||||
|
||||
void CDecal::Render() const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CDecal::Render", zeus::skYellow);
|
||||
CGlobalRandom gr(sDecalRandom);
|
||||
if (x5c_29_modelInvalid && x5c_30_quad2Invalid && x5c_31_quad1Invalid)
|
||||
return;
|
||||
|
|
|
@ -792,6 +792,9 @@ u32 CElementGen::GetSystemCount() {
|
|||
}
|
||||
|
||||
void CElementGen::Render(const CActorLights* actorLights) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CElementGen::Render {}"),
|
||||
*x1c_genDesc.GetObjectTag()).c_str(), zeus::skYellow);
|
||||
|
||||
CGenDescription* desc = x1c_genDesc.GetObj();
|
||||
|
||||
x274_backupLightActive = CGraphics::g_LightActive;
|
||||
|
|
|
@ -548,6 +548,9 @@ bool CParticleElectric::Update(double dt) {
|
|||
}
|
||||
|
||||
void CParticleElectric::Render(const CActorLights* lights) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CParticleElectric::Render {}"),
|
||||
*x1c_elecDesc.GetObjectTag()).c_str(), zeus::skYellow);
|
||||
|
||||
if (x3e8_electricManagers.size()) {
|
||||
if (x450_29_transformDirty)
|
||||
UpdateCachedTransform();
|
||||
|
|
|
@ -870,6 +870,8 @@ void CParticleSwoosh::Render2SidedNoSplineNoGaps() {
|
|||
void CParticleSwoosh::Render(const CActorLights*) {
|
||||
if (x1b4_LENG < 2 || x1ac_particleCount <= 1)
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CParticleSwoosh::Render {}"),
|
||||
*x1c_desc.GetObjectTag()).c_str(), zeus::skYellow);
|
||||
|
||||
m_cachedVerts.clear();
|
||||
if (m_dataBind[0])
|
||||
|
|
|
@ -184,6 +184,8 @@ void CEnergyProjectile::Think(float dt, CStateManager& mgr) {
|
|||
}
|
||||
|
||||
void CEnergyProjectile::Render(const CStateManager& mgr) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CEnergyProjectile::Render WPSC_{}"), x2cc_wpscId).c_str(), zeus::skOrange);
|
||||
|
||||
CPlayerState::EPlayerVisor visor = mgr.GetPlayerState()->GetActiveVisor(mgr);
|
||||
if (visor == CPlayerState::EPlayerVisor::Combat) {
|
||||
if ((xe8_projectileAttribs & EProjectileAttrib::Charged) == EProjectileAttrib::Charged ||
|
||||
|
|
|
@ -490,6 +490,7 @@ void CGrappleArm::PointGenerator(void* ctx, const std::vector<std::pair<zeus::CV
|
|||
void CGrappleArm::Render(const CStateManager& mgr, const zeus::CVector3f& pos, const CModelFlags& flags,
|
||||
const CActorLights* lights) const {
|
||||
if (x3b2_24_active && !x3b2_29_suitLoading) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CGrappleArm::Render", zeus::skOrange);
|
||||
zeus::CTransform modelXf = zeus::CTransform::Translate(pos) * x220_xf * x2e0_auxXf;
|
||||
if (x50_grappleArmSkeletonModel)
|
||||
RenderXRayModel(mgr, modelXf, flags);
|
||||
|
|
|
@ -406,6 +406,7 @@ void CPlasmaProjectile::AddToRenderer(const zeus::CFrustum& frustum, const CStat
|
|||
void CPlasmaProjectile::Render(const CStateManager& mgr) const {
|
||||
if (!GetActive())
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CPlasmaProjectile::Render", zeus::skOrange);
|
||||
|
||||
zeus::CTransform xf = GetBeamTransform();
|
||||
|
||||
|
|
|
@ -2082,6 +2082,8 @@ static const CModelFlags kHandThermalFlag = {7, 0, 3, zeus::skWhite};
|
|||
static const CModelFlags kHandHoloFlag = {1, 0, 3, zeus::CColor(0.75f, 0.5f, 0.f, 1.f)};
|
||||
|
||||
void CPlayerGun::Render(const CStateManager& mgr, const zeus::CVector3f& pos, const CModelFlags& flags) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CPlayerGun::Render", zeus::skMagenta);
|
||||
|
||||
CGraphics::CProjectionState projState = CGraphics::GetProjectionState();
|
||||
CModelFlags useFlags = flags;
|
||||
if (x0_lights.HasShadowLight())
|
||||
|
|
|
@ -204,6 +204,9 @@ void CActor::DrawTouchBounds() const {
|
|||
}
|
||||
|
||||
void CActor::RenderInternal(const CStateManager& mgr) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CActor::RenderInternal {} {} {}"),
|
||||
x8_uid, xc_editorId, x10_name).c_str(), zeus::skOrange);
|
||||
|
||||
CModelData::EWhichModel which = CModelData::GetRenderingModel(mgr);
|
||||
if (which == CModelData::EWhichModel::ThermalHot) {
|
||||
if (x64_modelData->GetSortThermal()) {
|
||||
|
|
|
@ -538,6 +538,7 @@ void CEnvFxManager::Render(const CStateManager& mgr) const {
|
|||
if (mgr.GetPlayer().GetMorphballTransitionState() != CPlayer::EPlayerMorphBallState::Unmorphed ||
|
||||
(mgr.GetPlayerState()->GetCurrentVisor() != CPlayerState::EPlayerVisor::Thermal &&
|
||||
(fxType != EEnvFxType::Snow || mgr.GetPlayerState()->GetCurrentVisor() != CPlayerState::EPlayerVisor::XRay))) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CEnvFxManager::Render", zeus::skCyan);
|
||||
// No Cull
|
||||
// ZTest, No ZWrite
|
||||
zeus::CTransform xf = GetParticleBoundsToWorldTransform();
|
||||
|
|
|
@ -523,6 +523,8 @@ void CFishCloud::RenderBoid(int idx, const CBoid& boid, u32& drawMask,
|
|||
void CFishCloud::Render(const CStateManager& mgr) const {
|
||||
if (!GetActive())
|
||||
return;
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CFishCloud::Render {} {} {}"),
|
||||
x8_uid, xc_editorId, x10_name).c_str(), zeus::skOrange);
|
||||
bool thermalHot = mgr.GetThermalDrawFlag() == EThermalDrawFlag::Hot;
|
||||
CModelFlags flags(0, 0, 3, zeus::skWhite);
|
||||
if (mgr.GetPlayerState()->GetActiveVisor(mgr) == CPlayerState::EPlayerVisor::XRay)
|
||||
|
|
|
@ -739,11 +739,12 @@ void CFluidPlaneCPU::Render(const CStateManager& mgr, float alpha, const zeus::C
|
|||
const std::optional<CRippleManager>& rippleManager, TUniqueId waterId,
|
||||
const bool* gridFlags, u32 gridDimX, u32 gridDimY,
|
||||
const zeus::CVector3f& areaCenter) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CFluidPlaneCPU::Render", zeus::skCyan);
|
||||
TCastToConstPtr<CScriptWater> water = mgr.GetObjectById(waterId);
|
||||
CFluidPlaneShader::RenderSetupInfo setupInfo = RenderSetup(mgr, alpha, xf, areaXf, aabb, water.GetPtr());
|
||||
|
||||
if (!m_shader->isReady())
|
||||
return;
|
||||
//if (!m_shader->isReady())
|
||||
// return;
|
||||
|
||||
CFluidPlaneRender::NormalMode normalMode;
|
||||
if (xb0_bumpMap && kEnableWaterBumpMaps)
|
||||
|
|
|
@ -62,10 +62,11 @@ void CFluidPlaneDoor::Render(const CStateManager& mgr, float alpha, const zeus::
|
|||
const std::optional<CRippleManager>& rippleManager, TUniqueId waterId,
|
||||
const bool* gridFlags, u32 gridDimX, u32 gridDimY,
|
||||
const zeus::CVector3f& areaCenter) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CFluidPlaneDoor::Render", zeus::skCyan);
|
||||
CFluidPlaneShader::RenderSetupInfo setupInfo = RenderSetup(mgr, alpha, xf, aabb, noNormals);
|
||||
|
||||
if (!m_shader->isReady())
|
||||
return;
|
||||
//if (!m_shader->isReady())
|
||||
// return;
|
||||
|
||||
CFluidPlaneRender::numSubdivisionsInTile = xa4_tileSubdivisions;
|
||||
CFluidPlaneRender::numTilesInHField = 42 / xa4_tileSubdivisions;
|
||||
|
|
|
@ -96,6 +96,7 @@ void CHUDBillboardEffect::PreRender(CStateManager& mgr, const zeus::CFrustum& fr
|
|||
|
||||
void CHUDBillboardEffect::Render(const CStateManager& mgr) const {
|
||||
if (x104_25_enableRender && !x104_24_renderAsParticleGen) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CHUDBillboardEffect::Render", zeus::skPurple);
|
||||
xe8_generator->Render();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1407,6 +1407,7 @@ static const u8 BallSwooshColorsJaggy[9][3] = {{0xFF, 0xCC, 0x00}, {0xFF, 0xCC,
|
|||
{0xFF, 0xCC, 0x00}, {0xFF, 0xCC, 0x00}, {0xFF, 0xCC, 0x00}};
|
||||
|
||||
void CMorphBall::Render(const CStateManager& mgr, const CActorLights* lights) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CPlayer::Render", zeus::skPurple);
|
||||
zeus::CTransform ballToWorld = GetBallToWorld();
|
||||
if (x28_tireMode) {
|
||||
ballToWorld = ballToWorld * zeus::CQuaternion::fromAxisAngle(ballToWorld.transposeRotate(x0_player.x500_lookDir),
|
||||
|
|
|
@ -1156,6 +1156,7 @@ void CPlayer::Render(const CStateManager& mgr) const {
|
|||
if (TCastToConstPtr<CCinematicCamera> cam = mgr.GetCameraManager()->GetCurrentCamera(mgr))
|
||||
doRender = (x2f8_morphBallState == EPlayerMorphBallState::Morphed && cam->GetFlags() & 0x40);
|
||||
if (x2f4_cameraState != EPlayerCameraState::FirstPerson && doRender) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CPlayer::Render", zeus::skOrange);
|
||||
CBooModel::SetReflectionCube(m_reflectionCube);
|
||||
bool doTransitionRender = false;
|
||||
bool doBallRender = false;
|
||||
|
|
|
@ -991,6 +991,8 @@ void CWallCrawlerSwarm::RenderBoid(const CBoid* boid, u32& drawMask, bool therma
|
|||
}
|
||||
|
||||
void CWallCrawlerSwarm::Render(const CStateManager& mgr) const {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP(fmt::format(fmt("CWallCrawlerSwarm::Render {} {} {}"),
|
||||
x8_uid, xc_editorId, x10_name).c_str(), zeus::skOrange);
|
||||
u32 drawMask = 0xffffffff;
|
||||
bool r24 = x560_24_enableLighting;
|
||||
bool r23 = x560_25_useSoftwareLight;
|
||||
|
|
|
@ -646,6 +646,8 @@ void CWorld::DrawSky(const zeus::CTransform& xf) const {
|
|||
if (!x70_27_skyboxVisible)
|
||||
return;
|
||||
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CWorld::DrawSky", zeus::skCyan);
|
||||
|
||||
CGraphics::DisableAllLights();
|
||||
CGraphics::SetModelMatrix(xf);
|
||||
g_Renderer->SetAmbientColor(zeus::skWhite);
|
||||
|
|
|
@ -232,6 +232,7 @@ void CWorldTransManager::DrawSecondPass(CActorLights* lights) {
|
|||
}
|
||||
|
||||
void CWorldTransManager::DrawEnabled() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CWorldTransManager::DrawEnabled", zeus::skPurple);
|
||||
CActorLights lights(0, zeus::skZero3f, 4, 4, 0, 0, 0, 0.1f);
|
||||
lights.BuildFakeLightList(x4_modelData->x1a0_lights, zeus::CColor{0.1f, 0.1f, 0.1f, 1.0f});
|
||||
|
||||
|
@ -305,9 +306,13 @@ void CWorldTransManager::DrawEnabled() {
|
|||
m_fadeToBlack.draw(zeus::CColor{0.f, 0.f, 0.f, ftbT});
|
||||
}
|
||||
|
||||
void CWorldTransManager::DrawDisabled() { m_fadeToBlack.draw(zeus::CColor{0.f, 0.f, 0.f, 0.01f}); }
|
||||
void CWorldTransManager::DrawDisabled() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CWorldTransManager::DrawDisabled", zeus::skPurple);
|
||||
m_fadeToBlack.draw(zeus::CColor{0.f, 0.f, 0.f, 0.01f});
|
||||
}
|
||||
|
||||
void CWorldTransManager::DrawText() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CWorldTransManager::DrawText", zeus::skPurple);
|
||||
float width = 448.f * g_Viewport.aspect;
|
||||
CGraphics::SetOrtho(0.f, width, 448.f, 0.f, -4096.f, 4096.f);
|
||||
CGraphics::SetViewPointMatrix(zeus::CTransform());
|
||||
|
|
|
@ -309,7 +309,13 @@ vec4 PostFunc(vec4 colorIn) {
|
|||
#endif
|
||||
|
||||
#if defined(URDE_LIGHTING_CUBE_REFLECTION) || defined(URDE_LIGHTING_CUBE_REFLECTION_SHADOW)
|
||||
vec3 ReflectionFunc(float roughness) { return texture(reflectionTex, reflect(vtf.mvPos.xyz, vtf.mvNorm.xyz), roughness).rgb; }
|
||||
vec3 ReflectionFunc(float roughness) {
|
||||
vec3 coords = reflect(vtf.mvPos.xyz, vtf.mvNorm.xyz);
|
||||
#ifdef VULKAN
|
||||
coords = vec3(coords.x, -coords.y, coords.z);
|
||||
#endif
|
||||
return texture(reflectionTex, coords, roughness).rgb;
|
||||
}
|
||||
#elif defined(URDE_REFLECTION_SIMPLE)
|
||||
vec3 ReflectionFunc() { return texture(reflectionTex, vtf.dynReflectionUvs[1]).rgb * vtf.dynReflectionAlpha; }
|
||||
#elif defined(URDE_REFLECTION_INDIRECT)
|
||||
|
|
|
@ -308,7 +308,8 @@ float4 PostFunc(in VertToFrag vtf, float4 colorIn) {
|
|||
|
||||
#if defined(URDE_LIGHTING_CUBE_REFLECTION) || defined(URDE_LIGHTING_CUBE_REFLECTION_SHADOW)
|
||||
float3 ReflectionFunc(in VertToFrag vtf, float roughness) {
|
||||
return reflectionTex.SampleBias(reflectSamp, reflect(vtf.mvPos.xyz, vtf.mvNorm.xyz), roughness).rgb;
|
||||
float3 coords = reflect(vtf.mvPos.xyz, vtf.mvNorm.xyz);
|
||||
return reflectionTex.SampleBias(reflectSamp, float3(coords.x, -coords.y, coords.z), roughness).rgb;
|
||||
}
|
||||
#elif defined(URDE_REFLECTION_SIMPLE)
|
||||
float3 ReflectionFunc(in VertToFrag vtf)
|
||||
|
|
|
@ -303,7 +303,7 @@ float4 PostFunc(thread VertToFrag& vtf, constant LightingUniform& lu,
|
|||
|
||||
#if defined(URDE_LIGHTING_CUBE_REFLECTION) || defined(URDE_LIGHTING_CUBE_REFLECTION_SHADOW)
|
||||
#define ReflectionFunc(roughness) \
|
||||
(reflectionTex.sample(reflectSamp, reflect(vtf.mvPos.xyz, vtf.mvNorm.xyz), bias(roughness)).rgb)
|
||||
(reflectionTex.sample(reflectSamp, float3(reflectionCoords.x, -reflectionCoords.y, reflectionCoords.z), bias(roughness)).rgb)
|
||||
#elif defined(URDE_REFLECTION_SIMPLE)
|
||||
#define ReflectionFunc() \
|
||||
(reflectionTex.sample(reflectSamp, vtf.dynReflectionUvs1).rgb * vtf.dynReflectionAlpha)
|
||||
|
@ -342,6 +342,7 @@ fragment float4 fmain(VertToFrag vtf [[ stage_in ]],
|
|||
float3 lighting = LightingFunc(vtf, lu, extTex0, clampSamp);
|
||||
float4 tmp;
|
||||
#if defined(URDE_LIGHTING_CUBE_REFLECTION) || defined(URDE_LIGHTING_CUBE_REFLECTION_SHADOW)
|
||||
float3 reflectionCoords = reflect(vtf.mvPos.xyz, vtf.mvNorm.xyz);
|
||||
tmp.rgb = (SampleTexture_lightmap() * colorReg1.rgb + lighting) * SampleTexture_diffuse() +
|
||||
SampleTexture_emissive() + (SampleTexture_specular() + SampleTexture_extendedSpecular() * lighting) *
|
||||
(SampleTexture_reflection() * ReflectionFunc(saturate(0.5 - SampleTextureAlpha_specular())) * 2.0);
|
||||
|
|
|
@ -166,7 +166,7 @@ static const char* TessES =
|
|||
"SBINDING(0) patch in vec4 minMaxPos;\n"
|
||||
"SBINDING(0) out VertToFrag vtf;\n"
|
||||
"\n"
|
||||
"TBINDING##RIPPLE_TEXTURE_IDX uniform sampler2D RippleMap;\n"
|
||||
"RIPPLE_TEXTURE_BINDING uniform sampler2D RippleMap;\n"
|
||||
"\n"
|
||||
"const float PI_X2 = 6.283185307179586;\n"
|
||||
"\n"
|
||||
|
@ -600,6 +600,7 @@ static void _BuildAdditionalTCGs(std::stringstream& out, const SFluidPlaneShader
|
|||
int nextTCG = 3;
|
||||
int nextMtx = 4;
|
||||
|
||||
out << "#define ADDITIONAL_TCGS ";
|
||||
if (info.m_hasBumpMap)
|
||||
fmt::print(out, fmt("vtf.uvs[{}] = (texMtxs[0] * pos).xy;"), nextTCG++);
|
||||
if (info.m_hasEnvBumpMap)
|
||||
|
@ -687,7 +688,7 @@ static std::string BuildES(const SFluidPlaneShaderInfo& info) {
|
|||
|
||||
std::stringstream out;
|
||||
_BuildAdditionalTCGs(out, info);
|
||||
out << "#define RIPPLE_TEXTURE_IDX " << nextTex << '\n';
|
||||
out << "#define RIPPLE_TEXTURE_BINDING TBINDING" << nextTex << '\n';
|
||||
out << TessES;
|
||||
return out.str();
|
||||
}
|
||||
|
@ -718,7 +719,7 @@ static std::string _BuildFS(const SFluidPlaneDoorShaderInfo& info) {
|
|||
int nextTex = 0;
|
||||
std::stringstream out;
|
||||
|
||||
out << "#define TEXTURE_PARAMS ";
|
||||
out << "#define TEXTURE_DECLS ";
|
||||
if (info.m_hasPatternTex1)
|
||||
fmt::print(out, fmt("TBINDING{} uniform sampler2D patternTex1;"), nextTex++);
|
||||
if (info.m_hasPatternTex2)
|
||||
|
|
|
@ -197,7 +197,7 @@ static const char* TessES =
|
|||
"struct ControlPoint\n"
|
||||
"{};\n"
|
||||
"\n"
|
||||
"Texture2D RippleMap : register(t##RIPPLE_TEXTURE_IDX);\n"
|
||||
"Texture2D RippleMap : register(RIPPLE_TEXTURE_REG);\n"
|
||||
"SamplerState samp : register(s2);\n"
|
||||
"\n"
|
||||
"static const float PI_X2 = 6.283185307179586;\n"
|
||||
|
@ -703,7 +703,7 @@ static std::string BuildES(const SFluidPlaneShaderInfo& info) {
|
|||
|
||||
std::stringstream out;
|
||||
_BuildAdditionalTCGs(out, info);
|
||||
out << "#define RIPPLE_TEXTURE_IDX " << nextTex << '\n';
|
||||
out << "#define RIPPLE_TEXTURE_REG t" << nextTex << '\n';
|
||||
out << TessES;
|
||||
return out.str();
|
||||
}
|
||||
|
@ -724,7 +724,7 @@ static std::string _BuildFS(const SFluidPlaneDoorShaderInfo& info) {
|
|||
int nextTex = 0;
|
||||
std::stringstream out;
|
||||
|
||||
out << "#define TEXTURE_PARAMS ";
|
||||
out << "#define TEXTURE_DECLS ";
|
||||
if (info.m_hasPatternTex1)
|
||||
fmt::print(out, fmt("Texture2D patternTex1 : register(t{});"), nextTex++);
|
||||
if (info.m_hasPatternTex2)
|
||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit bd781e15bdbdc737e49afb0e5ab6f4b7752fea4b
|
||||
Subproject commit 056c2f330e2dc1c5b5f93bfca848e73036046a0f
|
2
specter
2
specter
|
@ -1 +1 @@
|
|||
Subproject commit 539585f52719caf0a2d3c433c512ccc23c851b7f
|
||||
Subproject commit cd88683372cbc59140a66ee98587058f8bdb985f
|
Loading…
Reference in New Issue