Open sprunk opened 2 weeks ago
function widget:DrawWorldPreParticles()
-- NOTE: This is called TWICE per draw frame, once before water and once after, even if no water is present.
-- If water is present on the map, then it gets called again between the two for the refraction pass
-- Solution is to draw it only on the first call, and draw reflections from widget:DrawWorldReflection
I added parameters for DrawWorldPreParticles. Are there any other draw callins that happen multiple times per draw frame that you are aware of?
Apprently some DrawFoo callins run 2 or more times in a draw frame and you can't tell which iteration it currently is. See https://github.com/beyond-all-reason/Beyond-All-Reason/pull/3172
There should be some explicit way to tell:
wupget:DrawFoo(number drawFlags)
Spring.GetCurrentRenderingPhaseFlags() -> number drawFlags