mirror of https://github.com/AxioDL/metaforce.git
Shader fixes & stub out LineRenderer calls in CElementGen
This commit is contained in:
parent
d62336b813
commit
4684f4106f
|
@ -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});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -471,7 +471,7 @@ var<storage, read> 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<f32>(0.0), vec3<f32>(1.0))"), op);
|
||||
op = fmt::format(FMT_STRING("clamp(vec3<f32>({}), vec3<f32>(0.0), vec3<f32>(1.0))"), op);
|
||||
}
|
||||
fragmentFn += fmt::format(FMT_STRING("\n {0} = vec4<f32>({1}, {0}.a);"), outReg, op);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue