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

TrueColor: add ingame toggler #1225

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

TrueColor: add ingame toggler #1225

wants to merge 6 commits into from

Conversation

JNechaevsky
Copy link
Collaborator

This adds simple ingame toggler for "TrueColor Rendering". Few remarks:

  • It doesn't add back full revert to paletted renderer, so translucency effects are still expensive and no support for custom PLAYPAL tinting effects.
  • I was forced to remove extra line break after subheaders to don't separate menus. From another hand, it gives some extra vertical space for easier adding possible new features.
  • Might be not that useful for two builds, but probably will be handy for later.

* All TrueColor code is guarded by #ifdef CRISPY_TRUECOLOR.
* Extra line breaks before some subheaders no longer used to get some extra vertical space and primary to fit everything on first Crispness page.
Copy link
Owner

@fabiangreffrath fabiangreffrath left a 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!

@JNechaevsky
Copy link
Collaborator Author

Before we'll merge this: I'm afraid we have bumped into a small misunderstanding about this switch with @rfomin. While my idea was to have just an in-game switch between paletted/truecolor views (not renderers), and that's what it do now, Roman was meaning full toggling.

But as already known, full toggling is a long and different story. Aside from possible turning pixel_t variables into a pointers and doubling R_Drawing functions for 8 and 32 bit, there will be one extra problem: upper level render functions have to be not just restarted, but instead fully destroyed and completely reinitialized again. I may be completely wrong here, though.

Another approach is to always have a TrueColor mode, but make it friendly with custom palette tints and take care about expensive translucency. In this case, only running on 16-bit and below display modes will not be possible.

Really no idea which way is better. First one is an absolute full mile and have to be more correct in technical terms, second one is probably simpler and shorter.

So, for now this PR doesn't do much, except adds some vertical space for Crispness menu.

@fabiangreffrath
Copy link
Owner

I think that's understood. It remains full truecolor rendering under the hood, but merely emulates paletted rendering by loading colormaps from the COLORMAP lump instead of fading RGB values to black. Translucency performance and custom palette issues still remain.

@JNechaevsky
Copy link
Collaborator Author

Yes, absolutely. You know this better than anyone, I know this after months of working with TrueColor code. But Roman wasn't working with TrueColor previously. 🙂

Still, should be merge this PR then? And what is your recommendation for farther compatibility support, i.e. which way we should move?

@rfomin
Copy link
Collaborator

rfomin commented Sep 16, 2024

Before we'll merge this: I'm afraid we have bumped into a small misunderstanding about this switch with @rfomin. While my idea was to have just an in-game switch between paletted/truecolor views (not renderers), and that's what it do now, Roman was meaning full toggling.

Yes, my idea was full toggling and remove the separate true color build. I think the current implementation of the toggle is not very useful.

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.

3 participants