Skip to content

Nirray/Metin2.Fix.Skybox.Cloud.Clipping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Small fix - Skybox cloud clipping

I understand that most people use cloudless skyboxes in these times, but there is a graphic glitch (usually when the player teleports/dragging a game window) with "jumping" clouds.

▶️Preview with glitch - slow cloud speed

This is very annoying with fast moving clouds:

▶️Preview with glitch - fast cloud speed

and warping:

▶️Preview with glitch - warping

Fix:

Client source:

\EterLib\SkyBox.cpp

void CSkyBox::RenderCloud() replace whole:

DWORD dwCurTime = CTimer::Instance().GetCurrentMillisecond();

m_fCloudPositionU += m_fCloudScrollSpeedU * (float)( dwCurTime - m_dwlastTime ) * 0.001f;
if (m_fCloudPositionU >= 1.0f)
	m_fCloudPositionU = 0.0f;

m_fCloudPositionV += m_fCloudScrollSpeedV * (float)( dwCurTime - m_dwlastTime ) * 0.001f;
if (m_fCloudPositionV >= 1.0f)
	m_fCloudPositionV = 0.0f;

m_dwlastTime = dwCurTime;

with:

if (m_fCloudPositionU >= 1.0f)
	m_fCloudPositionU = 0.0f;


if (m_fCloudPositionV >= 1.0f)
	m_fCloudPositionV = 0.0f;
m_fCloudPositionU += m_fCloudScrollSpeedU  * 0.030f;
m_fCloudPositionV += m_fCloudScrollSpeedV *  0.030f;

like that:

code

  • 0.030f is optimal I have no idea why they decided to use ms timer for scrolling clouds in the rendering function that already has own clock and frameskip settings (now it just scales with game fps counter).

With fix (when dragging client window)

▶️Preview without glitch - slow cloud speed

▶️Preview without glitch - fast cloud speed

Warping:

▶️Preview without glitch - warp

Have a nice day ❤️

About

C++ changes and fixes for binary file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages