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

Incomplete SURF_ALPHATEST support #42

Closed
wants to merge 1 commit into from

Conversation

SirYodaJedi
Copy link

@SirYodaJedi SirYodaJedi commented Aug 12, 2023

Issue

The new Quake II remaster (henceforth Q2EX) supports an additional surface flag (bit 25, 0x02000000) for binary transparency, as seen in Q2Pro and KMQuake2. Like SURF_TRANS33 and SURF_TRANS66, this flag needs to be used in conjunction with CONTENTS_TRANSLUCENT in order to actually allow the contained brush to be seen through.

Solution

Q2Tools-220 currently automatically flags brushes with faces containing Trans33 and Trans66 as translucent, and this function could be extended to do the same for alphatest.
I have drafted an example of what might need to be done. I don't really do much programming, so I don't completely understand everything involved, which is why this is currently labeled as incomplete and a draft. For example, there are some mentions of the translucency flags in src/patches.c that I have no clue what they do. I hope though, that as a draft, it explains well enough what should be necessary to accomplish what I am suggesting be added.

@qbism qbism marked this pull request as ready for review August 12, 2023 07:07
@qbism
Copy link
Owner

qbism commented Aug 13, 2023

This is fairly straightforward to add but other support seems needed. Questions:

  1. Do any existing .map files compatible with q2pro support this? What compile tools for Q2EX exist?
  2. Does rad need changes? For example, when transparency mask is enabled (SURF_TRANS33 + SURF_TRANS66) rad basically passes half the light through.
  3. What do these maps look like in non-supporting engines?

I am going to close this request because it is incomplete and untested, but encourage adding as a feature request to issues where it may get more visibility if others have input.

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

Successfully merging this pull request may close these issues.

2 participants