This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
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
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

UUSL Parameters

UUSL defines parameters that are passed by the engine to the shader. These parameters can be used in your shader programs to get the necessary data from the engine.

Common Parameters#

UUSL parameter Type Description
s_viewport float4 Viewport sizes: width, height, 1/width, 1/height.
s_viewport_coords float4 Viewport position: x, y, 1/x, 1/y.
s_stereo_hidden_area float4 Stereo hidden area transform parameter.
s_depth_range float4 Depth range: near, far, 1/near, 1/far.
s_solid_color float4 Solid color.
s_frame int The current frame number.
s_polygon_front float Polygon front.

Camera Parameters#

UUSL parameter Type Description
s_projection float4x4 Projection matrix.
s_iprojection float4x4 Inverse projection matrix.
s_oblique_frustum_plane float4 Oblique frustum culling plane.
s_modelview float4x4 Model-View matrix.
s_old_modelview float4x4 Olf Model-View matrix.
s_imodelview float4x4 Inverse Model-View matrix.
s_old_imodelview float4x4 Old inverse Model-View matrix.
s_old_imodelview_delta float4x4 Delta of old inverse Model-View matrix.
s_camera_offset float3 Camera position.
s_camera_position float3 Camera position in world space.
s_camera_direction float3 Camera direction vector.
s_camera_projection float4x4 Projection matrix of camera (not renderstate). For example: post have ortographic projection, but camera projection is perspective.
s_camera_iprojection float4x4 Inverse projection matrix of camera (not renderstate). For example: post have ortographic projection, but camera projection is perspective.

Material Deferred Parameters#

UUSL parameter Type Description
s_material_mask int Material mask.

Time Parameters#

UUSL parameter Type Description
s_ifps float Delta frame time.
s_time float Engine global time.
s_old_time float Engine time in the previous frame.

Game Time Parameters#

UUSL parameter Type Description
s_game_scale float Game time scale.
s_game_time float Game time.
s_game_old_time float Game time in the previous frame.

Scattering Parameters#

UUSL parameter Type Description
s_scattering_sun_dir float3 The direction of the sun scattering.
s_scattering_moon_dir float3 The direction of the moon scattering.
s_environment_ambient_intensity float Environment ambient intensity parameter.
s_environment_reflection_intensity float Environment reflection intensity parameter.
s_environment_sky_intensity float Sky intensity parameter.
s_environment_mipmaps float Environment texture mipmap.
s_haze_color float4 The color of the haze.
s_haze_max_distance float Haze maximum visible distance.
s_haze_density float The haze density.
s_haze_solid float 1 if the Environment Haze Mode is set to Solid, otherwise — 0.
s_haze_visibility float 1 if haze is enabled, otherwise — 0.
s_haze_gradient float Environment haze gradient.
s_sky_up float3 Sky up vector.
s_sky_altitude float Sky altitude.
s_sky_transform float4x4 Sky transform matrix.
s_moon_rotation float4x4 Moon rotation matrix.
s_sun_rotation float4x4 Sun rotation matrix.
s_haze_physical float 1 if the Environment Haze Mode is set to Physical, otherwise — 0.
s_haze_physical_start_height float Reference height value for the two parameters (Half Visibility Distance and s_haze_physical_falloff).
s_haze_physical_density float Haze density for the Physical preset.
s_haze_physical_falloff float Height of the haze density gradient.
s_haze_physical_zero_visibility_height float The height at which the haze makes completely overlaps the scene.
s_haze_physical_ambient_light_intensity float Intensity of the impact of the ambient lighting on haze.
s_haze_physical_ambient_color_saturation float Intensity of the ambient color's contribution to the haze.
s_haze_physical_sun_light_intensity float Intensity of the impact of the sunlight on haze.
s_haze_physical_sun_color_saturation float Intensity of the impact of the sunlight on haze.

Tesselation Parameters#

UUSL parameter Type Description
s_tessellation_density_multiplier float Global density multiplier for the adaptive hardware-accelerated tessellation. Higher values produce denser meshes.
s_tessellation_shadow_density_multiplier float Global Shadow Density multiplier for the Tessellated Displacement effect. Higher values produce more detailed shadows. You can make shadows from tessellated meshes simpler to save performance.
s_tessellation_distance_multiplier float Global multiplier for all distance parameters of the adaptive hardware-accelerated tessellation used for distance-dependent optimization. Higher values make tessellation visible at longer distances from the camera (consuming more resources).

Antialiasing Parameters#

UUSL parameter Type Description
s_taa float TAA flag.
s_supersampling float Number of samples per pixel used for supersampling..
Last update: 2022-10-10
Build: ()