
0
Under vurdering
Odd lerp results caused by lighting input
Value A is 0.5 in both instances. T is 0 in both instances, so it's my understanding that the output should be A (0.5). This correctly happens when I have a simple color plugged into B, but it seems to go awry when I plug lighting data into B instead. The preview in the Lerp node looks correct, but you can see the output is different.
I think this is a bug unless I'm misunderstanding how Lerp works.
Kundesupport af UserEcho
Custom lighting is rendered additively *per light source*.
Two directional lights * 0.5 = 1, hence it's white.
If you want it to become gray instead of being lit, with the Lerper slider:
Try to do it all in the custom lighting channel and I bump back into this behavior -- haven't found a way to normalize it.
(only difference is that I swapped the 0 and 1 values)
Is this correct behavior? Left is what I'd expect, but on right I'd expect it to go dark to light (opposite of left).
If I swap out the LightAtten * LightColorAlpha setup with a slider, it can go dark as I'd expect, so it feels like a bug to me.
edit: If I take the right side setup and change 1 to 0.5, this is the behavior: http://gfycat.com/ExcellentPartialIndigobunting
I'm confused heh.
On the left side, the light attenuation setup provides a smooth transition from 1 to 0 as you move away from the light source. When I have that plugged in to lerp between 0 and 1, it works as expected.
But when I plug the (assumed) identical values from LightAtten into a lerp between 1 and 0, it's as if the light attenuation changes and I no longer get a smooth transition. Why does changing A and B of the lerp node seem to change the values that LightAtten * LightColor provides it?
The values being fed into the lerp's T should be the same -- the light is the same and the nodes feeding lighting data are the same. A T value of 0.5 should output 0.5 in both setups (and it does if I use a slider instead of the LightAtten setup), but it doesn't here. Why not?
First, it renders a base pass, with all the things that are only supposed to be added once, and it also renders one directional light source.
Secondly, *for each light source affecting this object*, it runs a forward add pass, which is rendered *additively* to the mesh.
I would guess you have a directional light pushing pure white into the second example, and the rest of the light sources don't affect it, because it's overshooting 1 in value