I'm trying to extract alpha from map (for example multiple png combined with composite node).
Below is my attempt with OSL but this doesn't work.
Maybe someone knows why?
Below is my attempt with OSL but this doesn't work.
Maybe someone knows why?
Code:
shader extractAlpha ( string input_tex = "", output color result = color(0), output float alpha = 0, ) { float f_outputTexAlpha = 0.0; color C = texture(input_tex, u, v, "alpha", f_outputTexAlpha);; result = C; alpha = f_outputTexAlpha; }