Dear users,
I write a kind of generic fx-shader that mimics most of the VrayMaterial for use in interactive scenarios.
Currently I code the several blend modes for the 3dsmax standard composite map, and I got all of them except one:
Spotlight Blend.
In the documentation it says:
"Same as Spotlight but also adds ambient illumination to B".
So Spotlight itself is this:
"like multiply, bit with twice the brightness"
result = 2 * image1 * image2
So the code I tried for spotlight blend is this:
result = 2 * image1 * (image2 + 0.5)
But the result is a bit too bright. It seems not to be as simple. Does anybody have the code for spotlight blend? I trade some other blend modes if somebody wants to know .
Thanks and best regards
Robert
I write a kind of generic fx-shader that mimics most of the VrayMaterial for use in interactive scenarios.
Currently I code the several blend modes for the 3dsmax standard composite map, and I got all of them except one:
Spotlight Blend.
In the documentation it says:
"Same as Spotlight but also adds ambient illumination to B".
So Spotlight itself is this:
"like multiply, bit with twice the brightness"
result = 2 * image1 * image2
So the code I tried for spotlight blend is this:
result = 2 * image1 * (image2 + 0.5)
But the result is a bit too bright. It seems not to be as simple. Does anybody have the code for spotlight blend? I trade some other blend modes if somebody wants to know .
Thanks and best regards
Robert
Comment