LingDong- / ofxPoissonFill

Poisson filling shader for OpenFrameworks
MIT License
56 stars 3 forks source link

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

Open dimitre opened 4 years ago

dimitre commented 4 years ago

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- commented 4 years ago

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!