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

Prefer RGBA over CI toggle for automatic texture format #299

Merged
merged 7 commits into from
Apr 12, 2024

Conversation

Lilaa3
Copy link
Collaborator

@Lilaa3 Lilaa3 commented Jan 18, 2024

Suggested by a ton of people.
Kinda of inconvenient for people who care about performance but with repo settings files (see settings rework pr) it will be no issue for anyone who cares.

Copy link
Collaborator

@jesusyoshi54 jesusyoshi54 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def getOptimalFormat(tex, curFormat, isMultitexture):
    texFormat = "RGBA16"
    if isMultitexture:
        return curFormat

link

If you are adding a multi-texture, and one texture is already set, the optimal texture format of the second one is curFormat unless the other texture is in opposition to the current format, in which case the optimal format is CI or whatever this function returns.

A CI multi-texture must use another CI texture and likewise an RGBA/Intensity texture must NOT use a CI texture.

I would also say that it is best if when choosing a new texture in a multi-texture, that it optimally chose the correct format between available options. If I swap between a color or intensity option, I would prefer if the texture format automatically updated. The only restriction is that I can't use a CI.

__init__.py Outdated Show resolved Hide resolved
@Lilaa3
Copy link
Collaborator Author

Lilaa3 commented Jan 21, 2024

If you are adding a multi-texture, and one texture is already set, the optimal texture format of the second one is curFormat

Wait why?? curFormat is just the format of the not updated texture format

@Dragorn421 Dragorn421 added the f3d Has to do with the "f3d" code common to all games label Jan 22, 2024
@jesusyoshi54
Copy link
Collaborator

jesusyoshi54 commented Jan 23, 2024

Wait why?? curFormat is just the format of the not updated texture format

Currently it returns curFormat universally while making a multi-texture. This is fine but not under the circumstances I laid out before.
On top of that I think you could also just run the format change as needed but just exclude CI or non CI textures as needed.

I said optimal but really it isn't per se, I more meant that it was a valid return.

@Dragorn421
Copy link
Contributor

Is this PR waiting on anything? (for what specifically?)

If just waiting for lila to answer np I don't mean to rush you. Just want to make sure we're not in a confusingly-waiting-each-other deadlock scenario

also bump again for the prefer_ci_over_rgba default

Lilaa3 added 2 commits April 6, 2024 15:32
Invert the logic, account for multi texture, hopefully improve code, toggle to skip auto pick, better descriptions (i think)
@Lilaa3 Lilaa3 changed the title Prefer CI over rgba toggle for automatic texture format Prefer RGBA over CI toggle for automatic texture format Apr 6, 2024
@jesusyoshi54
Copy link
Collaborator

Shouldn't the prefer_ci_over_rgba prop be UI dependent on auto_pick_texture_format prop? Maybe having it dynamic kind of sucks idk. I feel like there should be a UI connection of the props though

@Lilaa3
Copy link
Collaborator Author

Lilaa3 commented Apr 6, 2024

Shouldn't the prefer_ci_over_rgba prop be UI dependent on auto_pick_texture_format prop? Maybe having it dynamic kind of sucks idk. I feel like there should be a UI connection of the props though

Oh yeah good call

put anim range above texture format settings, dynamic ui, reduced repetition of context.scene.fast64.settings
@Lilaa3
Copy link
Collaborator Author

Lilaa3 commented Apr 6, 2024

Is there anything else missing @jesusyoshi54 ?

@jesusyoshi54
Copy link
Collaborator

Is there anything else missing @jesusyoshi54 ?

I'll review tonight. First glance looks good

Copy link
Collaborator

@jesusyoshi54 jesusyoshi54 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this is very nice I like a lot good job lila you are the best

@Dragorn421 Dragorn421 merged commit 161ad27 into Fast-64:main Apr 12, 2024
1 check passed
@Lilaa3 Lilaa3 deleted the default-to-rgba16 branch August 24, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f3d Has to do with the "f3d" code common to all games
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants