mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-01 10:37:07 +01:00
Rain: the cab in the depth prepass also in the rain
In the rain the cab is drawn after the precipitation (so the rain inside it is hidden), and it was left out of the depth prepass too, so the opaque pass shaded everything behind it. Its depth now goes into the prepass in any weather (Vulkan 1.4, and OpenGL 4.6 without gfx.depthprepass.replay); the colour of the cab is still drawn after the rain, so nothing changes in the picture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
This commit is contained in:
@@ -4294,8 +4294,9 @@ void opengl46_renderer::Render_Scene_Depth( glm::mat4 const &Future, bool const
|
||||
m_scenerecordedparts = static_cast<std::uint32_t>( m_scenechunks.size() );
|
||||
}
|
||||
else {
|
||||
// the conditions of the cab drawn early by the colour pass
|
||||
if( ( false == FreeFlyModeFlag ) && ( Global.Overcast <= 1.0f ) && ( Global.render_cab ) ) {
|
||||
// the cab first, also in the rain: the colour pass draws it after the rain then (the rain inside it hidden), but with its depth
|
||||
// here nothing the cab hides is shaded by the opaque pass
|
||||
if( ( false == FreeFlyModeFlag ) && ( Global.render_cab ) ) {
|
||||
model_ubs.future = m_cabfuture;
|
||||
auto const *vehicle { simulation::Train->Dynamic() };
|
||||
Render_cab( vehicle, vehicle->InteriorLightLevel, false );
|
||||
|
||||
@@ -1893,8 +1893,9 @@ void vulkan14_renderer::render_scene_depth(std::size_t const Index, glm::mat4 co
|
||||
auto const colourstats{m_renderpass.draw_stats};
|
||||
m_renderpass.draw_stats = {};
|
||||
walk_blending(false);
|
||||
// the conditions of the cab drawn early by the colour pass
|
||||
if ((false == FreeFlyModeFlag) && (Global.Overcast <= 1.0f) && Global.render_cab && simulation::Train)
|
||||
// the cab first, also in the rain: the colour pass draws it after the rain then (the rain inside it hidden), but with its depth here
|
||||
// nothing the cab hides is shaded by the opaque pass (in a station seen from the cab: about a third of the time of the opaque pass)
|
||||
if ((false == FreeFlyModeFlag) && Global.render_cab && simulation::Train)
|
||||
{
|
||||
model_ubs.future = m_cabfuture;
|
||||
auto const *vehicle{simulation::Train->Dynamic()};
|
||||
|
||||
Reference in New Issue
Block a user