Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

White Square - moves with camera until above certain altitude #8

Open
najak3d opened this issue Mar 20, 2022 · 1 comment
Open

White Square - moves with camera until above certain altitude #8

najak3d opened this issue Mar 20, 2022 · 1 comment

Comments

@najak3d
Copy link

najak3d commented Mar 20, 2022

FIRST OFF - THANK YOU FOR THIS PROJECT! This demo is incredible, and has motivated us to port our game from Urho.NET to Stride3D, so that we can enjoy the beauty of this Ocean, Atmosphere, and Terrain. Very very nice work here!

From a mid-height (Y = 50 to 150) you can see an obvious white square that travels with the camera. I figured it might have been an artifact of Shadow Map - but after I disabled Shadows, this white square remains. It's not as obvious from the still frame, but in live play mode, it's a blatant/obvious white square that moves with the camera, until you go above a certain height where it then disappears.

At about half-the-altitude, the white square doesn't appear obvious - and so is good.

So I think whatever setting impacts the disappearance of this white square should be adjust so that the square disappears at Y = 50, instead of Y = 150.

image

NOTE, a 2nd larger White Square comes back again around Y=200, and remains until Y= 600. To this 2nd Square distance needs to disappear around Y = 200, instead 600, to eliminate the visual defect at those altitudes.

@najak3d
Copy link
Author

najak3d commented Mar 20, 2022

Here's the edit I made to the Camera script to speed it up as altitude rises:
(I added 'heightFactor')

            float heightFactor = (float)Math.Pow(((1f + Entity.Transform.Position.Y) / 1f), 0.777);
            // Finally, push all of that to the translation variable which will be used within UpdateTransform()
            translation += dir * KeyboardMovementSpeed * speed * heightFactor;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant