-
Notifications
You must be signed in to change notification settings - Fork 20
Reflect skybox in most water materials #1464
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
Reflect skybox in most water materials #1464
Conversation
untitled.mp4Here on isolation if I turn a certain way my fps absolutely tanks, my guess is its nothing to do with reflecting the skybox being extra intensive on the render pipeline, but rather its the amount of assertions in the console thats grinding my game down to sub 30 fps |
|
wrt the springiness, it seems to be tied to mouse movement specifically, skybox reflections remain perfect when simply moving back and forth laterally without any rotation (Edit) I made a quick video and stabilised it in kdenlive, here is the clip with and without stabilisation untitled.mp4 |
Try it on release but yes it probably is, I stopped working on debug because we had two different "just ignore them" asserts in the project and it was annoying 🥲 |
This only happens when the reflection is inside the skybox water, you will notice that the reflections inside the playspace dont have this problem. The skybox seems to be drawn before anything else, so the reflection in the skybox is probably always a frame behind, so it'll suck at low framerates. Maybe the reflection can be moved before it, I will take a look |
|
@AdamTadeusz Hopefully these issues should be fixed now, not putting it up for review yet though as I want to test some things |
|
Obviously unrelated to the approval of this PR but it would be cool to see what the reflection looks like with a more still water texture if we have any |
What's happening here is its drawing the rest of the displacement thats underwater, as currently its not clipped. Working on it now
I imagine thats just an effect of the distortion on the material, you can see the same thing on master if you look at some of the reflections around the out of bounds in world area
Can be scaled up in the map |
|
Should be ready for review now. I went back and have changed it to require being enabled on the sky_camera entity in the map. Reasons being- I couldn't find a reliable way of finding water inside the skybox. It's probably better and easier just to give the mapper the power, as they might have two different water volumes and prefer one be clipped over the other, since its not possible to do them both individually |




Description
Makes skybox geometry render in water reflections when "Reflect All" is enabled in options.
In the issue I made for this I said it ought to be an option to be enabled per map for performance reasons, but I think this is unnessecary as it's only avaliable on the highest setting, and I did not notice any meaningful impact on performance when testing with vprof (on rogue)
The implementation can be viewed best on rogue, but also shrine and isolation
Toolchain
Linked Issues