-
Notifications
You must be signed in to change notification settings - Fork 173
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
[decomp] sky/time of day #883
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ManDude
reviewed
Oct 9, 2021
#else | ||
u32 result; | ||
return _BitScanReverse(&result, in); | ||
return result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this first return
intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no! (and the type is wrong so it doesn't compile anyway)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Still not quite working. Stars/suns are working correctly using the sparticle/sprite system but the sky isn't quite right.
The "sky" is a pyramid drawn with "sky tri"s. The "clouds" are draw with quads and I think are just a plane with some interesting scaling as it goes to the horizon.
The rendering code is all on the EE, but it's awful and doesn't obey calling conventions.
The rendering process is:
Currently the clouds are all messed up. The textures are not aligned properly, and there is a strange effect when rotating the camera. I've probably spent ~5 hours on this so far without getting anywhere, so it's time to take a step back and get organized. Possible causes:
clip-against-positive-hyperplane
and I believe it clips the polygons against some 3d planes. To me it looks like this doesn't work, but I looked at a wireframe view in PCSX2 and the mesh looks pretty similar? One piece of evidence is that I checked a few seams that looked wrong and their texture coordinates matched. So we have a properly connected mesh that's distorted. And the distortion happens on one side, possibly indicating that one of the twoclip-against-[positive,negative]-hyperplane
might be working and the other isn't? (see https://www.geometrictools.com/Documentation/ClipConvexPolygonByHyperplane.pdf for the algorithm I think they are using)After going through this I think the mesh is close-but-not-quite. Not sure if it's in the EE code or the direct renderer though.