StarfallEx icon indicating copy to clipboard operation
StarfallEx copied to clipboard

Starfall screen will render twice per frame if map has water

Open thegrb93 opened this issue 1 year ago • 5 comments

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

thegrb93 avatar Jun 12 '24 01:06 thegrb93

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.

Advers avatar Jun 15 '24 01:06 Advers

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 avatar Jun 15 '24 01:06 thegrb93

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

thegrb93 avatar Jun 15 '24 01:06 thegrb93

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 avatar Jun 15 '24 01:06 Advers

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.

Advers avatar Sep 08 '24 21:09 Advers