You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
I want to implement a fps with a weapon object that doesn't get clipped by walls.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add a material flag for things like fps weapons. This flag can be called depth_clear or something similar.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The standard solution to the fps weapon clipping issue is to render all other scene objects first, then clear the depth buffer, and then render the weapon object keeping the z-buffer enabled the whole time. Materials with the depth_clear flag would be grouped and rendered last in the scene after clearing the depth buffer. Im not sure if this would work for a deferred rendering pipeline but it's definitely feasible for forward rendering.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No
Is there a reason why this should be core and not an add-on in the asset library?
This feature is heavily used for fps games.
The text was updated successfully, but these errors were encountered:
Related to #956 (which is ultimately about the same problem).
Calinou
changed the title
New Material Flag to Support Depth Clear
Add a material flag to render a material after the depth buffer was cleared
Oct 9, 2021
It sounds like you are describing the FLAG_DISABLE_DEPTH_TEST which renders an object after the opaque pass and ignores the z-buffer. I don't see why you would want to clear the z-buffer as it is needed for post-processing effects.
Right, thinking about it more, I'm starting to see that this request isn't very feasible. Maybe 20 years ago, but not with today's rendering pipeline. I'm gonna remove this request. Also, problem can be circumvented by putting fps weapon inside player collision shape.
Describe the project you are working on
A futuristic fps.
Describe the problem or limitation you are having in your project
I want to implement a fps with a weapon object that doesn't get clipped by walls.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add a material flag for things like fps weapons. This flag can be called depth_clear or something similar.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The standard solution to the fps weapon clipping issue is to render all other scene objects first, then clear the depth buffer, and then render the weapon object keeping the z-buffer enabled the whole time. Materials with the depth_clear flag would be grouped and rendered last in the scene after clearing the depth buffer. Im not sure if this would work for a deferred rendering pipeline but it's definitely feasible for forward rendering.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No
Is there a reason why this should be core and not an add-on in the asset library?
This feature is heavily used for fps games.
The text was updated successfully, but these errors were encountered: