fix blocky renderer when camera is too close to penisobj #3

Merged
r0ngk merged 2 commits from r0ngk-patch-1 into main 2025-09-09 10:23:25 +00:00
r0ngk commented 2025-09-09 08:49:15 +00:00 (Migrated from github.com)

The patched part, for reference

private void Update()
{
	MozaObj.material.color = Color.white;
	CameraPos = Vector3.Distance(MainCamera.transform.position, PenisBone.transform.position);
	MozaObj.sharedMaterial.SetFloat("_BlockSize", Mathf.Clamp((CameraPos - 20f) * -1f + Mathf.Lerp(10f, 0f, (Camera.main.fieldOfView - 10f) / 100f * 2f), 12f, 30f) * GameClass.mozamoza);
	IL = Mathf.InverseLerp(1f, 10f, CameraPos);
	if (base.gameObject.name == "PC00")
	{
		PenisObj.sharedMaterial.SetFloat("_Moza", Mathf.Lerp(30f, 1000f, IL) * GameClass.mozamoza);
	}
}

in MozaicSetUp

The patched part, for reference ``` private void Update() { MozaObj.material.color = Color.white; CameraPos = Vector3.Distance(MainCamera.transform.position, PenisBone.transform.position); MozaObj.sharedMaterial.SetFloat("_BlockSize", Mathf.Clamp((CameraPos - 20f) * -1f + Mathf.Lerp(10f, 0f, (Camera.main.fieldOfView - 10f) / 100f * 2f), 12f, 30f) * GameClass.mozamoza); IL = Mathf.InverseLerp(1f, 10f, CameraPos); if (base.gameObject.name == "PC00") { PenisObj.sharedMaterial.SetFloat("_Moza", Mathf.Lerp(30f, 1000f, IL) * GameClass.mozamoza); } } ``` in MozaicSetUp
ManlyMarco (Migrated from github.com) approved these changes 2025-09-09 10:22:40 +00:00
ManlyMarco (Migrated from github.com) left a comment

Looks good, thank you!

PS: If you're interested in making more PRs, see my profile page for info about a PR bounty I'm currently running.

Looks good, thank you! PS: If you're interested in making more PRs, see my profile page for info about a PR bounty I'm currently running.
ManlyMarco (Migrated from github.com) commented 2025-09-09 10:22:32 +00:00
        public const string Version = "1.1";

Do not change version numbers in PRs.

```suggestion public const string Version = "1.1"; ``` Do not change version numbers in PRs.
Sign in to join this conversation.
No description provided.