Dear all,
this might be off-Topic, since it is not directy Vray-related:
I would like to create the Bitmap operations that 3dsmax offers in a shader:
RGB-Level, Offset, Output-Amount.
Also I would like to Combine These operations with Premultiplied Image or Not, Image Alpha (None, From RGB Intensity, From Alpha), RGB Output taken from (Alpha as Grey, RGB) and with Mono Channel or RGB Channel Output.
I have started with these lines, but the Output amount does't seem to deliver the correct results:
Can anybody help?
To simplify this, I have assumed that Alpha is 1.0 and that the underlying Color, if any, is black. Even if I clamp the Alpha after Output-Amount calculation to 1.0, the result is wrong.
this might be off-Topic, since it is not directy Vray-related:
I would like to create the Bitmap operations that 3dsmax offers in a shader:
RGB-Level, Offset, Output-Amount.
Also I would like to Combine These operations with Premultiplied Image or Not, Image Alpha (None, From RGB Intensity, From Alpha), RGB Output taken from (Alpha as Grey, RGB) and with Mono Channel or RGB Channel Output.
I have started with these lines, but the Output amount does't seem to deliver the correct results:
Code:
Bitmap.rgb *= rgbLevel //RGB Level; Bitmap.rgb = clamp(Bitmap.rgb + Offset * Bitmap.a, 0, 1) //RGB Offset Bitmap.rgba *= outputAmount; //Output Amount
To simplify this, I have assumed that Alpha is 1.0 and that the underlying Color, if any, is black. Even if I clamp the Alpha after Output-Amount calculation to 1.0, the result is wrong.
Comment