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

Billboards in Reflections & Shadows #21

Open
ghost opened this issue May 18, 2021 · 1 comment
Open

Billboards in Reflections & Shadows #21

ghost opened this issue May 18, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented May 18, 2021

This isn't exactly an issue specifically with sm64rt per se, but it made more noticeable by additions from RT64. The issue is that since billboards always face towards the main camera, the shadows of billboards can get rather odd, as well as billboards in reflections. This also can break alpha on the edges of them, if they're inverted upside down (reflection on the ground, easy to see with mario's dust particles or the edges of trees)
A possible fix may be to make it so that from the perspective of the lightsource, or of the reflections' view, the billboard is always facing towards them, This should look good for most all of the spherical billboards, as they should look the same no matter what the angle is. This may not look so great for the trees, though. There's also a related issue with the sky, since it's a linear scrolling texture that always faces the player; if there's a reflection on the ground and you look down on it, the top of the sky is distorted into a single point.

@DarioSamo
Copy link
Owner

DarioSamo commented May 18, 2021

These are things that would be pretty sweet to fix.

The current problem is that the billboard behavior is not controlled by the renderer but rather by the game. As it is, the renderer has no way to identify if something is a billboard or if it's just a regular polygon mesh. So to fix that, we'd need to either hook into the billboard routines and set the identifier there or just tag the billboard textures manually.

For the sky, I think it would be best to just find a way to pull the entire texture that is used. Right now it's just doing a fake environment map by warping whatever tiles are being rendered to the background. I believe this would also need a separate hook in the game code like for the previous suggestion and to ignore the background rendering entirely.

@DarioSamo DarioSamo added the enhancement New feature or request label May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant