-
Notifications
You must be signed in to change notification settings - Fork 132
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
Hexen/Heretic: Support Color-Translation in V_DrawTLPatch #1267
Conversation
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. 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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
I'll pass this question over to @JNechaevsky .
No, this would be a different issue with a separate fix, please. |
AFAIR, I've made visual comparison between paletted and TrueColor executables. Turns out, Heretic's TrueColor have incorrect "alt" opacity, or...? |
I have created an open issue to better explain it, together with some screenshots. Maybe we can further discuss it there? 😉 |
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](https://private-user-images.githubusercontent.com/29991301/409202499-8e72a8d9-51f9-43a9-b4bb-7bf545e89f25.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NjEzMjUsIm5iZiI6MTczOTY2MTAyNSwicGF0aCI6Ii8yOTk5MTMwMS80MDkyMDI0OTktOGU3MmE4ZDktNTFmOS00M2E5LWI0YmItN2JmNTQ1ZTg5ZjI1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDIzMTAyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU1OTNjNmFjNDg3MDNlY2Y5M2FlMjc1ZWM2OTMzZDIxMjE3NTU2Mzc5NmY2MWQzMTNmOTExZDRjOGIwY2RhYjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Q3lKtP4uRfolrzR7g9dIDDWFhnUg58qFM-6sgSAxVP0)
Translated True Color Blend example:
![2025-02-03 17_49_49-Window](https://private-user-images.githubusercontent.com/29991301/409202689-9530147a-9dee-4d85-921c-306ee02c6699.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NjEzMjUsIm5iZiI6MTczOTY2MTAyNSwicGF0aCI6Ii8yOTk5MTMwMS80MDkyMDI2ODktOTUzMDE0N2EtOWRlZS00ZDg1LTkyMWMtMzA2ZWUwMmM2Njk5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDIzMTAyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIxNjllNjc2YTQyMzliMjBhOGQyZTk0MzlmNzdiYmYyMDhkMmQyMjBhMDg5YzYzYzBiYjgzZDVkMTRiZWE5MjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.JN5X7hzVNwMmsftQYom0mTeHEcLME7B46oWrkqZYRWI)