Доработка. В процессе. Штриховка неисправных модулей ФС на диаграмме
This commit is contained in:
@@ -7,6 +7,9 @@ code = "shader_type canvas_item;
|
||||
|
||||
#define RADIUS_INNER_0 200.0 /* Радиус внутренний для режима приоритет РТО */
|
||||
#define RADIUS_INNER_1 480.0 /* Радиус внутренний для режима приоритет РЛС */
|
||||
#define ANTENAS_COUNT 28 /* Количество антенн */
|
||||
#define ANT_BAND_READY 0U /* Антенна (модуль ФС) готова или исправна */
|
||||
#define ANT_BAND_FAILED 1U /* Антенна (модуль ФС) не исправно */
|
||||
|
||||
uniform vec2 pc0 = vec2(560, 560); /* Центр сетки антенн */
|
||||
uniform float rotation: hint_range(0.0, 360.0) = 0.0; /* */
|
||||
@@ -17,6 +20,8 @@ uniform float radius_inner_1 = RADIUS_INNER_1;
|
||||
uniform float radius_outter = 550.0; /* Радиус внешний. Должно быть равно ant_band_r1_6 */
|
||||
uniform float alpha: hint_range(0.0, 1.0) = 0.5;
|
||||
uniform int mode = 0; /* Режим отображения. Приоритет РТО - 0, приоритет РЛС - 1 */
|
||||
uniform float ffr: hint_range(0.0, 1.0) = 0.2;
|
||||
uniform float sfr: hint_range(0.0, 10.0) = 0.0;
|
||||
|
||||
const int ant_band_count_0 = 2;
|
||||
const int ant_band_count_1 = 2;
|
||||
@@ -42,7 +47,8 @@ const float ant_band_r1_4[] = {450.0, 530.0};
|
||||
const float ant_band_r1_5[] = {500.0, 540.0};
|
||||
const float ant_band_r1_6[] = {550.0, 550.0};
|
||||
|
||||
uniform vec4 ant_band_c[28];
|
||||
uniform vec4 ant_band_c[ANTENAS_COUNT];
|
||||
uniform uint ant_band_m[ANTENAS_COUNT];
|
||||
const float d4 = 90.0;
|
||||
const float ds = 1.0;
|
||||
|
||||
@@ -79,6 +85,10 @@ void antenas(inout vec4 c, vec2 uv, vec2 p0, int cnt, float r0, float r1, inout
|
||||
col.rgb = ant_band_c[j].rgb;
|
||||
index++;
|
||||
col.a = alpha + (random_timed(uv) - 0.5f) * ant_band_c[j].a;
|
||||
if (ant_band_m[j] == ANT_BAND_FAILED)
|
||||
{
|
||||
col.a *= (1.0 - ffr) + tanh(10.0 * sin(TIME * sfr + 2.0 * PI * uv.x / 10.0)) * ffr;
|
||||
}
|
||||
float v = float(i & 1);
|
||||
vec4 color = v * col + (1.0f - v) * col;
|
||||
sector(c, uv, p0, float(i) * da, da, r0, r1, color);
|
||||
@@ -120,4 +130,7 @@ shader_parameter/radius_inner_1 = 480.0
|
||||
shader_parameter/radius_outter = 550.0
|
||||
shader_parameter/alpha = 0.5
|
||||
shader_parameter/mode = 0
|
||||
shader_parameter/ffr = 0.2
|
||||
shader_parameter/sfr = 0.0
|
||||
shader_parameter/ant_band_c = PackedVector4Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
shader_parameter/ant_band_m = PackedInt32Array(0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
|
||||
Reference in New Issue
Block a user