Conversation
src/ispc/kernels/lanczos3.ispc
Outdated
| } else if (num_channels == 2) { | ||
| texel.x = byte_to_float(src_image.data[addr + 0]) * inv_255; | ||
| texel.y = byte_to_float(src_image.data[addr + 1]) * inv_255; | ||
| } else if (num_channels == 3) { |
There was a problem hiding this comment.
Shouldn't be too hard. Add clean_and_write_2_channels and clean_and_write_1_channel..at least from a quick glance it looks like that's the way to go?
Anyway I'm just noticing that also intel_tex_2 pretty much relies on RgbaSurfaces, so maybe this change may end up not needed after all 😅
There was a problem hiding this comment.
Shouldn't be too hard. Add
clean_and_write_2_channelsandclean_and_write_1_channel..at least from a quick glance it looks like that's the way to go?
It's a bit much to have those functions for every component count, I wish we could do something simpler and have the compiler "optimize it away" but there were some specific details...
Anyway I'm just noticing that also
intel_tex_2pretty much relies onRgbaSurfaces, so maybe this change may end up not needed after all 😅
As in shouldn't we update intel_tex_2 then?
b42e08c to
693fcfb
Compare
|
After testing this on my project, it seems to segfault so the PR is not ready yet |
Adds support for 1 and 2-channel textures.
First PR in this repo, I still have to build all the binaries on CI but I figured it would be better to do that once the PR is reviewed :)
Markes as draft because I don't want this to be merged until I'm done testing it in the project that is using those changes