Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Commit

Permalink
Fix a regression (e.g. too dark flashers) by respecting the proper di…
Browse files Browse the repository at this point in the history
…sable lighting values for primitives and disable the weird disable lighting code for ramps
  • Loading branch information
toxieainc committed Mar 1, 2022
1 parent aa7f2e3 commit 3f4bbf1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pintable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2123,7 +2123,7 @@ void PinTable::Play(const bool cameraMode)

m_progressDialog.Destroy();

g_pvp->m_table_played_via_SelectTableOnStart = false;
g_pvp->m_table_played_via_SelectTableOnStart = false;
}
}

Expand Down
3 changes: 2 additions & 1 deletion primitive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,8 @@ void Primitive::RenderObject()
{
// shader is already fully configured in the playfield rendering case when we arrive here, so we only setup some special primitive params

pd3dDevice->basicShader->SetDisableLighting(vec4(0.f, 1.f, 0.f, 0.f));;
//pd3dDevice->basicShader->SetDisableLighting(vec4(0.f, 1.f, 0.f, 0.f)); //!! disabled again, if enabling it, ALSO CHANGE THE RESET CONDITION SOME LINES BELOW to always be executed!!
pd3dDevice->basicShader->SetDisableLighting(vec4(m_d.m_disableLightingTop, m_d.m_disableLightingBelow, 0.f, 0.f));

//pd3dDevice->SetRenderStateCulling(RenderDevice::CULL_CCW); // don't mess with the render states when doing playfield rendering
// set transform
Expand Down
2 changes: 1 addition & 1 deletion ramp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,7 @@ void Ramp::RenderRamp(const Material * const mat)
pd3dDevice->SetRenderState(RenderDevice::ZWRITEENABLE, RenderDevice::RS_TRUE);
pd3dDevice->SetRenderStateCulling(RenderDevice::CULL_NONE); // as both floor and walls are thinwalled

pd3dDevice->basicShader->SetDisableLighting(vec4(0.f, 1.f, 0.f, 0.f));
// pd3dDevice->basicShader->SetDisableLighting(vec4(0.f, 1.f, 0.f, 0.f)); //!! disabled again, if enabling it, ALSO ADD A RESET CONDITION SOME LINES BELOW to set it to 0,0,0,0 again!!

//Pin3D * const ppin3d = &g_pplayer->m_pin3d;
Texture * const pin = m_ptable->GetImage(m_d.m_szImage);
Expand Down
6 changes: 5 additions & 1 deletion txt/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
SDL2 / VR Changelog
------------------------

- Updated to VPX 10.7.1 commit 109bf5acaa17534d4d67e5c6f0d38cd58c6e5a91 (02/15/22)
- Updated to VPX 10.7.1 commit 297dce2d17d3d5bef242b0ca9aae8e852ea45018 (02/27/22)

- Fix a regression (e.g. too dark flashers) by respecting the proper disable lighting values for primitives and disable the weird disable lighting code for ramps

- Make new disable lighting for balls work

- Enable texture compression (BC7 or DXT5 as fallback) support (enabled in the video preferences, same as VPX)

Expand Down

0 comments on commit 3f4bbf1

Please sign in to comment.