This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Параметры

The material parameter that is available in the shader as a variable. Use the type of the ULON node for the parameter type.Параметр материала, который доступен в шейдере как переменная. Используйте тип узла ULON для типа параметра.

The syntax is the following:Синтаксис следующий:

ULON
ParameterType name = value <attributes>

The parameters are passed to shaders with the specified variable prefix.Параметры передаются шейдерам с указанным изменяемым префиксом.

Types of ParametersТипы параметров#

  • float / float2 / float3 / float4 — a float vector of N components in UUSLfloat / float2 / float3 / float4 — вектор с плавающей запятой N компонентов в UUSL
  • Int / Int2 / Int3 / Int4 — an integer (int) vector of N components in UUSLInt/Int2/Int3/Int4 — целочисленный (int) вектор N компонентов в UUSL
  • ArrayFloat / ArrayFloat2 / ArrayFloat4 — an array of float vectors with N components in UUSLArrayFloat/ArrayFloat2/ArrayFloat4 — массив векторов с плавающей запятой с N компонентами в UUSL
  • ArrayInt / ArrayInt2 / ArrayInt4 — an array of integer (int) vectors with N components in UUSLArrayInt/ArrayInt2/ArrayInt4 — массив целочисленных (int) векторов с N компонентами в UUSL
  • Color — a float vector with 4 components representing a color in UUSLColor — вектор с плавающей запятой с 4 компонентами, представляющий цвет в UUSL
  • Mask24 / Mask32 — an integer representing the mask in UUSLMask24/Mask32 — целое число, представляющее маску в UUSL
  • UV — a float vector of 4 components representing a UV transformation UV — вектор с плавающей запятой из 4 компонентов, представляющих UV-преобразование
  • Slider — a float variable with the default range of [0, 1]Слайдер — переменная с плавающей запятой с диапазоном по умолчанию [0, 1]
ULON Что используется для инициализации в ULON? UUSL
Float float valueплавающее значение float
Float2 array of 2 float valuesмассив из 2 значений с плавающей запятой float2
Float3 array of 3 float valuesмассив из 3 значений с плавающей запятой float3
Float4 array of 4 float valuesмассив из 4 значений с плавающей запятой float4
ArrayFloat float valueплавающее значение float[N]
ArrayFloat2 array of arrays of 2 float valuesмассив массивов из 2 значений с плавающей запятой float2[N]
ArrayFloat4 array of arrays of 4 float valuesмассив массивов из 4 значений с плавающей запятой float4[N]
Color array of 4 float valuesмассив из 4 значений с плавающей запятой float4
UV array of 4 float valuesмассив из 4 значений с плавающей запятой float4

Usage ExamplesПримеры использования#

For instance, the following example parameters are defined using the expression:Например, следующие параметры примера определяются с помощью выражения:

ULON
Float float_example = 1  
Int int_example = 1
ArrayFloat array_example = [1 2 3 4 5] <size=5>
ArrayFloat2 array_float2_example = [1 2 3 4 5 6] <size=3>
Float4 float4_example = [1 2 3 4]
Color color_example = [1 1 1 1]
UV uv_example = [1 1 0 0]
Mask24 mask24_example = 1

They are accessible in the shaders with the specified prefix:Они доступны в шейдерах с указанным префиксом:

UUSL
float a = var_float_example;
int b = var_int_example;
float c = var_array_example[0];
float d = array_float2_example [0][1];
float4 e = var_float4_example;
float4 f = var_color_example;
float4 g = var_uv_example;
int h = var_mask24_example;

ArgumentsArguments#

namename#

String

The name of the parameter.Имя параметра.

shader_nameshader_name#

String

Uniform name in the shader. If specified the provided uniform name is used, otherwise default naming logic is used.Единое имя в шейдере. Если указано, используется предоставленное универсальное имя, в противном случае используется логика именования по умолчанию.

minmin#

Float

The minimum limit for a parameter range (not applicable for Color and Array types).Минимальный предел диапазона параметров (не применимо для типов Color и Array).

Default values:Значения по умолчанию:

  • 0.0 — for the Slider parameter0.0 — для параметра Slider
  • -inf — for all the others parameters-inf — для всех остальных параметров

maxmax#

Float

The maximum limit for a parameter range (not applicable for Color and Array types).Максимальный предел диапазона параметров (не применимо для типов Color и Array).

Default values:Значения по умолчанию:

  • 1.0 — for the Slider parameter1.0 — для параметра Slider
  • +inf — for all the others parameters+inf — для всех остальных параметров

titletitle#

String

The parameter group title that will be displayed in the Editor.Название группы параметров, которое будет отображаться в редакторе.

tooltiptooltip#

String

The tooltip text displayed in the Editor on cursor hover over the parameter field.Текст всплывающей подсказки отображается в Редакторе при наведении курсора на поле параметра.

widgetwidget#

String

The type of widget used for the parameter in the Editor.Тип виджета, используемый для параметра в редакторе.

If the type of widget is not specified, the most appropriate will be used (box fields for vector components or a slider). For the following types of parameters these widgets are set as defaults:Если тип виджета не указан, будет использоваться наиболее подходящий (поля для векторных компонентов или ползунок). Для следующих типов параметров эти виджеты установлены по умолчанию:

Тип параметра Виджет
Mask24 mask24
UV uv
Color сolor
Slider slider

min_expandmin_expand#

Boolean

A flag that enables the ability to specify values outside the minimum range limit.Флаг, позволяющий задавать значения, выходящие за пределы минимального диапазона.

Available values:Доступные значения:

  • false — fix the minimum range limitfalse — исправить ограничение минимального диапазона
  • true — expand the minimum range limittrue — расширить минимальный предел диапазона

Default values:Значения по умолчанию:

  • false — for the Slider parameterfalse — для параметра Slider
  • true — for all the others parameterstrue — для всех остальных параметров

max_expandmax_expand#

Boolean

A flag that enables the ability to specify values outside the maximum range limit.Флаг, позволяющий задавать значения за пределами максимального диапазона.

Available values:Доступные значения:

  • false — fix the maximum range limitfalse — исправить максимальное ограничение диапазона
  • true — expand the maximum range limittrue — расширить максимальный предел диапазона

Default values:Значения по умолчанию:

  • false — for the Slider parameterfalse — для параметра Slider
  • true — for all the others parameterstrue — для всех остальных параметров

expandexpand#

Boolean

A flag that enables the ability to specify values outside the minimum and maximum range limit.Флаг, который позволяет задавать значения за пределами минимального и максимального диапазона.

Available values:Доступные значения:

  • false — fix the range limitfalse — исправить ограничение диапазона
  • true — expand the range limittrue — расширить лимит диапазона

Default values:Значения по умолчанию:

  • false — for the Slider parameterfalse — для параметра Slider
  • true — for all the others parameterstrue — для всех остальных параметров

sharedshared#

Boolean

A flag that disables the passing of the parameter to shaders.Флаг, отключающий передачу параметра шейдерам.

Available values:Доступные значения:

  • false — do not pass the parameter to the shader as a variablefalse — не передавать параметр шейдеру как переменную
  • true — pass the parameter to the shader as a variable (by default)true — передать параметр шейдеру как переменную ( по умолчанию )

internalinternal#

Boolean

A flag that hides the parameter in the Editor and its values are not saved for the inherited materials.Флаг, который скрывает параметр в Редакторе и его значения не сохраняются для унаследованных материалов.

  • false — do not hide the parameter and save its values for the inherited materials (by default)false — не скрывать параметр и сохранять его значения для унаследованных материалов ( по умолчанию )
  • true — hide the parameter and do not save its values for the inherited materialstrue — скрыть параметр и не сохранять его значения для унаследованных материалов

hiddenhidden#

Boolean

A flag that hides the parameter in the Editor. The default value depends on the state of the internal argument. Enabled by default, except for Slider.Флаг, скрывающий параметр в Редакторе. Значение по умолчанию зависит от состояния внутреннего аргумента. Включено по умолчанию, за исключением Slider.

  • false — do not hide the parameterfalse — не скрывать параметр
  • true — hide the parametertrue — скрыть параметр

auto_initauto_init#

Boolean

A flag that determines whether the parameter should be automatically declared in the shader.Флаг, определяющий, должен ли параметр автоматически объявляться в шейдере.

  • false — auto initializedfalse — инициализируется автоматически
  • true — not auto initialized (by default)true — не инициализируется автоматически ( по умолчанию )

sizesize#

Integer

The size of an array (applicable only to array types), the default value is 0.Размер массива (применимо только к типам массивов), значение по умолчанию — 0.

passpass#

String

The set of passes during which the parameter will be used. If not specified the parameter is passed to all passes by default.Набор проходов, в течение которых будет использоваться параметр. Если не указано, параметр по умолчанию передается во все проходы.

Available values:Доступные значения:

expressionexpression#

Boolean

A flag indicating if the parameter is controlled via an expression (UnigineScript). It also enables the ability to specify an expression in the Editor.Флаг, указывающий, управляется ли параметр через выражение (UnigineScript). Это также позволяет указать выражение в редакторе.

Available values:Доступные значения:

  • false — requires the user to assign specific values to the parameter (by default)false — требует, чтобы пользователь присвоил параметру определенные значения ( по умолчанию )
  • true — use expression to calculate the parameter's valuestrue — использовать выражение для вычисления значений параметра
Последнее обновление: 06.02.2024
Build: ()