|
From: Edward d'A. <tru...@gm...> - 2017-05-29 07:53:56
|
On 28 May 2017 at 20:21, Edward d'Auvergne <tru...@gm...> wrote:
> On 26 May 2017 at 13:35, Thorsten Renk <tho...@sc...>
> wrote:
>>
>>> Still, this is not to be confused with a subjective phenomenon.
>>
>>
>> I don't think anyone said 'subjective phenomenon' - the word used was
>> 'perception'.
>>
>>> But I really
>>> still do not at all understand the argument for shifting this into
>>> FGData!
>>
>>
>> Because ALS has what you call 'eye physics' and I 'perception' pulled
>> inside
>> the GLSL code whereas Classic and Rembrandt do not (the difference is for
>> instance in how light from different sources is added).
>>
>> Especially if this is later used to create a new (or
>>>
>>> replacement) OSG light source, where it needs to be on the c++ side
>>> where the scene graph is set up.
>>
>>
>> ALS is ultimately going to do the same which it does with the sun light
>> source for the same reasons (attenuation and perception are computed
>> inside
>> the GLSL code): take the position info and discard the color info.
>
> As this is not subjective, equation 20 of that paper holds for ALS and the
> other renderers. Although ALS does the lighting work in GLSL, I'd prefer to
> keep the code where it is, or in another location in simgear/flightgear,
> simply so that the default, Rembrandt, and any future renderer (say in 20
> years plus) will have access to the property. Remember the after my
> optimisations, this is roughly about zero net cost on the CPU to calculate.
> It could be reimplemented in each GLSL shader if desired, from the moon's
> phase or age. What value would be best for ALS here? Anyway, I'll try to
> untie this property in a practical manner - simply untying it and leaving
> any other changes for a different commit.
I've made a merge request for a small commit simply untying the
/environment/moonlight property:
https://sourceforge.net/u/edauvergne/flightgear/ci/a0dc7b5ba3fdf110fe3b9716a3fd6a0a87a7a210/
Is this the best (intermediate) solution for the ALS renderer?
Regards,
Edward
|