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
Учебные материалы

Mesh Unlit

Implements the basic render functionality for an unlit mesh. Doesn’t cast or receive shadows, that’s why it can be the base for a custom lighting implementation (e.g., raymarching). Can be used for the following objects (inherited from parent abstract material — Mesh):

Notice
Mesh Unlit has the same states and shaders available as the parent Mesh abstract material.

You can find the source code for this abstract material here: <SDK>/data/core/materials/abstract/mesh/mesh_unlit.abstmat

See Also

Features#

The Mesh Unlit abstract material has features implemented as internal states that can be enabled on demand in the child material:

States#

Mesh Unlit contains the same states as parent abstract Mesh material but adds new or modified values of some of the existing ones.

Name Default Description
static_shadow true Overrides Unigine::Mesh’s state value.
gbuffer false Enables writing of deferred buffers for the material.
transparent_blur false Enables rendering of transparent blur effect.
refraction false Enables rendering of post-processing refraction.

Shaders#

fragment#

Input data and functions are the same as for Mesh abstract material. The Unlit material implements its “unlit” functionality by using the emission buffer as an output for the resulting color and skipping deferred pipeline.

Output Data#

Name Type Description
OUT_FRAG_COLOR float4 Final fragment color as emission

Usage Example#

ULON
BaseMaterial <parent=Unigine::mesh_unlit>
{
    Texture2D albedo = "core/textures/common/checker_d.dds"
    Color albedo = [1 1 1 1]
    
    // optimization
    State static_shadow = true
    State vertex_velocity = false
    
    Shader vertex_struct =
    #{
        INIT_BASE_DATA
    #}
    
    Shader common =
    #{
        float4 sample_color(float2 uv)
        {
            return TEXTURE(tex_albedo, uv) * var_albedo;
        }
    #}
    
    Shader fragment =
    #{
        float4 color = srgbInv(sample_color(DATA_UV.xy));
        
        OUT_FRAG_EMISSION = color.rgb;
        OUT_FRAG_OPACITY = color.a;
    #}
}
Last update: 19.04.2024
Build: ()