This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Плагины
Форматы файлов
Материалы и шейдеры
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
Учебные материалы
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Noise Functions

This documentation article contains information functions of the UUSL. This information can be used as the reference document for writing shaders.

To start using common UUSL functionality, include the core/materials/shaders/api/noise.h file.

UUSL
#include <core/materials/shaders/api/noise.h>

Noise Functions#

float4 blueNoise ( uint2 coord ) #

Returns blue noise based on the source coordinates using a 16x16 constant blue noise array.

Arguments

  • uint2 coord - Unnormalized coordinates.

Return value

Blue noise.

float4 blueNoise ( float2 coord ) #

Returns blue noise based on the source coordinates using a 16x16 constant blue noise array.

Arguments

  • float2 coord - Unnormalized coordinates.

Return value

Blue noise.

float4 blueNoiseTemporal ( uint2 coord, uint num_frame ) #

Returns blue noise based on source coordinates using a 16x16 constant blue noise array. You can specify the number of frames for the noise to change. It is a constant blue noise array with a frame-to-frame offset calculated using Golden Ratio.

Arguments

  • uint2 coord - Unnormalized coordinates.
  • uint num_frame - Number of frames for the noise to change.

Return value

Blue noise.

float4 blueNoiseTAA ( uint2 coord, uint num_frame ) #

Returns blue noise based on source coordinates using a 16x16 constant blue noise array. You can specify the number of frames for the noise to change. It is a constant blue noise array with a frame-to-frame offset calculated using Golden Ratio.

The TAA postfix means that noise pattern changes from frame to frame when TAA is enabled, and remains constant when TAA is disabled.

Arguments

  • uint2 coord - Unnormalized coordinates.
  • uint num_frame - Number of frames for the noise to change.

Return value

Blue noise.

float4 blueNoiseTAA ( float2 coord, uint num_frame ) #

Returns blue noise based on source coordinates using a 16x16 constant blue noise array. You can specify the number of frames for the noise to change. It is a constant blue noise array with a frame-to-frame offset calculated using Golden Ratio.

The TAA postfix means that noise pattern changes from frame to frame when TAA is enabled, and remains constant when TAA is disabled.

Arguments

  • float2 coord - Unnormalized coordinates.
  • uint num_frame - Number of frames for the noise to change.

Return value

Blue noise.

float4 blueNoiseTemporal ( float2 coord, uint num_frame ) #

Returns blue noise based on source coordinates using a 16x16 constant blue noise array. You can specify the number of frames for the noise to change. It is a constant blue noise array with a frame-to-frame offset calculated using Golden Ratio.

Arguments

  • float2 coord - Unnormalized coordinates.
  • uint num_frame - Number of frames for the noise to change.

Return value

Blue noise.

float bayerNoise ( uint2 coord ) #

Returns Bayer noise generated based on the source coordinates using a 4x4 constant Bayer pattern.

Arguments

  • uint2 coord - Unnormalized coordinates.

Return value

Bayer noise.

float bayerNoise ( float2 coord ) #

Returns Bayer noise generated based on the source coordinates using a 4x4 constant Bayer pattern.

Arguments

  • float2 coord - Unnormalized coordinates.

Return value

Bayer noise.

float2 vogelDisk ( uint i, uint count, float noise ) #

Returns a generated set of points with X and Y coordinates in the [-1; 1] range that describe a circle with uniform distribution of samples inside. This method is suitable for getting uniform distribution of coordinates for a circle. For example you can use it is a loop to generate UV coordinates offset for making the uniform circular blur effect. You can use the current loop iteration index as the i argument and the maximum number of iterations — as count.

Arguments

  • uint i - Index of the current point for the disk.
  • uint count - Number of points.
  • float noise - Normalized noise.

Return value

Set of points with X and Y coordinates in the [-1; 1] range that describe a circle with uniform distribution of samples inside.

float2 vogelDisk ( uint i, uint count ) #

Returns a generated set of points with X and Y coordinates in the [-1; 1] range that describe a circle with uniform distribution of samples inside. This method is suitable for getting uniform distribution of coordinates for a circle. For example you can use it is a loop to generate UV coordinates offset for making the uniform circular blur effect. You can use the current loop iteration index as the i argument and the maximum number of iterations — as count.

Arguments

  • uint i - Index of the current point for the disk.
  • uint count - Number of points.

Return value

Set of points with X and Y coordinates in the [-1; 1] range that describe a circle with uniform distribution of samples inside.

float2 hammersley ( uint i, uint N ) #

Returns a generated set of points with X and Y coordinates in the [0; 1] range that describe uniform distribution of samples inside a square (Hammersley Point Set).

Arguments

  • uint i - index of the current point.
  • uint N - Number of points.

Return value

Set of points with X and Y coordinates in the [-1; 1] range that describe uniform distribution of samples inside a square.
Last update: 19.04.2024
Build: ()