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

ktx encode and create lost --normalize option #812

Open
wasimabbas-arm opened this issue Dec 4, 2023 · 2 comments
Open

ktx encode and create lost --normalize option #812

wasimabbas-arm opened this issue Dec 4, 2023 · 2 comments

Comments

@wasimabbas-arm
Copy link
Contributor

Not sure why --normalize was removed from encode and create but its still referred to in the docs within --normal-mode

     --normal-mode      Optimizes for encoding textures with normal data. If the input texture has
                         three or four linear components it is assumed to be a three component
                         linear normal map storing unit length normals as (R=X, G=Y, B=Z). A fourth
                         component will be ignored. The map will be converted to a two component
                         X+Y normal map stored as (RGB=X, A=Y) prior to encoding. If unsure that
                         your normals are unit length, use --normalize. If the input has 2 linear
                         components it is assumed to be an X+Y map of unit normals.
                         The Z component can be recovered programmatically in shader code by using
                         the equations:
                             nml.xy = texture(...).ga;              // Load in [0,1]
                             nml.xy = nml.xy * 2.0 - 1.0;           // Unpack to [-1,1]
                             nml.z = sqrt(1 - dot(nml.xy, nml.xy)); // Compute Z
                         ETC1S / BasisLZ encoding, RDO is disabled (no selector RDO, no endpoint
                         RDO) to provide better quality.
@MarkCallow
Copy link
Collaborator

I missed this. @lexaknyazev was this a deliberate omission? If so, why? The normalize code is still in the image processing library.

@MarkCallow
Copy link
Collaborator

was this a deliberate omission?

Ping @lexaknyazev. Please respond. Do you have any objection to it being restored?

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

No branches or pull requests

2 participants