-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Add Channel Remap settings to ResourceImporterTexture #99676
base: master
Are you sure you want to change the base?
Add Channel Remap settings to ResourceImporterTexture #99676
Conversation
903429f
to
fb7d254
Compare
cicd wants documentation. |
fb7d254
to
5b1b00e
Compare
<member name="process/channel_remap/alpha" type="int" setter="" getter="" default="3"> | ||
Specifies the data source of the image's alpha channel. | ||
[b]Red:[/b] Use the values from the red channel. | ||
[b]Green:[/b] Use the values from the green channel. | ||
[b]Blue:[/b] Use the values from the blue channel. | ||
[b]Alpha:[/b] Use the values from the alpha channel. | ||
[b]Red Inverted:[/b] Use inverted values from the red channel ([code]1.0 - R[/code]). | ||
[b]Green Inverted:[/b] Use inverted values from the green channel ([code]1.0 - G[/code]). | ||
[b]Blue Inverted:[/b] Use inverted values from the blue channel ([code]1.0 - B[/code]). | ||
[b]Alpha Inverted:[/b] Use inverted values from the alpha channel ([code]1.0 - A[/code]). | ||
[b]Unused:[/b] Set the color channel's value to the default ([code]1.0[/code] for alpha, [code]0.0[/code] for red, green or blue). | ||
[b]Zero:[/b] Set the color channel's value to [code]0.0[/code]. | ||
[b]One:[/b] Set the color channel's value to [code]1.0[/code]. | ||
</member> |
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.
Those repeated descriptions hurt, feels like these really should be an enum...
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.
I think they're unavoidable though, since the main purpose of these property descriptions is to show up in an inspector tooltip:
Changing the values to an enum and moving the full descriptions to the enum would mean that you have to open the docs and navigate away from the importer to see the descriptions of what each item does. Oh well.
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.
Changing the values to an enum and moving the full descriptions to the enum would mean that you have to open the docs and navigate away from the importer to see the descriptions of what each item does. Oh well.
We have something that handles this in the inspector, but not in the import options, export options, project settings or editor settings yet.
Fixes godotengine/godot-proposals#11243
Depends on #98071
Alternative to #81803
Adds color channel remap options to ResourceImporterTexture. These settings are part of the processing pass of the import operation, and allow discarding/replacing/overwriting the color channels of an imported image.
The following options are provided for each channel:
The other processes (such as format optimization) happen after this one, which makes it possible to remove unneeded color channels (like alpha), and the following steps (like compression) will take that into account (for instance by compressing as DXT1 instead of DXT5).