-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
Foam does not respect floating origin on Y axis #1156
Comments
Fixes incorrect depth values when away from zero, and greatly simplifies everything. Caution must be taken as infinity can cause issues. Water depth sampling had to be moved to the fragment shader, as it had artifacts possibly from interpolation. Additionally, improved fading out of shallow SSS towards the end of cascades.
Thank you for reporting. Can you please test the linked PR below? |
Will do. |
Thanks! It seems to be working as far as I can tell. I did also test with underwater transparency briefly (seems fine), but I have not integrated that yet because I have extra work for above water transparent objects in my backlog related to that (clouds, particles, etc.). Comments
I would double check every y usage, not just for this changeset, the whole baseline. Anything that has a default y value of any kind should problably initialize to the floating origin offset Y instead of 0 or some other constant. I had many spots in my code I had to fix for this because I had not initially intended to support it, but later extended the skybox. For example someY = 0, 1000, 100, etc. 0 may actually be -1000 or something with the offset. Even if it does not cause problems it may be better for consistancy to init to the correct value and in the event that default value is used it will not be 0 when it should be -1000 with the offset. |
Is there an existing issue for this?
Have you checked the documentation to resolve your problem?
Current Behavior
Negative values below -1000 cause foam to appear constantly.
Expected Behavior
Foam should appear normally at any Y value (or at least with any floating origin Y)
Steps To Reproduce
BoatWakes
sceneOcean
GameObject toVector3(0, -1000, 0)
Unity Version
2021.3.26
Crest Version
4.19
Render Pipeline
Built-In
Editor or Standalone
Editor (Edit Mode), Editor (Play Mode), Standalone
Environment
No response
Anything else?
This seems to be broken for floating origin support. Seems to be related to
k_DepthBaseline
/CREST_OCEAN_DEPTH_BASELINE
. It is unclear if increasing those values is a viable short term solution.The text was updated successfully, but these errors were encountered: