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

Bug: Materials with $decal render in front of portals when applied to brushes as appose to behind. #1806

Open
L9M2 opened this issue Jan 14, 2025 · 0 comments
Labels
Type: Bug Something isn't working

Comments

@L9M2
Copy link

L9M2 commented Jan 14, 2025

Describe the bug

I was making a map with a decal to mark where portals were. The decal was a simple texture that was transparent, and if you give it the $decal material property it's suppose to render slightly offset from a brush so it prevents z-fighting, similar to the info_decal entity. In this one instance I had to place a decal on a moving brush, info_decal doesn't work with brushes correctly so I had to apply my material to a custom func_brush to overlay on top of the other brush.

To combat the Z-Fighting I gave it the $decal parameter, but to my surprise the decal renders in front of portals! This is unlike when I haven't had the $decal parameter applied as it would render behind the portal, and even the info_decals render behind portals.

Below Image is what a material looks like with the $decal parameter applied. Notice how the decal renders in front of the orange portal. (Removing the $decal parameter fixes this)
image

Below image of the same material applied to an info_decal entity. Notice how it renders behind portals as intended.
image

Issue Map

N/A

To Reproduce

  1. Create a "LightmappedGeneric" with a decal property.
  2. Place it on a func_brush
  3. Shoot a portal on it.
  4. Renders in front of portals.

Workaround I found :

Don't give the decal property and offset the material's brush by 1 unit (To combat Z-Fighting). Despite it being a unit off, the materials still renders behind portals.

Operating System

No response

@L9M2 L9M2 added the Type: Bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant