Changes

Jump to navigation Jump to search

Games/ETS2/Modding guides/1.32

15 bytes added, 08:21, 3 December 2018
Flares data
{{Tip|Be aware that page is not final. Thus do not fully rely on written subjects, until this message is here!}}
 
 
= Introduction =
D .. background sRGB color, we assume middle gray #808080
b .. recomputed alpha
 
The old blending expression:
OLD = S * a + D * (1 - a)
 
The new blending expression:
 
NEW = sRGB(rgb(S) * b + rgb(D) * (1 - b))
 
Alpha which would result in the same final value after blend:
b = (rgb(OLD) - rgb(D)) / (rgb(S) - rgb(D))
Flare unit (usually found as hookup defined models inside '''/unit/hookup''' directory) got new functionality of manual curve definition for flare scaling, with two new float attributes:
* '''scaling_start_scalescaling_start_distance''' - defines distance at which flare scaling starts.* '''scaling_end_scalescaling_end_distance''' - defines distance at which flare scaling ends, flare scale reaches '''scale_factor'''.
Note that both of those attributes hold distance in meters and that they won't be used unless '''scale_factor''' is bigger then 1.0.

Navigation menu