This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Professional (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Landscape Tool
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World Nodes
Звуковые объекты
Объекты поиска пути
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Materials and Shaders
Rebuilding the Engine Tools
GUI
Двойная точность координат
API
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
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Сэмплы материалов
Material Nodes Library
Miscellaneous
Input
Matrix
Textures
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Lerp Node


Description

This node is used to blend (linear interpolation) between two input values or colors A and B depending on the Coefficient.

  • if Coefficient = 0 the node outputs A value
  • if Coefficient = 0.5 the node outputs a halfway blend between A and B
  • if Coefficient = 1 the node outputs B value
  • for all other Coefficient values the node outputs a linear blend of A and B

Usage Examples

Example 1

Gradient mask controlling interpolation (along U-axis) between two given textures, with Slider1 controlling the position of the transition and Slider2 controlling transition softness. Outputs of two Sample Texture nodes are connected to the Lerp node that performs linear interpolation between texture values with an interpolation coefficient. To get this coefficient we take U coordinate from the Vertex UV 0 node and subtract it from the current Slider1 value using the Subtract node, the result is then passed to the Divide node to be divided by the value of Slider2, then the result is summed up with Slider1 value and passed to the Clamp node to be restricted to the [0;1] range. The result or linear interpolation provides Albedo values for the Material.

Last update: 02.06.2022
Build: ()