1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

[Debugger] Fix display of vertex alpha in HLE mode.

This commit is contained in:
Sergey Lipskiy 2020-05-03 15:14:25 +07:00
parent c8cbafff71
commit 87274437cb
2 changed files with 20 additions and 1 deletions

View File

@ -262,6 +262,8 @@ void Debugger::_fillTriInfo(TriInfo & _info)
_info.prim_color = gDP.primColor;
_info.primDepthZ = gDP.primDepth.z;
_info.primDepthDeltaZ = gDP.primDepth.deltaZ;
_info.fogMultiplier = gSP.fog.multiplierf;
_info.fogOffset = gSP.fog.offsetf;
_info.K4 = gDP.convert.k4;
_info.K5 = gDP.convert.k5;
_info.viewport = gSP.viewport;
@ -983,7 +985,23 @@ void Debugger::_drawVertexCoords(f32 _ulx, f32 _uly, f32 _yShift)
OUTPUT2("v[%d].r: %.2f", j, v.r);
OUTPUT2("v[%d].g: %.2f", j, v.g);
OUTPUT2("v[%d].b: %.2f", j, v.b);
OUTPUT2("v[%d].a: %.2f", j, v.a);
if (RSP.LLE) {
OUTPUT2("v[%d].a: %.2f", j, v.a);
}
else {
if ((m_triSel->geometryMode & G_FOG) == 0) {
OUTPUT2("v[%d].a: %.2f", j, v.a);
}
else {
f32 f = v.z / v.w * m_triSel->fogMultiplier + m_triSel->fogOffset;
if (f < 0.0f)
f = 0.0f;
if (f > 1.0f)
f = 1.0f;
OUTPUT2("v[%d].a: %.2f", j, f);
}
}
}
return;
}

View File

@ -104,6 +104,7 @@ private:
gDPInfo::FillColor fill_color;
gDPInfo::PrimColor prim_color;
f32 primDepthZ, primDepthDeltaZ;
f32 fogMultiplier, fogOffset;
s32 K4, K5;
f32 getScreenX(const Vertex & _v) const;