Skip to content

Fix ancient-remains foliage that uses alphaGen portal#1965

Open
slipher wants to merge 2 commits intoDaemonEngine:masterfrom
slipher:foliage
Open

Fix ancient-remains foliage that uses alphaGen portal#1965
slipher wants to merge 2 commits intoDaemonEngine:masterfrom
slipher:foliage

Conversation

@slipher
Copy link
Copy Markdown
Member

@slipher slipher commented May 5, 2026

Move the alphaGen portal implementation from the portal shader to the generic one. This allows it to be combined with other features such as alpha testing. Fixes the grass texture on map ancient-remains that uses this alphagen trick to fade when the camera is close. Turns out portals are not the best use case of alphagen portal!

2026-05-05.13-00-07.mp4

Also this change makes the black lines on the Pulse portal screens thinner, which matches Tremulous behavior. Maybe the portal shader (now being NUKED because implementing the alphagen was its only purpose) also didn't have texture coordinates set up right.

slipher added 2 commits May 5, 2026 11:38
For alphaGen portal, a "portal" shader was used, which was like the
"generic" shader but with most features removed. Instead of that, move
alphaGen portal support to the "generic" shader so that it can be
combined with other features. This fixes the ancient-remains foliage
which uses alphaGen portal to fade out when the camera is close, but
also needs alpha testing which was not supported in the "portal" shader.
(Also it's vertex-lit so it should use overbright.)

I added back the capability for the "generic" shader to do vertex
lighting, but the implementation is simpler than before.
@illwieckz
Copy link
Copy Markdown
Member

Oh that's very nice! I do remember having to disable the keywords in some WIP ports of the maps long time ago.<<<

Turns out portals are not the best use case of alphagen portal!

At some point we may give it a more meaningful name, like alphaGen distance or something like that (while keeping the compatibility with the old alphaGen portal name).

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