検索 - User list
Full Version: Texture look like Premultiplied
Root » Houdini Indie and Apprentice » Texture look like Premultiplied
TaoChen
The second one doesn't have an alpha channel。
Is there any way to turn it off?
jsmack
Are you trying to disable alpha premultiplication in the 3d viewport? I don't think it's possible.
TaoChen
jsmack
Are you trying to disable alpha premultiplication in the 3d viewport? I don't think it's possible.
This is the result of rendering.
Disabling it in the 3D view doesn't seem to work, or maybe I haven't found the corresponding switch.
dolag233
I find out that you should unpremult the color you get like this:

path = r"you/image/path";
vector4 cd = texture(path, v@uv.x, v@uv.y, "srccolorspace", "linear"); // note: always use linear
@Cd = cd;
@Alpha = cd.a;

if(@Alpha > 0){
    @Cd /= @Alpha; // unpremult
    @Cd = pow(@Cd,2.2); // if your color space is srgb, add this
}

And because the inner premult came before color space conversion, so you'd always sample it as linear, then unpremult, and finally convert to your color space like sRGB.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB