-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Add support for depth function in spatial materials and/or shaders (GL_GREATER
, …)
#1298
Comments
Setting depth function to greater would have the same impact as just disabling the depth test in that case wouldn't it? In which case it would be equivalent to disabling depth with the no_depth_test flag in SpatialMaterials. |
@clayjohn If I understand correctly, the difference is that with You could render the second pass with No Depth Test, but I think this will cause the pass in question to be visible in front of the depth-enabled pass. |
Calinou is correct. No-depth-test does a different thing. GL_GREATER is an "inverse" depth check. |
GL_GREATER
, …)
GL_GREATER
, …)GL_GREATER
, …)
@DigvijaysinhGohil Please don't bump issues without contributing significant new information. Use the 👍 reaction button on the first post instead. You can use the All button on the sidebar on the right (below the Notifications header) to subscribe to notifications without leaving a reply on a thread: |
Describe the project you are working on:
A 3D 3rd person game.
Describe the problem or limitation you are having in your project:
There is no way to change the depth test function for shaders or materials. It's is not possible to change the glDepthFunc() from the default GL_LEQUAL to GL_GREATER
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
A lot of effects needs to change depth function. E.g. when Super Mario is behind an object you will see him rendered as a gray silhouette. This can easily be achieved with rendering the object in two passes, where the silhouette pass is rendered with GL_GREATER.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
If this enhancement will not be used often, can it be worked around with a few lines of script?:
It can only be implemented in the core renderer.
Is there a reason why this should be core and not an add-on in the asset library?:
It can only be implemented in the core renderer.
The text was updated successfully, but these errors were encountered: