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

Starfall screen will render twice per frame if map has water #1773

Open
thegrb93 opened this issue Jun 12, 2024 · 5 comments
Open

Starfall screen will render twice per frame if map has water #1773

thegrb93 opened this issue Jun 12, 2024 · 5 comments
Labels

Comments

@thegrb93
Copy link
Owner

thegrb93 commented Jun 12, 2024

Yes, I know it's for the water effect, but this is problematic for user code that relies on timing or performance.

@thegrb93 thegrb93 added the bug label Jun 12, 2024
@Advers
Copy link
Contributor

Advers commented Jun 15, 2024

A preferred solution would allow users to exit any render hook early, and not just screens. Also, it would be great if it was optional, in the case where we do want to allow rendering in reflections, or maybe even only in reflections for some interesting possibilities.

@thegrb93
Copy link
Owner Author

was thinking maybe moving the screen rendering into postdrawopaquerenderables hook or something. this would also allow the screen to draw despite the model being invisible

@thegrb93
Copy link
Owner Author

It wouldn't have correct draw ordering with respect to other translucent things though

@Advers
Copy link
Contributor

Advers commented Jun 15, 2024

was thinking maybe moving the screen rendering into postdrawopaquerenderables hook or something. this would also allow the screen to draw despite the model being invisible

That on its own shouldn't work, because DrawOpaqueRenderables also gets called for water reflections

@Advers
Copy link
Contributor

Advers commented Sep 8, 2024

Suggestion: If it's possible to find out "where" in the render hook order a given hook is when it's called, there could be a function that returns a boolean for if a hook is being called for DrawWaterReflections or not. If there isn't a way to do this directly, maybe it can be done by observing the order render hooks are called in when near water vs when not.

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

No branches or pull requests

2 participants