That is i don't want the landing light to behave same in all time of day..
Ah - sorry - when you say 'light' you refer to the
landing light - I thought you mean the sunlight...
Lights are hard-coded in the GLSL shaders (in the example, runway-ALS.frag), you're looking for code blocks like
- Code: Select all
vec3 secondary_light = vec3 (0.0,0.0,0.0);
if (use_searchlight == 1)
{
secondary_light.rgb += searchlight();
}
if (use_landing_light == 1)
{
secondary_light += landing_light(landing_light1_offset, landing_light3_offset);
}
if (use_alt_landing_light == 1)
{
secondary_light += landing_light(landing_light2_offset, landing_light3_offset);
}
color.rgb +=secondary_light * light_distance_fading(dist) + lightspot(relPos);
It's a pretty simple implementation, never intended to be more (and we'll be getting better lights with the compositor and ALS 2.0 in the mid-future). If I understand you correctly, the problem is that the intensities should not be just added like above (which I know...)
If you want to improve the existing implementation, the intensities would need to be added
under the log - i.e. by using the addLights routine
- Code: Select all
vec3 addLights(in vec3 color1, in vec3 color2)
{
vec3 outcolor;
outcolor.r = 0.14 * log(exp(color1.r/0.14) + exp(color2.r/0.14)-1.0);
outcolor.g = 0.14 * log(exp(color1.g/0.14) + exp(color2.g/0.14)-1.0);
outcolor.b = 0.14 * log(exp(color1.b/0.14) + exp(color2.b/0.14)-1.0);
return outcolor;
}
You're welcome if you want to make the change, but I have to warn you in advance that there's plenty of places where the same change needs to be made unfortunately...