Hi
I'm reading a rgba texture with AiTextureHandleAccess.
It seems like .rgb() values are affected by the alpha channel (rgb * a). Is this expected?
Mtoa 2.0.2
Thanks
AtTextureHandle* textureHandle = AiTextureHandleCreate(texture_path);<br>AtRGBA textureSample = AiTextureHandleAccess(sg, textureHandle, &textureParams, &textureSampleSuccess);<br>sg->out.RGB = textureSample.rgb();
I would only expect this to happen for textures that are sourced from data that expects premultiplied alpha (such as PNG, I believe). If sampling directly from PNG, or converting to TX from PNG, you might end up with that situation. Have you tried a TIFF source, and then turn that into TX to see if the alpha stays indepdendent?
Hi
Source is tiff, tx command looks like this:
maketx in.tiff --nchannels 4 -d float -v --unpremult -o out.tx
I've attached tiff and tx
Thank you
I was using maketx from mtoa 1.4.2.2, when using the one from 2.0.1.1 and the tx comes out right.
Feel free to rename the title of this post... false alarm
Thanks