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

does it work for non power of two texture sizes? #1

Open
dimitre opened this issue Sep 5, 2020 · 1 comment
Open

does it work for non power of two texture sizes? #1

dimitre opened this issue Sep 5, 2020 · 1 comment

Comments

@dimitre
Copy link

dimitre commented Sep 5, 2020

Thanks for this great addon!
I've noticed it sometimes cause an offset of the original image if using arbitrary texture sizes, like 1920x1080
and using power of two textures, like 512 x 512 the effect mantains the alignment with the original scene.
is it possible to use different texture values?
Thank you

@LingDong-
Copy link
Owner

Hi @dimitre , thanks for reporting this issue. Could you please share a screenshot of the issue, if possible? I was trying to reproduce the problem by modifying the WIDTH and HEIGHT constants in the included example, but it seems to look alright at non-power of two values.

Meanwhile, since the algorithm works by halving the texture size recursively (and doubling it back to the original size later), it could be an inherent limitation, and the best solution might be to pad the texture first and crop it afterwards. I'll see if there's a better solution if I can reproduce the issue.

Thanks!

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