2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 07:47:42 +00:00

Graphics debug groups and bug fixes

This commit is contained in:
Jack Andersen
2019-07-20 22:42:52 -10:00
parent b4fe474de3
commit 5acf9ecbcf
90 changed files with 217 additions and 27 deletions

View File

@@ -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);