mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-11 08:27:43 +00:00
CElementGenShaders, CDecalShaders fixes
Add conditions for HSH_PROFILE_MODE
This commit is contained in:
@@ -59,7 +59,9 @@ void CAABoxShader::draw(const zeus::CColor& color) {
|
||||
|
||||
m_uniform.m_xf = CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f();
|
||||
m_uniform.m_color = color;
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
|
||||
m_dataBind.draw(0, VertexCount);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,9 @@ void CCameraBlurFilter::draw(float amount, bool clearDepth) {
|
||||
{hsh::float2{1.0, -1.0}, {xBias + xFac, yBias + yFac}},
|
||||
{hsh::float2{1.0, 1.0}, {xBias + xFac, yBias}},
|
||||
}};
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_vbo.load(verts);
|
||||
#endif
|
||||
|
||||
// m_uniform.m_uv.size()
|
||||
for (size_t i = 0; i < 6; ++i) {
|
||||
@@ -74,7 +76,9 @@ void CCameraBlurFilter::draw(float amount, bool clearDepth) {
|
||||
m_uniform.m_uv[i].y = amtY * yFac;
|
||||
}
|
||||
m_uniform.m_opacity = std::min(amount / 2.f, 1.f);
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
m_dataBind.draw(0, 4);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ CColoredQuadFilter::CColoredQuadFilter(EFilterType type) {
|
||||
void CColoredQuadFilter::draw(const zeus::CColor& color, const zeus::CRectangle& rect) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CColoredQuadFilter::draw", zeus::skMagenta);
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniform.m_matrix = zeus::CMatrix4f{};
|
||||
m_uniform.m_matrix[0][0] = rect.size.x() * 2.f;
|
||||
m_uniform.m_matrix[1][1] = rect.size.y() * 2.f;
|
||||
@@ -46,6 +47,7 @@ void CColoredQuadFilter::draw(const zeus::CColor& color, const zeus::CRectangle&
|
||||
m_uniform.m_matrix[3][1] = rect.position.y() * 2.f - 1.f;
|
||||
m_uniform.m_color = color;
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
|
||||
m_dataBind.draw(0, 4);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,9 @@ void CColoredStripShader::draw(const zeus::CColor& color, size_t numVerts, const
|
||||
|
||||
m_uniform.m_matrix = CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f();
|
||||
m_uniform.m_color = color;
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
|
||||
m_dataBind.draw(0, numVerts);
|
||||
}
|
||||
|
||||
@@ -40,16 +40,15 @@ struct CDecalShaderNoTexPipeline : pipeline<std::conditional_t<Additive, Additiv
|
||||
template struct CDecalShaderNoTexPipeline<true>;
|
||||
template struct CDecalShaderNoTexPipeline<false>;
|
||||
|
||||
hsh::binding& CDecalShaders::BuildShaderDataBinding(CQuadDecal& decal, hsh::texture2d tex) {
|
||||
void CDecalShaders::BuildShaderDataBinding(hsh::binding& binding, CQuadDecal& decal, hsh::texture2d tex) {
|
||||
bool additive = decal.m_desc->x18_ADD;
|
||||
if (decal.m_desc->x14_TEX) {
|
||||
bool redToAlpha = additive && CDecal::GetMoveRedToAlphaBuffer();
|
||||
m_dataBind.hsh_tex_bind(
|
||||
binding.hsh_tex_bind(
|
||||
CDecalShaderTexPipeline<additive, redToAlpha>(decal.m_instBuf.get(), decal.m_uniformBuf.get(), tex));
|
||||
} else {
|
||||
m_dataBind.hsh_notex_bind(CDecalShaderNoTexPipeline<additive>(decal.m_instBuf.get(), decal.m_uniformBuf.get()));
|
||||
binding.hsh_notex_bind(CDecalShaderNoTexPipeline<additive>(decal.m_instBuf.get(), decal.m_uniformBuf.get()));
|
||||
}
|
||||
return m_dataBind;
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
|
||||
@@ -6,10 +6,8 @@ namespace urde {
|
||||
struct CQuadDecal;
|
||||
|
||||
class CDecalShaders {
|
||||
hsh::binding m_dataBind;
|
||||
|
||||
public:
|
||||
hsh::binding& BuildShaderDataBinding(CQuadDecal& decal, hsh::texture2d tex);
|
||||
static void BuildShaderDataBinding(hsh::binding& binding, CQuadDecal& decal, hsh::texture2d tex);
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
|
||||
@@ -77,6 +77,7 @@ struct CElementGenShadersNoTexPipeline
|
||||
}
|
||||
};
|
||||
template struct CElementGenShadersNoTexPipeline<BlendMode::Regular, false, true, false>;
|
||||
template struct CElementGenShadersNoTexPipeline<BlendMode::Additive, false, true, false>;
|
||||
|
||||
CElementGenShaders::EShaderClass CElementGenShaders::GetShaderClass(CElementGen& gen) {
|
||||
const auto* desc = gen.x1c_genDesc.GetObj();
|
||||
@@ -89,41 +90,61 @@ CElementGenShaders::EShaderClass CElementGenShaders::GetShaderClass(CElementGen&
|
||||
return EShaderClass::NoTex;
|
||||
}
|
||||
|
||||
hsh::binding& CElementGenShaders::BuildShaderDataBinding(CElementGen& gen, bool pmus) {
|
||||
void CElementGenShaders::BuildShaderDataBinding(CElementGen& gen) {
|
||||
const auto& desc = gen.x1c_genDesc;
|
||||
BlendMode mode = BlendMode::Regular;
|
||||
BlendMode pmusMode = BlendMode::Regular;
|
||||
if (CElementGen::g_subtractBlend) {
|
||||
mode = BlendMode::Subtract;
|
||||
} else if (gen.x26c_26_AAPH) {
|
||||
mode = BlendMode::Additive;
|
||||
pmusMode = BlendMode::Subtract;
|
||||
} else {
|
||||
if (gen.x26c_26_AAPH) {
|
||||
mode = BlendMode::Additive;
|
||||
}
|
||||
if (desc->x44_31_x31_25_PMAB) {
|
||||
pmusMode = BlendMode::Additive;
|
||||
}
|
||||
}
|
||||
hsh::vertex_buffer_typeless instBuf = pmus ? gen.m_instBufPmus.get() : gen.m_instBuf.get();
|
||||
hsh::uniform_buffer_typeless uniBuf = pmus ? gen.m_uniformBufPmus.get() : gen.m_uniformBuf.get();
|
||||
switch (GetShaderClass(gen)) {
|
||||
case EShaderClass::Tex: {
|
||||
hsh::texture2d tex = desc->x54_x40_TEXR->GetValueTexture(0)->GetBooTexture();
|
||||
m_shaderBind.hsh_tex_bind(
|
||||
gen.m_binding.hsh_tex_bind(
|
||||
CElementGenShadersTexPipeline<mode, g_Renderer->IsThermalVisorHotPass(), gen.x26c_28_zTest, gen.x26c_27_ZBUF,
|
||||
CElementGen::sMoveRedToAlphaBuffer>(instBuf, uniBuf, tex));
|
||||
CElementGen::sMoveRedToAlphaBuffer>(gen.m_instBuf.get(), gen.m_uniformBuf.get(),
|
||||
tex));
|
||||
if (gen.x1c_genDesc->x45_24_x31_26_PMUS)
|
||||
gen.m_bindingPmus.hsh_tex_pmus_bind(
|
||||
CElementGenShadersTexPipeline<pmusMode, g_Renderer->IsThermalVisorHotPass(), gen.x26c_28_zTest, gen.x26c_27_ZBUF,
|
||||
CElementGen::sMoveRedToAlphaBuffer>(gen.m_instBufPmus.get(),
|
||||
gen.m_uniformBufPmus.get(), tex));
|
||||
break;
|
||||
}
|
||||
case EShaderClass::IndTex: {
|
||||
hsh::texture2d texrTex = desc->x54_x40_TEXR->GetValueTexture(0)->GetBooTexture();
|
||||
hsh::texture2d tindTex = desc->x58_x44_TIND->GetValueTexture(0)->GetBooTexture();
|
||||
hsh::render_texture2d sceneTex = CGraphics::g_SpareTexture.get_color(0);
|
||||
m_shaderBind.hsh_indtex_bind(
|
||||
gen.m_binding.hsh_indtex_bind(
|
||||
CElementGenShadersIndTexPipeline<mode, g_Renderer->IsThermalVisorHotPass(), gen.x26c_28_zTest, gen.x26c_27_ZBUF,
|
||||
desc->x45_30_x32_24_CIND>(instBuf, uniBuf, texrTex, tindTex, sceneTex));
|
||||
desc->x45_30_x32_24_CIND>(gen.m_instBuf.get(), gen.m_uniformBuf.get(), texrTex,
|
||||
tindTex, sceneTex));
|
||||
if (gen.x1c_genDesc->x45_24_x31_26_PMUS)
|
||||
gen.m_bindingPmus.hsh_indtex_pmus_bind(
|
||||
CElementGenShadersIndTexPipeline<pmusMode, g_Renderer->IsThermalVisorHotPass(), gen.x26c_28_zTest,
|
||||
gen.x26c_27_ZBUF, desc->x45_30_x32_24_CIND>(
|
||||
gen.m_instBufPmus.get(), gen.m_uniformBufPmus.get(), texrTex, tindTex, sceneTex));
|
||||
break;
|
||||
}
|
||||
case EShaderClass::NoTex: {
|
||||
m_shaderBind.hsh_notex_bind(
|
||||
gen.m_binding.hsh_notex_bind(
|
||||
CElementGenShadersNoTexPipeline<mode, g_Renderer->IsThermalVisorHotPass(), gen.x26c_28_zTest, gen.x26c_27_ZBUF>(
|
||||
instBuf, uniBuf));
|
||||
gen.m_instBuf.get(), gen.m_uniformBuf.get()));
|
||||
if (gen.x1c_genDesc->x45_24_x31_26_PMUS)
|
||||
gen.m_bindingPmus.hsh_notex_pmus_bind(
|
||||
CElementGenShadersNoTexPipeline<pmusMode, g_Renderer->IsThermalVisorHotPass(), gen.x26c_28_zTest,
|
||||
gen.x26c_27_ZBUF>(gen.m_instBufPmus.get(), gen.m_uniformBufPmus.get()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return m_shaderBind;
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
|
||||
@@ -7,13 +7,10 @@ namespace urde {
|
||||
class CElementGen;
|
||||
|
||||
class CElementGenShaders {
|
||||
hsh::binding m_shaderBind;
|
||||
|
||||
public:
|
||||
enum class EShaderClass { Tex, IndTex, NoTex };
|
||||
|
||||
static EShaderClass GetShaderClass(CElementGen& gen);
|
||||
hsh::binding& BuildShaderDataBinding(CElementGen& gen, bool pmus);
|
||||
static void BuildShaderDataBinding(CElementGen& gen);
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
|
||||
@@ -42,6 +42,7 @@ void CEnergyBarShader::draw(const zeus::CColor& color0, const std::vector<Vertex
|
||||
}
|
||||
}
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
size_t vertIter = 0;
|
||||
Vertex* verts = m_vbo.map();
|
||||
if (!verts0.empty()) {
|
||||
@@ -75,6 +76,7 @@ void CEnergyBarShader::draw(const zeus::CColor& color0, const std::vector<Vertex
|
||||
m_uniBuf[2].load(m_uniform);
|
||||
m_dataBind[2].draw(vertIter, verts2.size());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
|
||||
@@ -67,14 +67,18 @@ CFogVolumeFilter::CFogVolumeFilter() {
|
||||
void CFogVolumeFilter::draw2WayPass(const zeus::CColor& color) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CFogVolumeFilter::draw2WayPass", zeus::skMagenta);
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniBuf.load({color});
|
||||
#endif
|
||||
m_dataBind2Way.draw(0, 4);
|
||||
}
|
||||
|
||||
void CFogVolumeFilter::draw1WayPass(const zeus::CColor& color) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CFogVolumeFilter::draw1WayPass", zeus::skMagenta);
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniBuf.load({color});
|
||||
#endif
|
||||
m_dataBind1Way.draw(0, 4);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,9 @@ CMapSurfaceShader::CMapSurfaceShader(hsh::vertex_buffer<Vert> vbo, hsh::index_bu
|
||||
|
||||
void CMapSurfaceShader::draw(const zeus::CColor& color, u32 start, u32 count) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CMapSurfaceShader::draw", zeus::skMagenta);
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniBuf.load({CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f(), color});
|
||||
#endif
|
||||
m_dataBind.draw_indexed(start, count);
|
||||
}
|
||||
|
||||
|
||||
@@ -129,6 +129,7 @@ void CPhazonSuitFilter::drawBlurPasses(float radius, const CTexture* indTex) {
|
||||
|
||||
constexpr float blurScale = 1.0f / 128.0f;
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
/* X Pass */
|
||||
m_uniBufBlurX.load(
|
||||
{zeus::CVector4f{g_Viewport.xc_height / float(g_Viewport.x8_width) * radius * blurScale, 0.f, 0.f, 0.f}});
|
||||
@@ -139,11 +140,14 @@ void CPhazonSuitFilter::drawBlurPasses(float radius, const CTexture* indTex) {
|
||||
m_uniBufBlurY.load({zeus::CVector4f{0.f, radius * blurScale, 0.f, 0.f}});
|
||||
m_dataBindBlurY.draw(0, 4);
|
||||
CGraphics::ResolveSpareTexture(rect, 2);
|
||||
#endif
|
||||
}
|
||||
|
||||
void CPhazonSuitFilter::draw(const zeus::CColor& color, float indScale, float indOffX, float indOffY) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CPhazonSuitFilter::draw", zeus::skMagenta);
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniBuf.load({color, zeus::CVector4f(indScale, indScale, indOffX, indOffY)});
|
||||
#endif
|
||||
m_dataBind.draw(0, 4);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,10 @@ void CRadarPaintShader::draw(const std::vector<Instance>& instances, const CText
|
||||
m_dataBind.hsh_bind(CRadarPaintShaderPipeline(m_vbo.get(), m_uniBuf.get(), tex2d));
|
||||
}
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniBuf.load({CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f()});
|
||||
m_vbo.load(instances);
|
||||
#endif
|
||||
m_dataBind.draw_instanced(0, 4, instances.size());
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,9 @@ void CRandomStaticFilter::draw(const zeus::CColor& color, float t) {
|
||||
m_uniform.color = color;
|
||||
m_uniform.randOff = ROUND_UP_32(int64_t(rand()) * 32767 / RAND_MAX);
|
||||
m_uniform.discardThres = 1.f - t;
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
|
||||
m_dataBind.draw(0, 4);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,9 @@ void CScanLinesFilter::draw(const zeus::CColor& color) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CScanLinesFilter::draw", zeus::skMagenta);
|
||||
|
||||
m_uniform.color = color;
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
|
||||
m_dataBind.draw(0, 670);
|
||||
}
|
||||
|
||||
@@ -161,7 +161,9 @@ void CSpaceWarpFilter::draw(const zeus::CVector3f& pt) {
|
||||
m_uniform.m_strength.x =
|
||||
m_uniform.m_matrix[0][0] * m_strength * 0.5f * (clipRect.x10_height / float(clipRect.xc_width));
|
||||
m_uniform.m_strength.y = m_uniform.m_matrix[1][1] * m_strength * 0.5f;
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
|
||||
m_dataBind.draw(0, 4);
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ 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);
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
const std::array<Vert, 4> verts{{
|
||||
{{0.f, 0.f, z}, {0.f, 0.f}},
|
||||
{{0.f, 1.f, z}, {0.f, uvScale}},
|
||||
@@ -81,6 +82,7 @@ void CTexturedQuadFilter::draw(const zeus::CColor& color, float uvScale, const z
|
||||
m_uniform.m_matrix[3][3] = 1.f;
|
||||
m_uniform.m_color = color;
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
|
||||
m_dataBind.draw(0, 4);
|
||||
}
|
||||
@@ -99,10 +101,12 @@ void CTexturedQuadFilter::drawCropped(const zeus::CColor& color, float uvScale)
|
||||
{{1.f, -1.f, 0.f}, {(xBias + xFac) * uvScale, yBias * uvScale}},
|
||||
{{1.f, 1.f, 0.f}, {(xBias + xFac) * uvScale, (yBias + yFac) * uvScale}},
|
||||
}};
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_vbo.load(verts);
|
||||
|
||||
m_uniform.m_color = color;
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
|
||||
m_dataBind.draw(0, 4);
|
||||
}
|
||||
@@ -110,12 +114,14 @@ void CTexturedQuadFilter::drawCropped(const zeus::CColor& color, float uvScale)
|
||||
void CTexturedQuadFilter::drawVerts(const zeus::CColor& color, const std::array<Vert, 4>& verts, float lod) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CTexturedQuadFilter::drawVerts", zeus::skMagenta);
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_vbo.load(verts);
|
||||
|
||||
m_uniform.m_matrix = CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f();
|
||||
m_uniform.m_color = color;
|
||||
m_uniform.m_lod = lod;
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
|
||||
m_dataBind.draw(0, 4);
|
||||
}
|
||||
@@ -123,6 +129,7 @@ void CTexturedQuadFilter::drawVerts(const zeus::CColor& color, const std::array<
|
||||
void CTexturedQuadFilter::DrawFilter(EFilterShape shape, const zeus::CColor& color, float t) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CTexturedQuadFilter::DrawFilter", zeus::skMagenta);
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniform.m_matrix = zeus::CMatrix4f();
|
||||
m_uniform.m_lod = 0.f;
|
||||
m_uniform.m_color = color;
|
||||
@@ -166,6 +173,7 @@ void CTexturedQuadFilter::DrawFilter(EFilterShape shape, const zeus::CColor& col
|
||||
m_vbo.load(FullscreenVerts);
|
||||
m_dataBind.draw(0, FullscreenVerts.size());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
CTexturedQuadFilterAlpha::CTexturedQuadFilterAlpha(EFilterType type, hsh::texture2d tex) {
|
||||
|
||||
@@ -61,8 +61,10 @@ CThermalColdFilter::CThermalColdFilter() {
|
||||
void CThermalColdFilter::draw() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CThermalColdFilter::draw", zeus::skMagenta);
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
CGraphics::ResolveSpareTexture(CGraphics::g_CroppedViewport);
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
m_dataBind.draw(0, 4);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,8 +44,10 @@ CThermalHotFilter::CThermalHotFilter() {
|
||||
void CThermalHotFilter::draw() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CThermalHotFilter::draw", zeus::skMagenta);
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
CGraphics::ResolveSpareTexture(CGraphics::g_CroppedViewport);
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
m_dataBind.draw(0, 4);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ void CWorldShadowShader::bindRenderTarget() { m_tex.attach(); }
|
||||
void CWorldShadowShader::drawBase(float extent) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CWorldShadowShader::drawBase", zeus::skMagenta);
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
const std::array<Vert, 4> verts{{
|
||||
{{-extent, 0.f, extent}},
|
||||
{{extent, 0.f, extent}},
|
||||
@@ -50,6 +51,7 @@ void CWorldShadowShader::drawBase(float extent) {
|
||||
m_uniform.m_matrix = CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f();
|
||||
m_uniform.m_color = zeus::skWhite;
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
|
||||
m_zDataBind.draw(0, 4);
|
||||
}
|
||||
@@ -57,8 +59,10 @@ void CWorldShadowShader::drawBase(float extent) {
|
||||
void CWorldShadowShader::lightenShadow() {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CWorldShadowShader::lightenShadow", zeus::skMagenta);
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
m_uniform.m_color = zeus::CColor(1.f, 0.25f);
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
|
||||
m_dataBind.draw(0, 4);
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ CXRayBlurFilter::CXRayBlurFilter(TLockedToken<CTexture>& tex) : m_paletteTex(tex
|
||||
void CXRayBlurFilter::draw(float amount) {
|
||||
SCOPED_GRAPHICS_DEBUG_GROUP("CXRayBlurFilter::draw", zeus::skMagenta);
|
||||
|
||||
#if !HSH_PROFILE_MODE
|
||||
CGraphics::ResolveSpareTexture(CGraphics::g_CroppedViewport);
|
||||
|
||||
const float blurL = amount * g_tweakGui->GetXrayBlurScaleLinear() * 0.25f;
|
||||
@@ -81,6 +82,7 @@ void CXRayBlurFilter::draw(float amount) {
|
||||
}
|
||||
|
||||
m_uniBuf.load(m_uniform);
|
||||
#endif
|
||||
m_dataBind.draw(0, 4);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user