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

Add an import option to force TextureArrays as normal maps for RGTC Compression(redo) #52212

Merged

Conversation

darthLeviN
Copy link
Contributor

this is a redo of the pull request : #52058

i'm a noob on github and i deleted it.

i have added the option to chose normal map for channel pack. this will force the to use red and green channels for the texture only. the option is added meaning it will not conflict with the existing settings.

i have made this change as a response to my own proposal

Bugsquad edit: Closes godotengine/godot-proposals#3184

@darthLeviN darthLeviN requested a review from a team as a code owner August 29, 2021 08:22
@Calinou Calinou added this to the 4.0 milestone Aug 29, 2021
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

It seems you forgot to load in the proper .clang-format configuration (located in the root folder of the Godot repository), as the default configuration was used instead. We don't have forced line wrapping in Godot's codebase 🙂

@darthLeviN
Copy link
Contributor Author

for now i manually i ran clang format with "https://github.com/godotengine/godot/blob/master/.clang-format" on the file.
this is ok right?... bc it changed a lot of formatting.

@Calinou
Copy link
Member

Calinou commented Aug 29, 2021

for now i manually i ran clang format with "https://github.com/godotengine/godot/blob/master/.clang-format" on the file.
this is ok right?... bc it changed a lot of formatting.

clang-format should only have changed the lines you added, rather than changing everything in the file.

@darthLeviN
Copy link
Contributor Author

for now i manually i ran clang format with "https://github.com/godotengine/godot/blob/master/.clang-format" on the file.
this is ok right?... bc it changed a lot of formatting.

clang-format should only have changed the lines you added, rather than changing everything in the file.

so this has problems? i redo it again?

@Calinou
Copy link
Member

Calinou commented Aug 29, 2021

so this has problems? i redo it again?

Yes, you should either fix the clang-format setup or perform the formatting manually to follow the code style guidelines I linked.
No need to open another pull request – instead, amend your existing commit using git commit --amend and perform a force push using git push -f.

@darthLeviN darthLeviN force-pushed the master_texture_array_normal_added branch 3 times, most recently from 95ef081 to d3664c1 Compare August 29, 2021 17:11
i have added the option to chose normal map for channel pack. this will force the to use red and green channels for the texture only. the option is added meaning it will not conflict with the existing settings.

i have made this change as a response to my own proposal

Bugsquad edit: Closes godotengine/godot-proposals#3184
@darthLeviN darthLeviN force-pushed the master_texture_array_normal_added branch from d3664c1 to 3afabb8 Compare August 29, 2021 17:18
@darthLeviN
Copy link
Contributor Author

so this has problems? i redo it again?

Yes, you should either fix the clang-format setup or perform the formatting manually to follow the code style guidelines I linked.
No need to open another pull request – instead, amend your existing commit using git commit --amend and perform a force push using git push -f.

i think it should be fixed now. i'm getting a hang of it.

@darthLeviN darthLeviN requested review from Calinou and removed request for a team August 31, 2021 10:44
@clayjohn clayjohn requested a review from a team August 31, 2021 16:03
@akien-mga
Copy link
Member

I'm not familiar with this import pipeline to say if this is a good change, but the commits should be squashed in prevision for a potential merge. See PR workflow for instructions.

@akien-mga akien-mga requested review from reduz and a team September 15, 2021 11:00
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
@darthLeviN
Copy link
Contributor Author

darthLeviN commented Sep 16, 2021

I'm not familiar with this import pipeline to say if this is a good change, but the commits should be squashed in prevision for a potential merge. See PR workflow for instructions.

all i know is that normal mode force is needed for texture arrays too.

if there is a desired way to use it, i would like to know to make the appropriate changes. this is what i came up with.

personally i think the regular texture import makes no sense. because normal mode ends up affecting channel packing.

so does the roughness feature which i saw but haven't used before.

i think there should be just a basic way to set used channels. and force things. the whole import pipeline is getting too copmlicated.

@@ -356,6 +356,9 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
Image::CompressSource csource = Image::COMPRESS_SOURCE_GENERIC;
if (channel_pack == 0) {
csource = Image::COMPRESS_SOURCE_SRGB;
} else if (channel_pack == 2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably define some enum at this point so the code is not full of magic numbers.

@YuriSizov YuriSizov merged commit 2e24b76 into godotengine:master Aug 16, 2022
@YuriSizov
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an import option to detect/force TextureArrays as normal maps for RGTC compression
5 participants