Jump to content

Fix - Skybox Cloud Clipping


Nirray

Recommended Posts

Hello DEVs 🥰
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.png

> * 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 ❤️

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 16
  • Think 1
  • Lmao 1
  • Good 4
  • Love 25

I completely abandoned working on the files for this game. I do not respond to private messages.

.png

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.