Skip to content
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

ZTest Does Not Work As Expected #3925

Open
lxw404 opened this issue Jul 18, 2023 · 0 comments
Open

ZTest Does Not Work As Expected #3925

lxw404 opened this issue Jul 18, 2023 · 0 comments
Labels
Bug Something isn't working

Comments

@lxw404
Copy link

lxw404 commented Jul 18, 2023

Describe the bug?

The ZTest within several materials does not seem to behave as one would expect. Certain modes such as LessOrEqual, and Always seem fine, however every other mode does not.

Relevant issues

(none)

To Reproduce

The test setup is a PBSMetallic Box which overlaps halfway on a sphere with a UI_UnlitMaterial applied described similar to how Zyzyl tested in discord. This can be tested with any combination of materials that support ZTest with the same result as below:

Neos_cQ5NPYpn6C

Expected behavior

ZTest should normally behave as follows:

  • LessOrEqual - The object testing should be drawn if the Z buffer value is less than or equal to its current z value (normal occlusion)
  • GreaterOrEqual - The object testing should be drawn if the Z buffer value is greater than or equal to its current z value (draw only when behind objects or overlapping exactly)
  • Equal - The object testing should only be drawn when the Z buffer value is exactly equal to its current z value (draw on the edges of intersections)
  • Not Equal - The object testing should be drawn when the Z buffer value is not equal to its current z value (draw wherever there is not an intersection)
  • Always - The object testing is always drawn no matter what (ignore z values)
  • Less - The object testing is only drawn when the Z buffer value is strictly less than its current z value (only when completely in front)
  • Greater - The object testing is only drawn when the Z buffer value is strictly greater than its current z value (only when completely behind)

Log Files

No response

Screenshots

No response

How often does it happen?

Always

Does the bug persist after restarting Neos?

Yes

Neos Version Number

2022.1.28.1310

What Platforms does this occur on?

Windows, Linux

Link to Reproduction Item/World

neosrec:///U-LuxKitty/R-d9680e14-062e-488a-ad64-8812db67d5eb

Did this work before?

I Don't Know

If it worked before, on which build?

No response

Additional context

No response

Reporters

LuxKitty, Zyzyl

@lxw404 lxw404 added the Bug Something isn't working label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant