1,360
edits
Line 1,292: | Line 1,292: | ||
to true. If you want your own strobe pattern, generate a strobe function and use <b>intensity_scale</b> instead to pass it to the shader. | to true. If you want your own strobe pattern, generate a strobe function and use <b>intensity_scale</b> instead to pass it to the shader. | ||
=== Complete example === | |||
Here's the left nav light of the C-172p: | |||
<syntaxhighlight lang="xml"> | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<PropertyList> | |||
<name>procedural-light-nav-left</name> | |||
<inherits-from>Effects/procedural-light</inherits-from> | |||
<parameters> | |||
<light_color_base_r type="float">1.000</light_color_base_r> | |||
<light_color_base_g type="float">0.320</light_color_base_g> | |||
<light_color_base_b type="float">0.320</light_color_base_b> | |||
<light_color_center_r type="float">1.0</light_color_center_r> | |||
<light_color_center_g type="float">1.0</light_color_center_g> | |||
<light_color_center_b type="float">1.0</light_color_center_b> | |||
<intensity_scale type="float">1.0</intensity_scale> | |||
<!-- Arc is 110 deg, is 55 deg per side, giving 35 deg from wing --> | |||
<pointing_x type="float">1.0</pointing_x> | |||
<pointing_y type="float">0.7002075382097097</pointing_y> | |||
<pointing_z type="float">0.0</pointing_z> | |||
<is_directional type="bool">true</is_directional> | |||
<is_strobe type="bool">false</is_strobe> | |||
<!-- Angles are 0.0 at 0 deg from pointing direction, 1.0 at | |||
90/-90 deg, and 0.0 at 180/-180 deg. | |||
For left navigation light we use -0/-35 .. +110/+145 for | |||
the inner/outer range. This gives an arc of 110/180 deg, | |||
or 55/90 deg from center. | |||
Value = sin(angle in degrees) | |||
0.8191520442889918 = 55 deg (* 2 = 110 deg inner angle) | |||
1.0000 = 90 deg (* 2 = 180 deg outer angle) | |||
--> | |||
<inner_angle type="float">0.8191520442889918</inner_angle> | |||
<outer_angle type="float">1.0</outer_angle> | |||
<zero_angle type="float">0.982547593563</zero_angle> | |||
<outer_gain type="float">0.1</outer_gain> | |||
</parameters> | |||
</PropertyList> | |||
</syntaxhighlight> | |||
== ALS fuselage shadow effect == | == ALS fuselage shadow effect == |
edits