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

Removal of stipple in certain shaders causes pronounced z-fighting #5

Closed
sTc2201 opened this issue Jul 21, 2023 · 5 comments
Closed

Comments

@sTc2201
Copy link

sTc2201 commented Jul 21, 2023

In particular, these three shaders (or at least one of them, since I disabled all three):

  • gta_emissive.fxc
  • gta_emissivenight.fxc
  • gta_emissivestrong.fxc

It becomes very apparent at night when approaching the night windows on buildings when they LOD transition since they use the emissive shader (gta_emissive_alpha.sps).

Yeah I know, the game in general has z-fighting issues, but this one is very aggressive and noticeable and I remember this happening in the past as well when replacing the stipple texture with a solid colored one, that's why I assume it's due to the removal of the stippling in some of the passes, could be wrong or something else though I'm just speaking from my experience.

Here's is a video with and without the modified shaders above:

@Parallellines0451
Copy link
Owner

Try removing just gta_emissivestrong.fxc.

This doesn't seem like a stipple issue as it was removed only from shaders that don't actually need it for transparency. This could instead be a consequence of the invisible lights fix, but in that case nothing can be done about this.

If you remove it you'll end up with various lights missing around the map.

@sTc2201
Copy link
Author

sTc2201 commented Jul 21, 2023

Removing gta_emissivestrong.fxc alone did not fix it. As I mentioned, this exact issue happened to me before when I replaced the stipple.wtd with those "shader fixes" that had a stipple texture with solid colors, I think you're familiar with this infamous one haha.

I also tested it by reverting the "forward rendered stipple removal" for the three shaders, recompiled them and that really fixed it, well, it reduced the z-fighting to the point where it's not as super noticeable, like in my second clip in the video above.

@Parallellines0451
Copy link
Owner

Yeah I'm familiar with that texture. Looks like you're right, restoring stipple to gta_emissive made it a lot less noticeable. I suppose I'll temporarily remove that tweak from these emissive shaders until we manage to fix/lessen z-fighting. Have you noticed any more occurrences of excessive z-fighting aside from these lights?

@sTc2201
Copy link
Author

sTc2201 commented Jul 21, 2023

Have you noticed any more occurrences of excessive z-fighting aside from these lights?

None so far, only this one caught my attention due to past experience with it.

@Parallellines0451
Copy link
Owner

Fixed z-fighting and restored stipple for that shader until we're able to fix the improper crossfade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants