Skip to content

Conversation

@DESTROYGIRL
Copy link
Contributor

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

  • Windows MSVC VS2022

Linked Issues

@DESTROYGIRL DESTROYGIRL requested a review from a team November 6, 2025 01:10
@DESTROYGIRL DESTROYGIRL added the Enhancement New feature or request label Nov 6, 2025
@AdamTadeusz
Copy link
Contributor

There's a lot of Assertion failures in the console

image

Also I notice when moving my mouse back and forth that the reflection in the water lags behind a bit, like its attached to a spring, this is on rogue specifically, but this still looks great in general good job!

@AdamTadeusz
Copy link
Contributor

untitled.mp4

Here 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

@AdamTadeusz
Copy link
Contributor

AdamTadeusz commented Nov 7, 2025

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

@DESTROYGIRL
Copy link
Contributor Author

DESTROYGIRL commented Nov 7, 2025

Here 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

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 🥲

@DESTROYGIRL DESTROYGIRL marked this pull request as draft November 7, 2025 12:02
@DESTROYGIRL
Copy link
Contributor Author

DESTROYGIRL commented Nov 7, 2025

Also I notice when moving my mouse back and forth that the reflection in the water lags behind a bit, like its attached to a spring, this is on rogue specifically

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
I made a comment in code about this so it'd be nice to kill two birds with one stone

@DESTROYGIRL
Copy link
Contributor Author

@AdamTadeusz Hopefully these issues should be fixed now, not putting it up for review yet though as I want to test some things

@AdamTadeusz
Copy link
Contributor

When you look at reflections in the water irl you will see where the two meet that the reflection doesn't meet the object itself exactly, there's a bit of an offset. It looks like the engine mimicks this offset quite well, but there are some situations where this doesn't work quite as well, like around this area to the left of the skybox city on rogue

image

I doubt this is something that can be fixed, but perhaps this is something mappers should keep in mind and try to work around

Also is it just me or is the reflection slightly shifted to the right?

image

Also this water texture seems kinda repetitive

image

@AdamTadeusz
Copy link
Contributor

AdamTadeusz commented Nov 9, 2025

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

@DESTROYGIRL
Copy link
Contributor Author

When you look at reflections in the water irl you will see where the two meet that the reflection doesn't meet the object itself exactly, there's a bit of an offset. It looks like the engine mimicks this offset quite well, but there are some situations where this doesn't work quite as well, like around this area to the left of the skybox city on rogue

What's happening here is its drawing the rest of the displacement thats underwater, as currently its not clipped. Working on it now

Also is it just me or is the reflection slightly shifted to the right?

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

Also this water texture seems kinda repetitive

Can be scaled up in the map

@DESTROYGIRL DESTROYGIRL added the Changes in neoAssets This PR depends on changes in the neoAssets repository. The relevant PR should be in the description label Nov 10, 2025
@DESTROYGIRL DESTROYGIRL marked this pull request as ready for review November 10, 2025 22:10
@DESTROYGIRL DESTROYGIRL added the New Changes for Reviewers New changes has been made. This label is mostly to notify reviewers. label Nov 10, 2025
@DESTROYGIRL
Copy link
Contributor Author

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

@sunzenshen sunzenshen requested a review from a team November 11, 2025 01:19
@sunzenshen sunzenshen requested a review from a team November 11, 2025 20:15
@DESTROYGIRL DESTROYGIRL merged commit d7d3a23 into NeotokyoRebuild:master Nov 11, 2025
7 checks passed
@DESTROYGIRL DESTROYGIRL deleted the 9_skyboxreflect branch November 12, 2025 00:30
@DESTROYGIRL DESTROYGIRL removed the New Changes for Reviewers New changes has been made. This label is mostly to notify reviewers. label Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changes in neoAssets This PR depends on changes in the neoAssets repository. The relevant PR should be in the description Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] 3D Skybox in water reflections

4 participants