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

Hexen/Heretic: Support Color-Translation in V_DrawTLPatch #1267

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Noseey
Copy link

@Noseey Noseey commented Feb 3, 2025

Related Issue:
None

Changes Summary

Adding a translucent and color-translated rendering function for Heretic/Hexen to be called optionally in DrawTLPatch. It is based upon drawtinttab, so the source-color remains the dominating one (for Palette), just corrected by the translation. This allows for transparent golden center-messages.

Translated Palette Lookup example:
2025-02-03 17_57_51-Window

Translated True Color Blend example:
2025-02-03 17_49_49-Window

@Noseey
Copy link
Author

Noseey commented Feb 3, 2025

A small question regarding the True Color Blending Functions:

i_truecolor.c:

// [crispy] TINTTAB blending emulation, used for Heretic and Hexen
const uint32_t I_BlendOverTinttab (const uint32_t bg, const uint32_t fg)
{
    return I_BlendOver(bg, fg, 0x60); // 96 (38% opacity)
}

// [crispy] More opaque ("Alt") TINTTAB blending emulation, used for Hexen's MF_ALTSHADOW drawing
const uint32_t I_BlendOverAltTinttab (const uint32_t bg, const uint32_t fg)
{
    return I_BlendOver(bg, fg, 0x8E); // 142 (56% opacity)
}

Isn't the opacity the other way around (at least for Heretic)? Meaning the Alt-Tinttab has lower opacity of the source material? (see artibox-tiles in vanilla fullscreen-hud)

Edit: I think the dominant color selection changes between heretic and hexen. for me it looks like Heretic has dominant color-rows while hexen has dominant color-columns.

Heretic:
2025-02-03 19_42_42-Window

Hexen:
2025-02-03 19_43_01-Window

So the Alt funtion is more opaque in Hexen, less in Heretic, I presume. I think this game depedency might need to be considered in the blending / or the calls need to be adapted. Should I include this here?

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.

1 participant