This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

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-03-05
Build: ()