From 4684f4106f8df3a4a932cc0fec0ea06f7df8d2c0 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 9 Mar 2022 02:32:01 -0500 Subject: [PATCH] Shader fixes & stub out LineRenderer calls in CElementGen --- Runtime/Particle/CElementGen.cpp | 10 +++++----- aurora/lib/gfx/gx_shader.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Runtime/Particle/CElementGen.cpp b/Runtime/Particle/CElementGen.cpp index 9d54b55c4..60b7bcf54 100644 --- a/Runtime/Particle/CElementGen.cpp +++ b/Runtime/Particle/CElementGen.cpp @@ -1178,7 +1178,7 @@ void CElementGen::RenderLines() { constWidth = std::max(0.f, std::min(constWidth, 42.5f)); } - m_lineRenderer->Reset(); + // m_lineRenderer->Reset(); for (auto& particle : x30_particles) { g_currentParticle = &particle; @@ -1205,14 +1205,14 @@ void CElementGen::RenderLines() { zeus::CVector3f p2 = systemCameraMatrix * (particle.x2c_lineLengthOrSize * dVec + particle.x4_pos); if (widtConst) { - m_lineRenderer->AddVertex(p1, particle.x34_color, constWidth, {uvs.xMin, uvs.yMin}); - m_lineRenderer->AddVertex(p2, particle.x34_color, constWidth, {uvs.xMax, uvs.yMax}); + // m_lineRenderer->AddVertex(p1, particle.x34_color, constWidth, {uvs.xMin, uvs.yMin}); + // m_lineRenderer->AddVertex(p2, particle.x34_color, constWidth, {uvs.xMax, uvs.yMax}); } else if (widt) { float width = 1.f; widt->GetValue(0, width); width = std::max(0.f, std::min(width, 42.5f)); - m_lineRenderer->AddVertex(p1, particle.x34_color, width, {uvs.xMin, uvs.yMin}); - m_lineRenderer->AddVertex(p2, particle.x34_color, width, {uvs.xMax, uvs.yMax}); + // m_lineRenderer->AddVertex(p1, particle.x34_color, width, {uvs.xMin, uvs.yMin}); + // m_lineRenderer->AddVertex(p2, particle.x34_color, width, {uvs.xMax, uvs.yMax}); } } diff --git a/aurora/lib/gfx/gx_shader.cpp b/aurora/lib/gfx/gx_shader.cpp index f2f6e354a..8ff927ea2 100644 --- a/aurora/lib/gfx/gx_shader.cpp +++ b/aurora/lib/gfx/gx_shader.cpp @@ -471,7 +471,7 @@ var v_packed_uvs: Vec2Block; color_arg_reg(stage->colorPass.xc_d, idx, *stage, info), tev_op(stage->colorOp.x4_op), tev_bias(stage->colorOp.x8_bias), tev_scale(stage->colorOp.xc_scale)); if (stage->colorOp.x0_clamp) { - op = fmt::format(FMT_STRING("clamp({}, vec3(0.0), vec3(1.0))"), op); + op = fmt::format(FMT_STRING("clamp(vec3({}), vec3(0.0), vec3(1.0))"), op); } fragmentFn += fmt::format(FMT_STRING("\n {0} = vec4({1}, {0}.a);"), outReg, op); }