|
In my scripted material, the sampler (tex2D) always returns 1 for alpha when the texture is a Tiff. If I convert the .tif file to a .tga or .bmp, it works correctly. The texture is set via something like:
tex = selectbitmap caption: "Select Texture" delegate.MyTex = tex
tex.hasAlpha is true for the .tif files, and yet the alpha channel doesn’t seem to be making it to the shader. tex2D(MySampler, uv).a is always 1.
The only way I’ve come up with to fix this is to save a copy of the .tif as a temporary .bmp or .tga file for viewing. Is there a better way?
Thanks,
Mike.
|
|
|
|
I am now saving the selected .tif file as a temporary .tga file for viewing. This works, but it litters our directories with temporary files, and it’s problematic when loading a saved max file when the temporary file doesn’t exist (see my other post “Missing External File That Isn’t").
Is there some other way to get the shader to recognize the alpha channel in a .tif?
Thanks,
Mike.
|
|
|